Broadcom 4331 Wifi, ndis crashes the kernel

wardbones

Member

Reaction score: 1
Messages: 27

Hello, friends.

I followed the directions in the FreeBSD Handbook and everything went really well. I made a mistake the first time and made a 32 bit module but I loaded it and unloaded, no problem, didn't show ndis0 under ifconfig but when I made the 64-Bit module, as soon as I kldload the module, the kernel crashes and locks. I've tried several packages' inf and sys files but all the 64 bit ones lock the machine.

I am a little confused about firmware. There is a question in the Ndis script that asks if you want to input any firmware. I probably have that file, too, in all the driver packages but don't know which file might be firmware or I it's a whole different piece of data.

uname -a

Code:
FreeBSD hoth 12.0-RELEASE FreeBSD 12.0-RELEASE GENERIC  amd64

I'm on a MacBook Pro 8,1 (Early 2009). I have everything else working but the wifi and firewire (ieee1394) port. I read that firewire would never be supported. Not sure if that's so but right now, I would just like to get off the dongle wifi.

Thanks for reading, I'm not sure what else to post to help people help me on this, please let me know.

Ward
 

tingo

Son of Beastie

Reaction score: 666
Messages: 2,598

IMHO, you are much better off if you spend the necessary time and money on getting a supported WiFi adapter for your machine. ndis is just asking for a world of pain.
 
B

badbrain

Guest


Don't waste time with such a job. It's for hackers not us. Buy another device. Make sure it's supported. Done.
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Thanks, everybody. I had a fantasy about creating a distro of BSD for old Macs with Gnome 3. I wanted to see how difficult it would be and it certainly is! I got most of everything working and had a lot of fun but went to Fedora. I have another machine (PC) for FreeBSD. I used to work volunteer for GhostBSD and maybe could one day start a community Gnome 3 version (like we were in the beginning). Thank you.
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

If anybody reads this and is willing to help. I'd still like to do it. Apple stopped supporting my Macbook Pro 8,1 and I'm trying again.
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Well, I have the bcm ndis module loaded but can't figure out how to activate it through ifconfig. Here is the link to the page that got it installed, apparently, the kernel crash is not unique and this guide resolved my firmware question as well:

Broadcom Ndis Howto

Still could use some help.

Thank you.
 

moridin

Member

Reaction score: 27
Messages: 34

What is the exact reason you are using ndis instead of bwn(4)? If you are following that post, there were a lot of changes to the driver since 2012, and it's worth giving it a try?
 

Phishfry

Beastie's Twin

Reaction score: 3,249
Messages: 6,380

I agree with everyone here. NDIS is last possible option to consider. Have you tried our driver?
Do notice that there are two possible firmwares to use for these cards.
They must be compiled from ports
See the note here net/bwn-firmware-kmod
No package is available: this is a modified version of a restricted firmware

Grab a ports tree - portsnap auto and move to the correct directory cd /usr/ports/net/bwm-firmware-kmod.
Then run make install clean.


Once complete you can load the module
kldload bwn_v4_lp_ucode
OR
kldload bwn_v4_ucode
Notice there are two modules. You only need one.
If you look at pciconf -lv | grep network -B 3 it will show the name of the wireless card.
If it has >LP< in the name of the card then use the LP firmware module.


Now you can add your firmware to /boot/loader.conf. You don't want to load both.
bwn_v4_lp_ucode_load="YES"
OR
bwn_v4_ucode_load="YES"


Finally you should add settings for this interface to /etc/rc.conf
wlans_bwm0="wlan0"
ifconfig_wlan0="WPA DHCP"

Reboot and see what you get.
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Hello, everybody. I'm at it again.

Thank you, Phishfry. That seemed like the best answer but bcn0 doesn't show up in ifconfig as wlan0.

Pretty sure I followed everything.

Anyway, if anybody's up for another crack at this it would be great. I use a dongle but with only two usb ports and since firewire isn't supported I need that port!

Thanks again. Sorry to be away so long, I gave up.

-w
 
Last edited:

T-Daemon

Daemon

Reaction score: 1,111
Messages: 2,016

Have you ever tried the bwn(4) driver? When that driver is loaded the bhnd(4) driver is also loaded. The bhnd pci device id's mentions the following 4331 models:

#define PCI_DEVID_BCM4331_D11N 0x4331 /* 4331 802.11n dualband id */
#define PCI_DEVID_BCM4331_D11N2G 0x4332 /* 4331 802.11n 2.4Ghz band id */
#define PCI_DEVID_BCM4331_D11N5G 0x4333 /* 4331 802.11n 5Ghz band id */

(You can check with the pciconf -lv | grep network -B 3 command the device id of the installed wifi card.)

Also in the Broadcom ChipCommon core, here and here.

firewire (ieee1394) port. I read that firewire would never be supported.
firewire isn't supported

What kind of firewire device do you want to attach? Search result for "firewire 1394":
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Hi, T-Daemon,

Code:
80N35@HAL-9000 ~> pciconf -lv | grep network -B 3
bge0@pci0:2:0:0:    class=0x020000 card=0x16b414e4 chip=0x16b414e4 rev=0x10 hdr=0x00
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'NetXtreme BCM57765 Gigabit Ethernet PCIe'
    class      = network
--
bwn_pci0@pci0:3:0:0:    class=0x028000 card=0x433114e4 chip=0x433114e4 rev=0x02 hdr=0x00
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'BCM4331 802.11a/b/g/n'
    class      = network

I did everything that Phishfry said and still no luck with bwn4331. Do I need to load something or attach bhnd instead of bwn to wlan0?

As for as firewire 1394, I want to connect an external drive. It's ntfs which is no problem with fuse but I can't seem to find it in /dev anywhere and tail /var/log/messages doesn't show a thing when I plug it in to firewire port. Here's the pciconf on that:

Code:
80N35@HAL-9000 ~> pciconf -lv | grep 1394 -B 3
    class      = network
none2@pci0:4:0:0:    class=0x0c0010 card=0x590011c1 chip=0x590111c1 rev=0x08 hdr=0x00
    vendor     = 'LSI Corporation'
    device     = 'FW643 [TrueFire] PCIe 1394b Controller'

Thanks so much. Any suggestions would be fantastic.
 

T-Daemon

Daemon

Reaction score: 1,111
Messages: 2,016

Try this for wifi:
kldload if_bwn

Check if the driver has attached to the wifi adapter:
sysctl net.wlan.devices

If it's not listed, then it's not supported by that driver. If it's listed proceed the setup as described in the handbook.

For firewire try:
kldload firewire sbp, plug in the external drive, check first console (tty0) or dmesg or /var/log/messages if the device is detected. If it's detected make the settings permanent in /boot/loader.conf:
Code:
firewire_load="YES"
sbp_load="YES"
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Thank you, T-Daemon,

80N35@HAL-9000 ~> sudo kldload if_bwn
Password:
kldload: can't load if_bwn: module already loaded or in kernel
80N35@HAL-9000 ~> sudo sysctl net.wlan.devices
net.wlan.devices: rtwn0


That's my usb dongle...

firewire0: 2 nodes, maxhop <= 1 cable IRM irm(1) (me)
firewire0: bus manager 1
sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:14 EUI:001c0d0200400493 node:0 speed:3 maxrec:8
sbp0: sbp_show_sdev_info: sbp0:0:0 'HGST' 'G-Drive Mobile' '000102'
sbp0: sbp_mgm_timeout:sbp0:0:0 request timeout(mgm orb:0x4b76b028)
sbp0: sbp_mgm_timeout:sbp0:0:0 reset start


Okay, gonna reboot and try the firewire. Thanks again...
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Here's dmesg

Code:
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=4, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0)  (me)
firewire0: bus manager 0
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=5, non CYCLEMASTER mode
firewire0: 2 nodes, maxhop <= 1 cable IRM irm(0)  (me)
firewire0: root node is not cycle master capable
firewire0: bus manager 0
fwohci0: too many cycles lost, no cycle master present?
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000001, SelfID Count=6, CYCLEMASTER mode
firewire0: 2 nodes, maxhop <= 1 cable IRM irm(1)  (me)
firewire0: bus manager 1
sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:14 EUI:001c0d0200400493 node:0 speed:3 maxrec:8
sbp0: sbp_show_sdev_info: sbp0:0:0 'HGST' 'G-Drive Mobile' '000102'
sbp0: sbp_mgm_timeout:sbp0:0:0 request timeout(mgm orb:0x029e0028)
sbp0: sbp_mgm_timeout:sbp0:0:0 reset start

What's next? I can't mount sbp0 with fuse,


80N35@HAL-9000 ~> sudo ntfs-3g /dev/sbp0s1 /mnt
ntfs-3g: Failed to access volume '/dev/sbp0s1': No such file or directory
 
Last edited:

T-Daemon

Daemon

Reaction score: 1,111
Messages: 2,016

Don't thank me yet. Writing from a phone and copy & pasting from external editor I overlooked the firmware, sorry.

After kldload if_bwn execute also
kldload bwn_v4_lp_ucode
OR
kldload bwn_v4_ucode, as suggested by Phishfry

After run sysctl net.wlan.devices again.
 
OP
wardbones

wardbones

Member

Reaction score: 1
Messages: 27

Just glad for the effort.

Code:
80N35@HAL-9000 ~> sudo kldload if_bwn
kldload: can't load if_bwn: module already loaded or in kernel
80N35@HAL-9000 ~> sudo kldload bwn_v4_ucode
kldload: can't load bwn_v4_ucode: module already loaded or in kernel
80N35@HAL-9000 ~> sysctl net.wlan.devices
net.wlan.devices: rtwn0

Yep. I saw this on here "#Wireless Wireless is bcm4331, neither bwi or bwn drivers work, needs version 5 drivers"

Seems like a lot of people want the 4331 drivers for MBP. If we could get the firewire running that would save me a usb port for the dongle (of a lousy Mac 2 ports...).
 
Top