Freebsd broadcom wifi driver

Solved Broadcom BCM4313

Hello: the laptop I am working on for our local American Legion post, an Acer «Aspire One», includes a Broadcom BCM4313 WLAN chip on the motherboard. I am trying to get it in operation. I searched the threads on this forum and found an old one from 2012 which had some very useful info, but I figured that there must have been some progress made since then. So, I went to Broadcom’s website and found two Linux drivers for this adapter, one 64 bit and one 32 bit version. I downloaded the 64 bit version and extracted it. There are a ton of files in two main directories, src and lib. At this point, I can’t figure out which to use where.

aragats

The ndisgen script uses the ndiscvt(8) utility and other tools to
generate a FreeBSD loadable driver module and a static ELF object module
from a Windows® NDIS driver, for use with the ndis(4) compatibility module.

KenGordon

Yes. That is the thread I mentioned: but it was written in 2012, and I was hoping there would be a more up-to-date solution.

At this point, I am going to use that solution and not worry about any possible update.

aragats

Thanks

Reactions: KenGordon

KenGordon

OK. I went through that entire exercise, but, apparently, I have several issues.

1) After doing all of that, and after doing wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -dd the output is as follows;

wpa_supplicant v2.6 Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' Line: 1 - start of a new network block ssid - hexdump_ascii(len=8): 53 48 41 4d 52 4f 43 4b SHAMROCK PSK (ASCII passphrase) - hexdump_ascii(len=11): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Priority group 0 ssid='SHAMROCK' wpa_driver_bsd_init: interface wlan0 does not exist wlan0: Failed to initialize driver interface Failed to add interface wlan0 wlan0: Cancelling scan request wlan0: Cancelling authentication timeout

none1@pci0:2:0:0: card=0x051014e4 chip=0x472714e4 rev=0x01 hdr=0x00 vendor = 'Broadcom Inc. and subsidiaries' device = 'BCM4313 802.11bgn Wireless Network Adapter' (Notice the "none1" ? 
3)Checking in /dev, I find no entry for wlan0, which may not be of importance.

4) dmesg -a | more does not show a wireless LAN adapter at all.

5) Although there is a .INF file associated with all the other Windows drivers, it is never used here.

6) I had thought to replace «wlan0» in all appropriate files with «none1». but that seemed to me to be less than helpful, so I didn’t do it.

Suggestions? Helpful hints?

Thanks

Reactions: sidetone

aragats

ifconfig wlan0 create wlandev ndis0

There is Broadcom NDIS HOWTO thread (from 2012).
Also, there is even older NDIS related HOWTO.

Читайте также:  Управляемый вай фай закон

I used to use NDIS long time ago, unfortunately do not remember details.

Thanks

Reactions: KenGordon

KenGordon

Thank you again. Obviously, I still have work to do. I will say that so far, this is the biggest PITA I have run into while working with this Acer laptop.

The only thing I have left after I get this sorted out is to activate the I2C-based touch pad. and I am not looking forward to doing that.

And, I don’t see how the folks I am doing this for can even remotely appreciate all the work that has been and still is necessary. Many hours.

And they have 5 more of these I have to work on, but at least after this one, the rest should be. easier.

aragats

It was straight forward and took 10 minutes with FreeBSD 13.0 and iichid driver for my Dell Precision 7540, however, I couldn’t make it working with FreeBSD 12.1.

KenGordon

It was straight forward and took 10 minutes with FreeBSD 13.0 and iichid driver for my Dell Precision 7540, however, I couldn’t make it working with FreeBSD 12.1.

I am working with FreeBSD 12.0-RELEASE.

aragats

You can still try building that driver, it’s easy, you’ll need to get the kernel src code in /usr/src though.
I guess, in my case the 12.* doesn’t recognize the I2C bus in my computer (it’s too new!).

KenGordon

OK. Getting back, for the moment, to my NDIS issue, I have been reviewing the files concerned.

1) First of all, I may have an error in my rc.conf. Here is the code:

hostname="pharc2" zfs_enable="YES" kld_list="sysctlinfo" moused_enable="YES" ifconfig_alc0="DHCP" wlans_ndis0="wlan0" ifconfig_wlan0="WPA SYNCDHCP" wpa_supplicant_enable="YES" linux_enable="YES" dbus_enable="YES" dsbdriverd_enable="YES" lightdm_enable="YES" cupsd_enable="YES" samba_server_enable="YES"

. That doesn’t look correct to me, but I don’t yet know enough to tell.

2) Here is my wpa_supplicant.conf

network= < ssid="SHAMROCK" psk="Ab2thW3Aohc" >ifconfig wlan0 create wlandev ndis0 ifconfig wlan0 up wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D ndis0 dhclient wlan0

As one can see, the ifconf «create» command is contained there. However, when I then do wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -dd , the output is as follows:

wpa_supplicant v2.6 Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' Line: 1 - start of a new network block ssid - hexdump_ascii(len=8): 53 48 41 4d 52 4f 43 4b SHAMROCK PSK (ASCII passphrase) - hexdump_ascii(len=11): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Line 5: unknown global field 'ifconfig wlan0 create wlandev ndis0'. Line 5: Invalid configuration line 'ifconfig wlan0 create wlandev ndis0'. Line 6: unknown global field 'ifconfig wlan0 up'. Line 6: Invalid configuration line 'ifconfig wlan0 up'. Line 7: unknown global field 'wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D ndis0'. Line 7: Invalid configuration line 'wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D ndis0'. Line 8: unknown global field 'dhclient wlan0'. Line 8: Invalid configuration line 'dhclient wlan0'. Priority group 0 ssid='SHAMROCK' Failed to read or parse configuration '/etc/wpa_supplicant.conf'. Failed to add interface wlan0 : Cancelling scan request : Cancelling authentication timeout

It seems obvious to me (perhaps I am wrong) that ndis0 does not exist.

Читайте также:  Ip ptz wifi onvif

3) Lastly, here is my bcm4313 executable in /etc/rc.d which does show up in the boot process as loading the drivers.

#!/bin/sh # PROVIDE: bcm4313 # REQUIRE: NETWORKING # BEFORE: LOGIN # KEYWORD: nojail . /etc/rc.subr name="bcm4313" start_cmd="$_start" stop_cmd=":" bcm4313_start() < echo "Loading Broadcom BCM4313 NDIS kernel modules." kldload bcm43xx64.cat.ko kldload bcmihvui64.dll.ko kldload bcmihvsrv64.dll.ko kldload bcmwl63a.sys.ko >load_rc_config $name run_rc_command "$1"

This appears to be working correctly.

At this point, I am kinda stuck.
Ken Gordon

Источник

FreeBSD Broadcom BCM43225 Setup

I’m new to FreeBSD, it’s working fine one my Laptop. Only problem is, that my wifi device isn’t in ifconfig so I can’t use it. I tried a lot of reading but I couldn’t get it to work. How can I get my Broadcom chip to work? Model: Acer Aspire 5820TG

FreeBSD rindtop 10.2-RELEASE-p7 FreeBSD 10.2-RELEASE-p7 #0: Mon Nov 2 14:19:39 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 
none3@pci0:3:0:0: card=0xe021105b chip=0x435714e4 rev=0x01 hdr=0x00 vendor = 'Broadcom Corporation' device = 'BCM43225 802.11b/g/n' 
. pcib3: at device 28.5 on pci0 pcib3: failed to allocate initial I/O port window: 0x1000-0x1fff pci3: on pcib3 pci3: at device 0.0 (no driver attached) . 
alc0: flags=8843 metric 0 mtu 1500 options=c3198 ether 60:eb:69:4b:fa:0c inet 192.168.0.58 netmask 0xffffff00 broadcast 192.168.0.255 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 nd6 options=21
if_bwn_load="YES" if_bwi_load="YES" wlan_wep_load="YES" wlan_ccmp_load="YES" wlan_tkip_load="YES" fuse_load="YES" 
ifconfig_alc0="inet 192.168.0.58 netmask 255.255.255.0" defaultrouter="192.168.0.1" font8x8="cp437-8x8" hald_enable="YES" dbus_enable="YES" fusefs_enable="YES" . 

I tried to provide as much relevant information as I could. You will probably recognize some things I tried. Thanks for your help!

Update

Источник

Broadcom NDIS HOWTO

Here is a quick HOWTO get Broadcom BCM43xx based wireless interfaces working with Windows driver via NDIS, instead of using native bwn which may not be reliable with some devices. There are pieces of information available on how to get it working here and there, so I thought I’d assemble the knowledge at one place. This procedure works well on my Lenovo G550 laptop with the BCM4312 802.11b/g LP-PHY card, running FreeBSD 9.0-RELEASE-p3 (amd64).

There are a few reasons I decided to use the NDIS driver instead of native bwn:

  • bwn reporting Fatal DMA errors with my card and disabling DMA does not help
  • bwn is limited to the 11b mode only
  • bwn floods console with various error messages like unsupported rate 0, etc.
Читайте также:  Выключить телевизор через вай фай

Step #1: Download and extract the Windows driver. I’ve used the Broadcom_BCM43xx_5.100.235.19_win5x.exe file available at [WikiDrivers].

Step #2: Follow instructions in the FreeBSD Handbook in order to create the FreeBSD kernel module out of the Windows driver’s binary and information files. The procedure is well described in the Handbook, so I will just mention that you will need to use bcmwl564.sys for amd64 systems, and include bcmwlcoi64.dll when ndisgen(8) asks for any supplemental files.

Step #3: Copy the newly generated kernel module to the correct place:
# cp bcmwl564_sys.ko /boot/modules/

Step #4: For some reason, loading the kernel module during the boot causes kernel panic for me, so just comment out old bwn modules and simply enable NDIS during the boot time at this step. In /boot/loader.conf:

ndis_load="YES" if_ndis_load="YES"

Step #5: Edit /etc/rc.conf to add interface, here is my example to connect to my Deneb home router at startup:

network_interfaces="ndis0" wlans_ndis0="wlan0" ifconfig_wlan0="mode 11g ssid Deneb WPA DHCP"

Note: Deneb is the SSID of my home router. Replace with whatever SSID you want to associate with on boot.

Step #6: Use kldload(8) to load the Broadcom kernel module during the boot in order to avoid kernel panic. For this, create /etc/start_if.ndis0 with the following contents:

mod="bcmwl564_sys" if ! kldstat -n $mod >/dev/null 2>&1; then kldload $mod fi

Step #7: For some reason dhclient(8) does not work with the wlan0 interface by default if I use the NDIS driver. This has been covered in a few topics on this forum and I do not see anybody resolving this so far, so I use a workaround. Add the following command to the /etc/rc.local:

This will start dhclient(8) during the boot. Don’t forget to configure your /etc/wpa_supplicant.conf normally like you would do with any other driver in case you are using WPA. I don’t use any special flags.

Here is ifconfig(8) showing wireless ndis0 and wlan0 interfaces after reboot:

ndis0: flags=8843 metric 0 mtu 2290 ether 00:26:82:f1:6b:5e nd6 options=29 media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated wlan0: flags=8843 metric 0 mtu 1500 ether 00:26:82:f1:6b:5e inet 192.168.100.103 netmask 0xffffff00 broadcast 192.168.100.255 nd6 options=29 media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g status: associated ssid Deneb channel 11 (2462 MHz 11g) bssid 00:1e:e5:46:26:e1 country US authmode WPA2/802.11i privacy OFF powersavemode CAM powersavesleep 100 txpower 0 bmiss 7 mcastrate 6 mgmtrate 6 scanvalid 60 protmode CTS roaming MANUAL bintval 0

Thanks

Reactions: sidetone , svincec , George and 5 others

Источник

Оцените статью
Adblock
detector