# SEW-2001m Mini-PCI Card Problems, Help Needed!!



## JamesElstone (Oct 29, 2011)

Hi All,

I am pulling my hair out on this one, and require some guidance please!

I have a Dell Latitude laptop with a miniPCI wireless card in (Samsung SEW-2001m or Samsung P10C Laptop Wireless Card MPC13A-20/R).  FreeBSD loads fine, but on performing a wireless scan, it hangs returning nothing. I can recover using Ctrl+c.

The details are:

```
uname -a
FreeBSD 8.2-RELEASE
```

I have installed a clean installation on a fresh HD, selecting "ALL"...

In the boot messages I only get two lines relating to the wireless card:


```
cat /var/run/dmesg.boot | grep -i wi0
wi0: <Samsung Electronics Samsung SEW-2001m Card> at port 0x100-0x13f irq 11 function 0 config 1 on pccard2
wi0: [ITHREAD]
```

However, issuing [cmd=]pciconf -lv | grep -i device[/cmd] I see no mention of anything samsung, the only items of interest are (but I think are standard bus contollers...):

```
PC Card CardBus Controller (PCI4451)
PC Card CardBus Controller (PCI4451)
PC Card CardBus Controller (PCI4450)
```

The built in NIC shows as a 3com 3c905 in *pciconf*, but nothing for the wireless card.

I only have the following in loader.conf:

```
more /boot/loader.conf:
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```

I don't have the wlan_scan settings, as I am running v8, is this correct?

```
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
```


Issuing the following to attempt to scan:

```
ifconfig wlan0 create wlandev wi0
ifconfig wlan0 up scan
```
 then nothing but an escapable hang!?

I have checked with another device that my wireless AP is OK and my...

Any ideas welcome.


----------



## T-Daemon (Oct 30, 2011)

Hi,

To interact with the card, a driver needs to be loaded first. The Samsung SEW-2001m card has a Lucent Hermes chipset,  wi(4) is the necessary driver.


----------



## JamesElstone (Nov 4, 2011)

Hi T-Daemon,

Still no joy - I still need some help to get this working; Is wi(4) broken in V8.2 STABLE and V9-RC1?

I have researched the wi(4) driver already, and understand that this is included in GENERIC kernel (along with wlan_* options) for V7+.  I have also ported to V9-RC1 to see if the issue is resolved in a newer version. This was after having had an e-mail chat with the current owner for an ifconfig bug report related to scanning where by the changes have been commited to V9 but will not, at time of writing, be commited to V8.2 ...

To confirm, I put [CMD=""]if_wi_load="YES"[/CMD] in /boot/loader.conf and checked the /var/run/dmesg.boot for the results on the next reboot:

```
module_register: module pccard/wi already exists!
Module pccard/wi failed to register: 17
module_register: module pci/wi already exists!
Module pci/wi failed to register: 17
```

This was the same result as in 8.2-STABLE.

I have a dual boot with Windows 2003 SP2 and the card runs fine in Windows using XP drivers, and am posting using the card now.

If it helps, below are the contents of the relative files.  V9-RC1 is from a clean (fdisk clean) install of V9-RC1.
`/var/run/dmesg.boot`

```
Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-RC1 #0: Tue Oct 18 18:30:38 UTC 2011
    root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
module_register: module pccard/wi already exists!
Module pccard/wi failed to register: 17
module_register: module pci/wi already exists!
Module pci/wi failed to register: 17
CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz (2193.57-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Family = f  Model = 2  Stepping = 9
  Features=0xbfebf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNXT-ID,xTPR>
real memory  = 805306368 (768 MB)
avail memory = 768761856 (733 MB)
kbd1 at kbdmux0
acpi0: <DELL CPi R  > on motherboard
acpi0: reservation of 0, 9fc00 (3) failed
acpi0: reservation of 100000, 2fef0000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_acad0: <AC Adapter> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
battery1: <ACPI Control Method Battery> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci_link1: BIOS IRQ 11 for 0.31.INTB is invalid
pci0: <ACPI PCI bus> on pcib0
agp0: <Intel 82845 host to AGP bridge> on hostb0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> mem 0xfc000000-0xfcffffff,0xe0000000-0xe7ffffff,0xdff80000-0xdfffffff irq 11 at device 0.0 on pci1
uhci0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0
usbus0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> on uhci0
uhci1: <Intel 82801CA/CAM (ICH3) USB controller USB-C> port 0xbf20-0xbf3f irq 11 at device 29.2 on pci0
usbus1: <Intel 82801CA/CAM (ICH3) USB controller USB-C> on uhci1
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pcib2: failed to allocate initial I/O port window: 0xe000-0xffff
pcib2: failed to allocate initial memory window: 0xf4000000-0xfbffffff
pci2: <ACPI PCI bus> on pcib2
xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xec80-0xecff mem 0xf8fffc00-0xf8fffc7f irq 11 at device 0.0 on pci2
miibus0: <MII bus> on xl0
ukphy0: <Generic IEEE 802.3u media interface> PHY 24 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
xl0: Ethernet address: 00:0b:db:99:38:7e
cbb0: <TI4451 PCI-CardBus Bridge> at device 1.0 on pci2
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb1: <TI4451 PCI-CardBus Bridge> at device 1.1 on pci2
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
fwohci0: <Texas Instruments PCI4451> mem 0xf8fff000-0xf8fff7ff,0xf8ff8000-0xf8ffbfff irq 11 at device 1.2 on pci2
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 33:4f:c0:00:17:6a:e0:10
fwohci0: Phy 1394a available S400, 1 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
dcons_crom0: <dcons configuration ROM> on firewire0
dcons_crom0: bus_addr 0x148c000
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 32:4f:c0:6a:e0:10
fwe0: Ethernet address: 32:4f:c0:6a:e0:10
fwip0: <IP over FireWire> on firewire0
fwip0: Firewire address: 33:4f:c0:00:17:6a:e0:10 @ 0xfffe00000000, S400, maxrec 2048
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwohci0: Initiate bus reset
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode
cbb2: <TI1410 PCI-CardBus Bridge> irq 11 at device 3.0 on pci2
cardbus2: <CardBus bus> on cbb2
pccard2: <16-bit PCCard bus> on cbb2
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH3 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xbfa0-0xbfaf at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
pcm0: <Intel ICH3 (82801CA)> port 0xd800-0xd8ff,0xdc80-0xdcbf irq 9 at device 31.5 on pci0
pcm0: <Cirrus Logic CS4205 AC97 Codec>
pci0: <simple comms, generic modem> at device 31.6 (no driver attached)
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model GlidePoint, device ID 0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x77 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
fdc0: <floppy drive controller (FDE)> port 0x3f2-0x3f5,0x3f7 irq 6 drq 2 on acpi0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77b irq 7 drq 1 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
acpi_perf0: <ACPI CPU Frequency Control> on cpu0
acpi_perf0: failed in PERF_STATUS attach
device_attach: acpi_perf0 attach returned 6
acpi_perf0: <ACPI CPU Frequency Control> on cpu0
acpi_perf0: failed in PERF_STATUS attach
device_attach: acpi_perf0 attach returned 6
p4tcc0: <CPU Frequency Thermal Control> on cpu0
ichss0: <SpeedStep ICH> on cpu0
Timecounters tick every 1.000 msec
firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0)  (me) 
firewire0: bus manager 0 
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
interrupt storm detected on "irq11:"; throttling interrupt source
wi0: <Samsung Electronics Samsung SEW-2001m Card> at port 0xe000-0xe03f irq 11 function 0 config 1 on pccard2
<snip IDE stuff>
wlan0: Ethernet address: 00:02:2d:7f:82:8c
```
`/etc/rc.conf`

```
hostname="nitrogen"
keymap=uk.cp850.kbd
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
wlans_wi0="wlan0"
ifconfig_wlan0="mode 11b authmode OPEN country GB channel 6 ssid JELLYSTONE DHCP"
```
`/etc/sysctl.conf`

```
sysctl.hw.intr_storm_threshold=4000
```
`vmstat -i`

```
interrupt                          total       rate
irq0: attimer0                   7013882       1997
irq1: atkbd0                        1373          0
irq6: fdc0                             1          0
irq7: ppc0                             5          0
irq11: cbb0 cbb1++*                 5911          1
irq12: psm0                            9          0
irq14: ata0                         1614          0
irq15: ata1                          375          0
Total                            7023170       1999
```
`/boot/loader.conf`

```
if_wi_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```
`ifconfig wlan0`

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:02:2d:7f:82:7c
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11b
	status: no carrier
	ssid JELLYSTONE channel 6 (2437 MHz 11b)
	regdomain ETSI country GB authmode OPEN privacy OFF txpower 30
	bmiss 7 scanvalid 60
```


----------



## JamesElstone (Nov 4, 2011)

Hi all,

Just a quick update.

With the following, I noticed something odd:
`ifconfig wlan0 create wlandev wi0 ssid JELLYSTONE`
(Note DHCP is enabled on wlan0 in rc.conf...)

while with the wlan0 interface down:

```
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:02:2d:7f:82:7c
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11b
	status: no carrier
	ssid JELLYSTONE channel 6 (2437 MHz 11b)
	regdomain ETSI country GB authmode OPEN privacy OFF txpower 30
	bmiss 7 scanvalid 60
```

and then:
`ifconfig wlan0 up`

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:02:2d:7f:82:7c
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet DS/11Mbps mode 11b
	status: associated
	ssid "" channel 6 (2437 MHz 11b)
	regdomain ETSI country GB authmode OPEN privacy OFF txpower 30
	bmiss 7 scanvalid 60
```

The ssid goes from the correct ssid when the interface is down to a blank ssid when up! However the status is associated when up, dhclient fails to get a lease and using a static IP does not ping to Access Point.

Please throw any ideas my way; This is so fustrating!

James.


----------



## JamesElstone (Nov 11, 2011)

I have now tried v9-RC1 with a custom built kernel, and wi is still not playing ball; same symptoms.  Any ideas anyone please?


----------



## JamesElstone (Nov 12, 2011)

Just for completeness, I have given up with "wi" and believe it is broken in v8, v9-Stable.

Have switched to Broadcom and could scan first time with GENERIC and custom kernel with "bwi" enabled.

Thanks to all those who read and to T-Deamon.  If anybody is using this sucessfully please PVT message me.


----------

