Tiny Core Base > Raspberry Pi

I don’t understand how to set up wifi

<< < (4/5) > >>

Juanito:

--- Quote from: heiheshang on January 09, 2024, 02:51:17 AM ---my question is not how to turn on wifi, but how to do it on the sd card, and not on the device itself. All recipes work if you are connected to the device.

--- End quote ---

Set the required extensions onboot and add the required commands to /opt/bootlocal.sh

heiheshang:

--- Quote from: Juanito on January 09, 2024, 04:55:59 AM ---
--- Quote from: heiheshang on January 09, 2024, 02:51:17 AM ---my question is not how to turn on wifi, but how to do it on the sd card, and not on the device itself. All recipes work if you are connected to the device.

--- End quote ---

Set the required extensions onboot and add the required commands to /opt/bootlocal.sh

--- End quote ---
how will this help me? How do you save the SSID and password in this file?

Paul_123:
I'm sure language is a bit of a barrier, but you need to understand, that what you are asking is not possible.

Wifi needs to be configured from a local ssh session.  Either with a keyboard/monitor, or using a ethernet cable.



drak:
so, I tried to do this as well.
Its possible BTW, picoreplayer is based on ipCore and has it documented: https://docs.picoreplayer.org/how-to/setup_wifi_on_pcp_without_ethernet/
However, I don't want picoreplayer but piCore.

Here is what I did:
1. wget http://www.tinycorelinux.net/14.x/armv6/releases/RPi/piCore-14.1.0.zip
2. unzip and flash the image
3. on the second partition, go into `tce/optional`
4. Download the firmware and WiFi extensions with all dependencies

--- Code: ---for pkg in $(string trim $(wget -qO - http://www.tinycorelinux.net/14.x/armv6/tcz/wifi.tcz.tree)); for f in $pkg{,.dep,.md5.txt}; wget "http://www.tinycorelinux.net/14.x/armv6/tcz/$f"; end;end
for f in firmware-rpi-wifi.tcz{,.dep,.md5.txt}; wget "http://www.tinycorelinux.net/14.x/armv6/tcz/$f"; end
--- End code ---
5. Mark them for autostart

--- Code: ---    echo "firmware-rpi-wifi.tcz" >> onboot.lst
    echo "wifi.tcz" >> onboot.lst
--- End code ---
6. I first added my wpa_supplicant.conf to the `mydata.tgz` and modified the contained `bootlocal.sh`, however this did not work,
so I added the bootcode `opt=mmcblk0p2` and created an `opt` directory on mmcblk0p2.
7. I did what `wifi.sh -aw` does in `bootlocal.sh`:

--- Code: ---wpa_supplicant -iwlan0 -c/opt/wpa_supplicant.conf -B  -Dnl80211,wext >/dev/null 2>&1
udhcpc -i wlan0 -x hostname:your_hostname 2>/dev/null
--- End code ---

This did not work, so I read picoreplayer startup.
In the end they do the same but also start the if `ifconfig $INTERFACE up`
and add more firmware (atheros, brcmwifi, mediatek, ralinkwifi, rtlwifi).

I did some print debuging by piping output to /opt/output.txt and can see that `ifconfig wlan0 up` gives me "No such device"
as does udhcpc.
iwconfig lists nothing, and the wait loop from wifi.sh

--- Code: ---CNT = 0
until [ -n "$WIFI" ]
do
        [ $((CNT++)) -gt 10 ] && break || sleep 1
        WIFI="$(iwconfig 2>/dev/null | awk '{if (NR==1)print $1}')"
done

--- End code ---
is unable to set the variable WIFI to anything.

feels like the dirver is not started?

Paul_123:
What board do you have?    Make sure you have the the package wireless-KERNEL.tcz  where KERNEL matches the output of `uname -r`

run dmesg.  Does it show the wifi drivers loading?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version