Tiny Core Linux

Tiny Core Base => CorePlus => Topic started by: evertvaningen on June 12, 2017, 12:03:25 PM

Title: BCM43228 Not showing up.
Post by: evertvaningen on June 12, 2017, 12:03:25 PM
I am trying to install the BCM43228 WiFi adapter on a HP Thin Client T510.

Installed the WL modules
I need to blacklist the bcma, ssb and b43 modules for this to work.

I tried editing the /etc/modprobe.conf by adding

blacklist ssb
blacklist bcma
blacklist b43

after reboot the changes are gone, I am new to Tiny Core and are confused  :-[ all the time so bare with me here.

I cant use F2 F3 F4 at boot prompt to edit the bootcode because it is installed on a 1GB Flash IDE?

I just want to use this Thin Client as a online radio. Ifconfig and iwconfig tells me there is no Wlan0... lspci tell me there is one...

Click WiFi icon below... Green Sudo cursor appears and then nothing.

sudo wicd-start "command not found" <- Wicd is installed


I don't know what i'm doing and are at loss here.
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 12, 2017, 12:24:48 PM
Welcome evertvaningen

To blacklist any module simply add the modules to the boot config file

Append this boot code to the boot conf file
blacklist=b43,ssb,bcma

Note: boot config file location depends on how you installed tinycore to a USB thumbdrive.  Most likely "extlinux.conf" will be located iin /tce/boot.      If lost, then use the find utility from the terminal to find all config files
Code: [Select]
sudo find / -iname "*conf"
I suggest reading the core  book for valuable insight to core fundamentals
http://tinycorelinux.net/book.html (http://tinycorelinux.net/book.html)



If you have an Ethernet connection available, you wouldn't need to blacklist the b43 modules, but you would need to cut the firmware from Broadcom's own drivers.  Using firmware-getb43 extension simplifies that task and creates the required firmware extension for you


I strongly recommend the wifi.tcz (extension) over any other wifi connection app.   Honestly I've tried wicd but have always returned to using wifi.tcz extension for long term use.  It's up to you, there are many options.

For wifi,  all that is needed is
wifi.tcz
any modules specific to the hardware
and firmware-(foryourhardware).tcz

 
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 12, 2017, 12:46:34 PM
Thank you for your reply.


I looked in http://tinycorelinux.net/book.html
What is the location of the Boot config file?
sorry i was late adding that info to my last post
Title: Re: BCM43228 Not showing up.
Post by: polikuo on June 12, 2017, 12:48:04 PM
I looked in http://tinycorelinux.net/book.html
What is the location of the Boot config file?

If you installed with tc-install extension.
The default route is /etc/sysconfig/tcedir/boot/extlinux/extlinux.conf
Or /mnt/your_disk/boot if you choosed vfat as your filesystem.
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 12, 2017, 12:55:57 PM
Append this boot code to the boot conf file
blacklist=b43,ssb,bcma

to /etc/sysconfig/tcedir/boot/extlinux/extlinux.conf


.... black screen on boot... second boot no problem :P


It worked! Eth1 was added to Iwconfig
Title: Re: BCM43228 Not showing up.
Post by: polikuo on June 12, 2017, 12:58:32 PM
You probably append in a wrong way.
Please post the full text so that we can help.
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 12, 2017, 01:07:14 PM
hello
Quote
/etc/sysconfig/tcedir/boot/extlinux/extlinux.conf
the above is a symlink,  where the real path is likely
Code: [Select]
/tce/boot/extlinux/extlinux.conf

Quote
It worked! Eth1 was added to Iwconfig
Yeah this happens with Broadcom devices a lot,  there is a fix for the issue around here somewhere...
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 12, 2017, 01:10:50 PM
How can I make it auto connect on Boot?

I found this solution but jeez, isn't there a simpler way to do that?
http://wiki.tinycorelinux.net/wiki:setting_up_wifi?rev=1323363219

sudo wicd-start is not working for me "command not found"
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 12, 2017, 01:38:22 PM
How can I make it auto connect on Boot?

I found this solution but jeez, isn't there a simpler way to do that?
http://wiki.tinycorelinux.net/wiki:setting_up_wifi?rev=1323363219

sudo wicd-start is not working for me "command not found"

No idea about wicd as stated before.  but the extension info file should provide more detail.   eg: wifi.tcz.info suggests adding this command to /opt/bootlocal or /opt/bootsync for quick auto connect
Code: [Select]
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log
Title: Re: BCM43228 Not showing up.
Post by: Misalf on June 12, 2017, 03:23:20 PM
Quote
It worked! Eth1 was added to Iwconfig
Yeah this happens with Broadcom devices a lot,  there is a fix for the issue around here somewhere...

/opt/bootlocal.sh
Code: [Select]
# Rename wifi eth* to wlan*.
IFNUM=0
for i in /sys/class/net/eth* ; do
   if [ -d $i/wireless ]; then
      [ -e /sys/class/net/wlan${IFNUM} ] && IFNUM=$((IFNUM+1))
      nameif wlan${IFNUM} $(cat $i/address)
      IFNUM=$((IFNUM+1))
   fi
done
wifi.sh -a &
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 16, 2017, 01:53:06 PM
I moved the device to the location it needs to be and from there I let it connect to the same Wifi.
Auto connecting is really bad for some reason.

Most of the time I need to connect manually and still it failed to connect the qual is 62 so pretty good.

Sometimes it doesn't auto connect at all :s
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 16, 2017, 02:17:50 PM
Maybe you'ld have better luck removing the broadcom kernel driver from the blacklist and get the official firmware direct from broadcom, use Using firmware-getb43 extension to help get that.

Or simply get an other USB wifi device..?
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 16, 2017, 02:32:32 PM
Maybe you'ld have better luck removing the broadcom kernel driver from the blacklist and get the official firmware direct from broadcom, use Using firmware-getb43 extension to help get that.

Or simply get an other USB wifi device..?

I did what you told me but still not auto connecting.

Sometimes it connects and sometimes it doesn't...
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 16, 2017, 02:40:06 PM
Please explain what did you do,  use the official modules or use another USB wifi adapter..?   how are you trying to auto connect?  what commands? or show us the script?  what errors did you receive?


Sadly we can't help if we have no information to go off.. 
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 16, 2017, 03:22:43 PM
Auto connect to Wifi

Edit the bootlocal file to attempt connection at boot time (optional)
    $ nano /opt/bootlocal.sh
       /usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

So it looks like:
#!/bin/sh
# put other system startup commands here
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Finally be sure to backup before poweroff or reboot.
    $ sudo backup
    $ sudo poweroff

It worked every time in my room next to the WiFi but in the kitchen it doesn't work anymore.
No USB WiFi dongle used and I used the firmware-getb43 extension + removed the b43 from blacklist.

The Broadcom detects a signal of 62 from the Wifi so the signal is good.
The HP T510 has 2 antennas.

The connection is made automatically if it succeeds... if it doesn't... then nothing. When I use the wifi extension is only tells me connection is made or connection failed... If it fails is there a way to see why it failed?
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 16, 2017, 05:14:00 PM
Quote
If it fails is there a way to see why it failed?
Since all output of wifi.sh -a  was redirected to " /tmp/wifi.log " then I'd start by looking there
Code: [Select]
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.logthe " > " redirects output and overwrites any previous output to wherever specified, otherwise output goes to the terminal

You should always check dmesg for hint's
At the command line enter
Code: [Select]
dmesg
Title: Re: BCM43228 Not showing up.
Post by: patrikg on June 16, 2017, 05:18:16 PM
And why not just add > that will append to the file.

Code: (bash) [Select]
/usr/local/bin/wifi.sh -a 2>&1 >> /tmp/wifi.log
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 16, 2017, 05:33:01 PM
Quote
If it fails is there a way to see why it failed?
Since all output of wifi.sh -a  was redirected to " /tmp/wifi.log " then I'd start by looking there
Code: [Select]
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.logthe " > " redirects output and overwrites any previous output to wherever specified, otherwise output goes to the terminal

You should always check dmesg for hint's
At the command line enter
Code: [Select]
dmesg

Wifi.log
Found wifi device eth1
Standby for scan of available network...
Set to try a few times to obtain a lease.
Attempting auto connection with Chateau
.....

As for dmesg, I dont know what I'm looking for.

wl: loading out-of-tree module taints kernel.
wl: module license 'Mixed/Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
eth1: Broadcom BCM4359 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
longhaul: Option "enable" not set - Aborting


Hmm.. interesting

WARNING: CPU: 1 PID: 6 at net/wireless/sme.c:738 0xf8b80c91
Modules linked in: cpufreq_userspace cpufreq_conservative cpufreq_powersave wl(PO) ns558 gameport snd_hda_codec_via snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore cfg80211 ppdev parport_pc parport ac fjes squashfs loop broadcom bcm_phy_lib tg3 pcspkr acpi_cpufreq ptp pps_core serio_raw
CPU: 1 PID: 6 Comm: kworker/u4:0 Tainted: P           O    4.8.17-tinycore #2017
Hardware name: Hewlett-Packard HP t510 Thin Client/158Ch, BIOS 786R11 v1.03 04/18/2012
Workqueue: cfg80211 0xf8b67028
 00000097 c02ef4e6 00000000 00000000 c013e345 00000009 000002e2 f3ef4800
 00000000 f5c79ecc f561de0c c013e3c4 00000009 00000000 00000000 f8b80c91
 f5570000 014a0cc0 f561de2c 9ff20001 42d438c2 00000000 00000000 f561de00
Call Trace:
 [<c02ef4e6>] ? 0xc02ef4e6
 [<c013e345>] ? 0xc013e345
 [<c013e3c4>] ? 0xc013e3c4
 [<f8b80c91>] ? 0xf8b80c91
 [<f8b6a66f>] ? 0xf8b6a66f
 [<f8b6a751>] ? 0xf8b6a751
 [<f8b6703b>] ? 0xf8b6703b
 [<c014d1eb>] ? 0xc014d1eb
 [<c014d690>] ? 0xc014d690
 [<c014d4f1>] ? 0xc014d4f1
 [<c01505b9>] ? 0xc01505b9
 [<c058e3ae>] ? 0xc058e3ae
 [<c015053d>] ? 0xc015053d
---[ end trace 8075d8f84ecca1ea ]---
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 16, 2017, 06:14:20 PM
And why not just add > that will append to the file.

Code: (bash) [Select]
/usr/local/bin/wifi.sh -a 2>&1 >> /tmp/wifi.log
Hi Patrick,
I think the intent was to write once, since the error would be the same each event and only repeat itself..
Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 16, 2017, 06:40:38 PM
Quote
As for dmesg, I dont know what I'm looking for.
You can scroll to the end of the screen for the connection errors

Ok try to get the last 10 or 20 lines (or 50 lines if needed)
Code: [Select]
dmesg | tail -10
Also use Misalf's suggestion to change eth0 to wlan0

Also check to see if any conflicting modules are loaded accidentally:
Code: [Select]
lsmod | grep "brcmsmac\|ssb\|wl\|b43\|bcma"
Also post the output of
Code: [Select]
lspci -vnn -d 14e4:
Then post the outputs so we can help.

Please enclose the output in code tags to make it easier to read thanks
select the text and click the insert code button above.


FYI  http://linuxwireless.org/en/users/Drivers/b43/ (http://linuxwireless.org/en/users/Drivers/b43/)

Title: Re: BCM43228 Not showing up.
Post by: coreplayer2 on June 16, 2017, 07:17:15 PM
the wl drivers appear to be the latest, but you can always try the b43 (if it supports your card) and latest firmware to see if that makes a difference..
Title: Re: BCM43228 Not showing up.
Post by: patrikg on June 17, 2017, 02:43:42 AM
OK, my bad. Sorry for confusing.
Title: Re: BCM43228 Not showing up.
Post by: evertvaningen on June 17, 2017, 09:41:30 AM
tc@box:~$ dmesg | tail -20
snd_hda_codec_via hdaudioC0D0:      Mic=0x1a
wl: loading out-of-tree module taints kernel.
wl: module license 'Mixed/Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
eth1: Broadcom BCM4359 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
floppy0: no floppy controllers found
work still pending
usb 4-2: new low-speed USB device number 2 using uhci_hcd
input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/0003:046D:C077.0001/input/input7
hid-generic 0003:046D:C077.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:10.2-2/input0
longhaul: Option "enable" not set - Aborting
floppy0: no floppy controllers found
tg3 0000:05:00.0 eth0: Link is down
floppy0: no floppy controllers found
work still pending
usb 4-1: new low-speed USB device number 3 using uhci_hcd
input: Trust Keyboard as /devices/pci0000:00/0000:00:10.2/usb4/4-1/4-1:1.0/0003:145F:0176.0002/input/input8
hid-generic 0003:145F:0176.0002: input,hidraw1: USB HID v1.11 Keyboard [Trust Keyboard] on usb-0000:00:10.2-1/input0
input: Trust Keyboard as /devices/pci0000:00/0000:00:10.2/usb4/4-1/4-1:1.1/0003:145F:0176.0003/input/input9
hid-generic 0003:145F:0176.0003: input,hidraw2: USB HID v1.11 Device [Trust Keyboard] on usb-0000:00:10.2-1/input1

tc@box:~$ lsmod | grep "brcmsmac\|ssb\|wl\|b43\|bcma"
wl                   6025216  0
cfg80211              139264  1 wl

tc@box:~$ lspci -vnn -d 14e4:
02:00.0 Class [0280]: Device [14e4:4359]
   Subsystem: Device [103c:182c]
   Flags: bus master, fast devsel, latency 0, IRQ 34
   Memory at fdffc000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>
   Kernel driver in use: wl

05:00.0 Class [0200]: Device [14e4:1692] (rev 01)
   Subsystem: Device [14e4:9692]
   Flags: bus master, fast devsel, latency 0, IRQ 35
   Memory at febf0000 (64-bit, non-prefetchable) [size=64K]
   Capabilities: <access denied>
   Kernel driver in use: tg3

Quote
/opt/bootlocal.sh

# Rename wifi eth* to wlan*.
IFNUM=0
for i in /sys/class/net/eth* ; do
   if [ -d $i/wireless ]; then
      [ -e /sys/class/net/wlan${IFNUM} ] && IFNUM=$((IFNUM+1))
      nameif wlan${IFNUM} $(cat $i/address)
      IFNUM=$((IFNUM+1))
   fi
done
wifi.sh -a &

I'll try that later. I guess eth* = eth1 and wlan* = wlan0
Title: Re: BCM43228 Not showing up.
Post by: Misalf on June 17, 2017, 10:15:39 AM
I guess eth* = eth1 and wlan* = wlan0
In your case, yes.
The asterisk is a placeholder for any character, so all ethernet devices from 0 to 9 will be checked if they are actually wifi devices and renamed accordingly to wlanX, where X is the next free number (well, kind of. There could be another loop added to make the numbering more reliable but that shouldn't matter for you now).
Title: Re: BCM43228 Not showing up.
Post by: Misalf on June 17, 2017, 10:28:05 AM
BTW, you may want to use code tags when you post the output of commands to make it easier to read
[ code ]blah blah[ /code ]
(without the spaces inside the brackets).