WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ifconfig not detecting wlan0  (Read 6348 times)

Offline anon136

  • Newbie
  • *
  • Posts: 2
ifconfig not detecting wlan0
« on: October 06, 2016, 10:11:38 PM »
I'm guessing this is because the drivers or the firmware aren't installed for the wireless adapter but I'm wondering the best way to resolve this. I'm using piCore-8.0 on a Raspberry Pi 3 B and I have no ability to connect to ethernet.

Please excuse if I say something stupid. I'm here to learn not because I understand all of this stuff already ;D.

Also is there a freenode channel that would have been appropriate to ask this question in?

Thanks so much to anyone who helps!
« Last Edit: October 06, 2016, 10:16:22 PM by anon136 »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: ifconfig not detecting wlan0
« Reply #1 on: October 06, 2016, 10:52:10 PM »
Hi anon136

Use  lsusb  (usbutils.tcz) or  lspci  (pci-utils.tcz) to check for wifi card model.
Use the "Apps" browser to search for respective firmware / drivers. F.e.  firmware-rtlwifi.tcz  or  wl-modules-4.2.9-tinycore.tcz .

On TC x86 also  iw.tcz  and  wifi.tcz  are needed.

Community gatherings on Freenode at #tinycorelinux (webchat)
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: ifconfig not detecting wlan0
« Reply #2 on: October 06, 2016, 10:54:33 PM »
irc://irc.freenode.net/tinycorelinux
Download a copy and keep it handy: Core book ;)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: ifconfig not detecting wlan0
« Reply #3 on: October 07, 2016, 02:53:13 AM »

Use  lsusb  (usbutils.tcz) or  lspci  (pci-utils.tcz) to check for wifi card model.

There is no PCI in RPi.

Install the wireless kernel module tcz on boot and check lsusb and dmesg for missing components.
« Last Edit: October 07, 2016, 02:55:12 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline anon136

  • Newbie
  • *
  • Posts: 2
Re: ifconfig not detecting wlan0
« Reply #4 on: October 08, 2016, 02:27:07 PM »
Thanks bmarkus. I assume you mean this tinycorelinux.net/3.x/tcz/src/compat-wireless/ since its the only thing in the entire repo with wireless in the name.
« Last Edit: October 08, 2016, 02:29:30 PM by anon136 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11515
Re: ifconfig not detecting wlan0
« Reply #5 on: October 08, 2016, 03:36:18 PM »
Hi anon136
I think bmarkus may have been referring to:
http://tinycorelinux.net/8.x/armv6/tcz/wireless-4.4.20-piCore+.tcz

Offline corezoo

  • Newbie
  • *
  • Posts: 33
Re: ifconfig not detecting wlan0
« Reply #6 on: October 22, 2016, 07:59:54 AM »
PiCore WIFI without a wired connection on a RPI3

This was done with piCore 7.1beta4 but it should be similar to piCore 8.0
The differences being the firmware was updated and the kernel modules
need to match the kernel in use. Unless something else changed since then.
Download the .tcz, .md5.txt, and .dep (if it exists) files and put them on a
USB stick for transport.

Needed files include:

firmware-brcmfmac43430  for 7.1b4
firmware-rpi-wireless for 8.0

wireless-4.1.20-piCore_v7+ for 7.1b4
wireless-4.4.20-piCore+ for 8.0

libiw
libnl
readline
wireless_tools
wpa_supplicant
wifi
openssl*
ncurses*
*The files and deps for openssl and ncurses are included in the piCore image.

Boot the Pi, plug in the USB stick, it should be recognized as sda or similar.
Type: sudo mount /dev/sda1 /mnt/sda1
The files should now be accessible at /mnt/sda1
Copy all the files to /mnt/mmcblk0p2/tce/optional

Edit the /mnt/mmcblk0p2/tce/onboot.lst file to include:
firmware-brcmfmac43430.tcz or firmware-rpi-wireless.tcz depending on the
piCore image in use and wifi.tcz.
The wifi.tcz will load all the deps required in the .dep files.

Unmount and remove the USB stick    type: sudo umount /dev/sda1
Shut down the PI   type: sudo poweroff
wait for the green LED to stop blinking, then remove and reinstall the power
supply to reboot.

Check to see if the wifi adapter is found   type: iwconfig
A wlan0 listing should be shown

To connect type: sudo wifi.sh
This will run the /usr/local/bin/wifi.sh script and will list available access points.
In this instance WPA is not in use and the connection is made to an open AP.
More configuring would be needed for passwords.

Download sites:
For v8.0
http://distro.ibiblio.org/tinycorelinux/8.x/armv6/tcz/

For v7.1b4
http://distro.ibiblio.org/tinycorelinux/8.x/armv6/tcz/


Hope this is helpful.

Offline mzdaniel

  • Newbie
  • *
  • Posts: 2
Re: ifconfig not detecting wlan0
« Reply #7 on: February 08, 2017, 11:17:44 PM »
@corezoo: thank you for your detailed list of things to watch for.
Here is what I found using PiCore v1.8.5 and RPI3:

wireless_tools.tcz.dep shows wireless-KERNEL.tcz, so I had to rename
wireless-4.4.39-piCore+.tcz to wireless-4.4.39-piCore_v7+.tcz for it
to load.

And finally:
$ modprobe brcmfmac
modprobe: can't load module brcmfmac (brcmfmac.ko): invalid module format
and  dmesg shows "brcmfmac: disagrees about version of symbol module_layout"

I tried also using an Edimax USB wifi adapter (Realtek RTL8188CUS), adding
firmware-rtlwifi.tcz to onboot.

$ mount
/dev/loop2 on /tmp/tcloop/firmware-rpi3-wireless type squashfs (ro,relatime)                                                 
/dev/loop3 on /tmp/tcloop/firmware-rtlwifi type squashfs (ro,relatime)
/dev/loop19 on /tmp/tcloop/wireless-4.4.39-piCore_v7+ type squashfs (ro,relatime)                                           

dmesg reports the USB adapter:
[ 1212.380383] usb 1-1.4: new high-speed USB device number 4 using dwc_otg                                                   
[ 1212.481753] usb 1-1.4: New USB device found, idVendor=7392, idProduct=7811                                               
[ 1212.481770] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3                                           
[ 1212.481783] usb 1-1.4: Product: 802.11n WLAN Adapter                                                                     
[ 1212.481795] usb 1-1.4: Manufacturer: Realtek     

but still no sign how to make wifi work. 

$ iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.


@bmarkus: Thank you so much for making this wonderful distro available.
I'm happy to help with testing efforts.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: ifconfig not detecting wlan0
« Reply #8 on: February 10, 2017, 08:06:42 PM »
Renaming wireless-4.4.39-piCore+.tcz won't work.
Get the correct one here:
http://tinycorelinux.net/8.x/armv7/tcz/wireless-4.4.39-piCore_v7+.tcz
Download a copy and keep it handy: Core book ;)

Offline mzdaniel

  • Newbie
  • *
  • Posts: 2
Re: ifconfig not detecting wlan0
« Reply #9 on: February 12, 2017, 02:52:42 AM »
Sure that made it work. Thank you Misalf for the reference.

Offline corezoo

  • Newbie
  • *
  • Posts: 33
Re: ifconfig not detecting wlan0
« Reply #10 on: February 27, 2017, 08:43:55 PM »
mzdaniel

Sorry for being so late to respond, thank you for the thank you (;-) I tried to be detailed without insulting peoples intelligence, not sure if I succeeded on the latter.

I really like the system that RobertS has developed and I am trying to learn as much as I can but have a long way to go still. Forgive me if I post something erroneous and please correct me when I am wrong.

It seems you have the wireless-4.4.39-piCore_v7+.tcz issue worked out using the modules compiled for this, the running kernel.

Now this part;

I tried also using an Edimax USB wifi adapter (Realtek RTL8188CUS), adding
firmware-rtlwifi.tcz to onboot.

I am guessing that since dmesg didn’t complain about any missing firmware that is correct.

But, and you may have already have done this.

If you look in wireless-4.4.39-piCore_v7+.tcz, I use Archive Manager on my desktop system, or look in the directories on the running piCore system;
/usr/local/lib/modules/4.4.39-piCore+/kernel/drivers/net/wireless/realtek/rtl818x/
/usr/local/lib/modules/4.4.39-piCore+/kernel/drivers/staging/rtl8188eu/

The modules for your hardware are not included and you will need to find and install those drivers.

That should get that wifi adapter working.
I use an atheros ath9k_htc usb adapter that I have to get the firmware for but the modules are included in the wireless-4.4.39-piCore_v7+.tcz and it works well.

I am also thankful for all the work bmarkus and friends put into this project.

Hope this is helpful.