WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: wifi.sh says "no devices found" on piCore 9.0.3  (Read 1546 times)

Offline bonbonbaron

  • WikiUser
  • *
  • Posts: 22
wifi.sh says "no devices found" on piCore 9.0.3
« on: January 16, 2020, 06:47:42 AM »
Hi,

I followed the steps word-for-word listed at http://wiki.tinycorelinux.net/picore:pi_zero_w_wifi to get wifi on my Pi Zero W with piCore 9.0.3. There was a message when tce-loading wifi.tcz saying that mounting /dev/loop16 on /tmp/tcloop/wpa_supplicant failed with an invalid argument, but I had no idea where that was coming from. When I ran dmesg, it said something might be up with mmcblk0. Wifi.sh was nowhere to be found either. But I went ahead and added the firmware and wifi.tcz to onboot.lst anyway, and when I rebooted, there were no complaints in dmesg about mmcblkp0, and wifi.sh appeared to be working!

However, when I ran wifi.sh, it said, "No wifi devices found!" What could be the cause of that? The router's in my basement, and my Desktop (right next to my Pi) can find it just fine. It's not a signal strength thing is it? The steps in the link above say nothing about configuring anything else, so I'm at a loss. Any advice is appreciated.

Thanks in advance for your help,
Michael
Any thoughts? Thanks,

Michael

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7927
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #1 on: January 16, 2020, 08:14:00 AM »
Hi bonbonbaron
...  There was a message when tce-loading wifi.tcz saying that mounting /dev/loop16 on /tmp/tcloop/wpa_supplicant failed with an invalid argument, but I had no idea where that was coming from. ...
You may have a corrupted download. Try this:
Code: [Select]
cd /etc/sysconfig/tcedir/optional
md5sum -c wpa_supplicant.tcz.md5.txt

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 581
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #2 on: January 16, 2020, 07:09:32 PM »
Did you expand your partition?

Offline bonbonbaron

  • WikiUser
  • *
  • Posts: 22
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #3 on: January 16, 2020, 07:35:57 PM »
Did you expand your partition?
Yes, I expanded it to the default (max) value.
You may have a corrupted download. Try this:
Code: [Select]
cd /etc/sysconfig/tcedir/optional
md5sum -c wpa_supplicant.tcz.md5.txt
Thanks for the tip, but md5sum verified everything.

A friend suggested I try a more conventional OS like Raspbian to make sure my wireless card works. That's what I'll try next. I'm still open to ideas here though.

Offline bonbonbaron

  • WikiUser
  • *
  • Posts: 22
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #4 on: January 16, 2020, 08:59:16 PM »
A friend suggested I try a more conventional OS like Raspbian to make sure my wireless card works. That's what I'll try next. I'm still open to ideas here though.
Yep, WiFi works on Raspbian. Tomorrow I'll try piCore 9.0.1 instead.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12234
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #5 on: January 16, 2020, 09:32:58 PM »
Remember to check the last 20 lines of dmesg for errors if you get the "No wifi devices found" message again.

Offline bonbonbaron

  • WikiUser
  • *
  • Posts: 22
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #6 on: January 17, 2020, 05:38:56 AM »
I changed to piCore 9.0.1, used all the exact same TCZ files I used for 9.0.3 and it worked!!! Whoohoo!!! How do you know where the appropriate place to download TCZ files is?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7927
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #7 on: January 17, 2020, 05:58:00 AM »
Hi bonbonbaron
... How do you know where the appropriate place to download TCZ files is?
That is typically resolved by either  tce-load  or the  Apps  utility. There are no 9.01 or 9.03 repositories, only 9.x. The correct
repository is the one that matches your processor, either:
http://tinycorelinux.net/9.x/armv6/tcz
or:
http://tinycorelinux.net/9.x/armv7/tcz

Offline bonbonbaron

  • WikiUser
  • *
  • Posts: 22
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #8 on: January 18, 2020, 06:46:30 AM »
Gotcha. Well, at any rate it doesn't appear to work on 9.0.3. Wish I knew why.

Offline kissmurphy

  • WikiUser
  • *
  • Posts: 2
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #9 on: February 03, 2020, 11:49:12 PM »
Hi bonbonbaron and anyone else finding this thread,

Gotcha. Well, at any rate it doesn't appear to work on 9.0.3. Wish I knew why.

The instructions at newbielink:http://wiki.tinycorelinux.net/picore:pi_zero_w_wifi [nonactive] worked for me in getting the wifi up and running on my Pi Zero W.

In case there are different hardware version, on the back my Pi Zero W is printed:

Code: newbielink:javascript:void(0); [nonactive]
  Raspberry Pi Zero W V1.1
    "Copyright Symbol" Raspberry Pi 2017

My "tomato" router is set up with "WPA/WPA2 Personal" with "TKIP/AES" encryption, with a shared key. It's in automatic wireless mode (B/G) and there is a DHCP server available on the wifi network.

I opted to adjust the above procedure to follow the general wifi setup instructions here:

  Tiny Core Linux Wiki - Setting Up Wifi
  newbielink:http://wiki.tinycorelinux.net/wiki:setting_up_wifi [nonactive]

I wanted to avoid using the "wifi.sh" setup script as it created, and required, my wifi network passphrase, in plaintext, to reside in a file in the installing user's home directory, default "~/tc/". Rather, you can generate an /etc/wpa_supplicant.conf file containing a *hashed* version or your wifi passphrase using the command below. You can do this on the PiZeroW, or on your desktop linux box and copy the wpa_supplicant.conf file onto the sdcard for easy deployment to your PiZeroW. Note that being able to generate this file on another machine means that once obtained, anyone can use this file, along with the wpa_supplicant software to connected to your wifi network. So, you should still keep your PiZeroW physically secure, but at least the passphrase it not stored in plaintext.

Code: newbielink:javascript:void(0); [nonactive]
wpa_passphrase your_wifi_SSID your_plaintext_passphrase > wpa_supplicant.conf
The general procedure is to use the same piCore image placed onto your sdcard:

Code: newbielink:javascript:void(0); [nonactive]
wget -c -nv --show-progress http://www.tinycorelinux.net/9.x/armv6/releases/RPi/piCore-9.0.3.zip
but only the following TC Extensions are "essential" to get wifi up and running on the PiZeroW, at least with the piCore image above:

Code: newbielink:javascript:void(0); [nonactive]
firmware-rpi3-wireless
libnl
wireless-4.9.22-piCore
wpa_supplicant

Of course you may wish to load other handy TC extensions and although this could be done after wifi is up and running, if you have problems getting wifi up and running you may wish to include the "wireless_tools" TC Extension to help troubleshoot your wifi setup. Note that this extension depends on the libiw TC Extension so you will need to "pre-download" that to your sdcard too.

Download the ".tcz" ".tcz.md5.txt" files for the above mentioned TC Extensions from:

  newbielink:http://www.tinycorelinux.net/9.x/armv6/tcz/ [nonactive]

For example, for the wpa_supplicant TC Extension:

Code: newbielink:javascript:void(0); [nonactive]
wget -c http://www.tinycorelinux.net/9.x/armv6/tcz/wpa_supplicant/.tcz
wget -c http://www.tinycorelinux.net/9.x/armv6/tcz/wpa_supplicant.tcz.md5.txt

and place them onto the first partition of sdcard.

Note: On a text based machine with no networking it can save a lot of time, and typos, to have a working mouse installed so you can cut and paste commands from a file you prepared earlier and copied to the sdcard. The TC Extension gpm provides mouse support on a text console. However, it's not available in the 9.x repository, but it is available in the 7.x repository - and worked just fine for me - so you may wish so download it and copy it onto your sdcard's first partition along with the other TC extensions:

Code: newbielink:javascript:void(0); [nonactive]
wget -c http://www.tinycorelinux.net/7.x/armv6/tcz/gpm.tcz
wget -c http://www.tinycorelinux.net/7.x/armv6/tcz/gpm.tcz.md5.txt

Once the sdcard's second partition and the second partition's filesystem has been expanded, and your PiZeroW rebooted, copy these files to "/mnt/mmcblk0p2/tce/optional/", "cd" to that directory and install each of them with:

Code: newbielink:javascript:void(0); [nonactive]
tce-load -i TcExtensionName
With these TC extensions modules loaded the "lsmod" command shows the wifi chipset wifi modules:

Code: newbielink:javascript:void(0); [nonactive]
brcmfmac
brcmutil

have been loaded. With these modules loaded running the command:

Code: newbielink:javascript:void(0); [nonactive]
ifconfig -a
should now show you the wifi network interface wlan0. It's not been told how to configure itself yet so there will be no IP address.

Note: On my system not all, the TC extensions were added to the onboot.lst file automatically, and not because they were dependent on other TC extensions, so I put each of the above TCE Extension modules names into onboot.lst to ensure they are loaded at boot time. Maybe not the most efficient for a fast booting I know, but good to be going on with for now. For example:

Code: newbielink:javascript:void(0); [nonactive]
echo "TcExtensionName.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
Run the gpm software for a USB connected PS2 mouse on a PiZeroW using:

Code: newbielink:javascript:void(0); [nonactive]
gpm -m /dev/input/mouse0 -t imps2 -R
and to cause this command to run at each boot use:

Code: newbielink:javascript:void(0); [nonactive]
echo "gpm -m /dev/input/mouse0 -t imps2 -R" >> /opt/bootlocal.sh
To configure the wpa_supplicant software place the wpa_supplicant.conf file, which contains your wifi SSID and a hashed passphrase, into the /etc/ directory. To prevent the wpa_supplicant program complaining and failing to start set the file ownership and permissions:

Code: newbielink:javascript:void(0); [nonactive]
sudo cp wpa_supplicant.conf /etc/
sudo chown root.root /etc/wpa_supplicant.conf
sudo chmod 600 /etc/wpa_supplicant.conf
echo "etc/wpa_supplicant.conf" >> /opt/.filetool.lst

With the wifi software and wifi hardware support installed and wpa_supplicant program and it's config file set up wifi should be ready to go, provided it's configured correctly for your wifi network and your wifi network doesn't need to be prepared in any other way. Try to start wifi with the following commands. Note that you should *not* substitute your PiZeroW's hostname, just run the commands exactly as they appear below:

Code: newbielink:javascript:void(0); [nonactive]
sudo /usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
sudo /sbin/udhcpc -b -i wlan0 -x hostname $(hostname) -p /var/run/udhcpc.wlan0.pid

If it doesn't start but "ifconfig -a" shows you "wlan0" then the above two commands may need adjusting or the wpa_supplicant.conf file needs adjusting or something else on your wifi network needs to be changed or factored into this config. Perhaps you need to configure wpa_supplicant.conf to use a static IP address, hostname, routing and also set tell PiZeroW about DNS servers. And/Or perhaps you need to tell your wifi router about your PiZeroW's wifi mac address, which is in the output of "ifconfig -a". Anyways, the wireless-tools TCE Extension, mentioned above, and "ifconfig -a"  would probably be most helpful in debugging the issue.

Once your wifi is up and you know the above two commands, or your versions of them, are working to your satisfaction you can tell the system to run them at boot time with:

Code: newbielink:javascript:void(0); [nonactive]
echo "/usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf" >> /opt/bootlocal.sh
echo "/sbin/udhcpc -b -i wlan0 -x hostname $(hostname) -p /var/run/udhcpc.wlan0.pid" >> /opt/bootlocal.sh

I hope this helps.

Cheers!
Rob

    [EDIT]: Added code tags.  Rich
    [EDIT]: Last 4 commands adjusted as per reply #12.  Rich
« Last Edit: May 02, 2020, 05:45:29 AM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7927
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #10 on: February 04, 2020, 05:54:20 AM »
Hi kissmurphy
Welcome to the forum.

Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly.
« Last Edit: August 01, 2020, 10:21:59 AM by Rich »

Offline kissmurphy

  • WikiUser
  • *
  • Posts: 2
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #11 on: February 04, 2020, 01:25:58 PM »
Hi Rich,

Thanks you for your reply.

Welcome to the forum.

Please use  Code Tags  when posting commands and responses seen in a terminal. ...

And thanks for the welcome, the Code Tags tip and for fixing up my post, it looks much clearer and more "copy and pasteable" :D

Cheers!
Rob

Offline redFrik

  • Newbie
  • *
  • Posts: 3
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #12 on: May 02, 2020, 05:35:42 AM »
thank you kissmurphy for this very good guide.  it helped me set up internet access on a rpi0 using a tplink usb wifi adapter.

for anyone else reading this note that these two lines need sudo...

Code: newbielink:javascript:void(0); [nonactive]
sudo /usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
sudo /sbin/udhcpc -b -i wlan0 -x hostname $(hostname) -p /var/run/udhcpc.wlan0.pid

and these commands need to use append (double >>) to not overwrite the bootlocal.sh file.

Code: newbielink:javascript:void(0); [nonactive]
echo "/usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf" >> /opt/bootlocal.sh
echo "/sbin/udhcpc -b -i wlan0 -x hostname $(hostname) -p /var/run/udhcpc.wlan0.pid" >> /opt/bootlocal.sh

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7927
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #13 on: May 02, 2020, 05:48:48 AM »
Hi redFrik
Thanks for the heads up, especially the append vs. overwrite issue. Post adjusted.

Offline JovianPyx

  • Newbie
  • *
  • Posts: 2
Re: wifi.sh says "no devices found" on piCore 9.0.3
« Reply #14 on: June 15, 2020, 07:57:39 AM »
A friend suggested I try a more conventional OS like Raspbian to make sure my wireless card works. That's what I'll try next. I'm still open to ideas here though.
Yep, WiFi works on Raspbian. Tomorrow I'll try piCore 9.0.1 instead.

I had the same issue, no wifi device found using piCore 9.0.3.  I saw this post and tried 9.0.1 and it worked immediately.