WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: I don’t understand how to set up wifi  (Read 4496 times)

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15094
Re: I don’t understand how to set up wifi
« Reply #15 on: January 09, 2024, 04:55:59 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.

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

Offline heiheshang

  • Newbie
  • *
  • Posts: 24
Re: I don’t understand how to set up wifi
« Reply #16 on: January 09, 2024, 07:24:56 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.

Set the required extensions onboot and add the required commands to /opt/bootlocal.sh
how will this help me? How do you save the SSID and password in this file?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1368
Re: I don’t understand how to set up wifi
« Reply #17 on: January 09, 2024, 11:19:22 AM »
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.




Offline drak

  • Newbie
  • *
  • Posts: 1
Re: I don’t understand how to set up wifi
« Reply #18 on: Today at 09:42:00 AM »
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: [Select]
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
5. Mark them for autostart
Code: [Select]
    echo "firmware-rpi-wifi.tcz" >> onboot.lst
    echo "wifi.tcz" >> onboot.lst
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: [Select]
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

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: [Select]
CNT = 0
until [ -n "$WIFI" ]
do
        [ $((CNT++)) -gt 10 ] && break || sleep 1
        WIFI="$(iwconfig 2>/dev/null | awk '{if (NR==1)print $1}')"
done
is unable to set the variable WIFI to anything.

feels like the dirver is not started?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1368
Re: I don’t understand how to set up wifi
« Reply #19 on: Today at 11:37:04 AM »
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?