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
http://wiki.tinycorelinux.net/picore:pi_zero_w_wifi 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:
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
http://wiki.tinycorelinux.net/wiki:setting_up_wifiI 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.
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:
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:
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:
http://www.tinycorelinux.net/9.x/armv6/tcz/For example, for the wpa_supplicant TC Extension:
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:
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:
tce-load -i TcExtensionName
With these TC extensions modules loaded the "lsmod" command shows the wifi chipset wifi modules:
brcmfmac
brcmutil
have been loaded. With these modules loaded running the command:
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:
echo "TcExtensionName.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
Run the gpm software for a USB connected PS2 mouse on a PiZeroW using:
gpm -m /dev/input/mouse0 -t imps2 -R
and to cause this command to run at each boot use:
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:
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:
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:
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