LicheeRV-Nano-Build icon indicating copy to clipboard operation
LicheeRV-Nano-Build copied to clipboard

File /opt/wifi.sh not found, mismatching with the setup guide

Open rodaciri opened this issue 1 year ago • 6 comments

Steps to Reproduce

  1. Followed the instructions in the WiFi setup guide at this section.
  2. After writing the ssid and password into the "/etc/wpa_supplicant.conf" file, I tried to run the command /opt/wifi.sh.
  3. But I got a "not found" message.
  4. Then, doing stat /opt/wifi.sh I confirmed that file doesnt exist.
  5. Finally I noticed the "/opt" directory is empty.

Additional Information

Please let me know if there is another way to set up the wifi. BTW for some reason internet connection via ETH is not working either.

rodaciri avatar Dec 21 '24 02:12 rodaciri

refer to this function did https://github.com/sipeed/MaixCDK/blob/04fa210e368ce0dfa3b7660b048bea41e94a3ebc/components/network/port/linux/maix_wifi.cpp#L445

Neutree avatar Dec 21 '24 14:12 Neutree

after editing /etc/wpa_supplicant.conf reboot

you can then ssh into the device over wifi

FreezyExp avatar Apr 09 '25 12:04 FreezyExp

Hi, I have the same problem and rebooting the device doesn't solve it. I have a Lichee RV Nano as well. @Neutree I don't understand your answer. What should I do with it ?

lesept777 avatar Apr 10 '25 17:04 lesept777

I created the files /boot/wifi.ssid and /boot/wifi.pass I executed /etc/init.d/S30wifi restart but not sure it worked. Here is what I get, and the console seems frozen

kill: you need to specify whom to kill kill: you need to specify whom to kill Your kernel has module support but you don't have modinfo installed. It is highly recommended to install modinfo (typically from kmod). Warning: driver detection without modinfo may yield inaccurate results.

Requested device "wlan0mon" does not exist. Run /usr/sbin/airmon-ng without any arguments to see available interfaces wifi mode: sta ssid: lesept wifi.pass: *** Successfully initialized wpa_supplicant nl80211: kernel reports: Registration to specific type not supported

udhcpc: started, v1.36.1

udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: broadcasting discover udhcpc: no lease, forking to background

Not sure what to do next...

lesept777 avatar Apr 10 '25 17:04 lesept777

your steps and log are all right, but just dhcp not got IP in some how

(maybe your AP encrypt method etc. you can set /boot/wifi.* files and reboot,

  • if connect AP successfully, maybe S30wifi have bug;
  • if also can't got IP, maybe AP's parameters not match, you can create your own /boot/wpa_supplicant.conf add more parameters and restart S30wifi or reboot.(wpa_supplicant.conf format follow standard linux wpa_supplicant's config file format)

Neutree avatar Apr 11 '25 08:04 Neutree

I found a way to connect the board to the Wifi. I seems that the /etc/wpa_supplicant.conf that is created is not correct, so I made a shell scruipt to correct this:

#!/bin/sh
# Create wifi connexion
killall wpa_supplicant
rm /etc/wpa_supplicant.conf
touch /etc/wpa_supplicant.conf
wpa_passphrase <ssid1> <pass_for_ssid1> > /etc/wpa_supplicant.conf
wpa_passphrase <ssid2> <pass_for_ssid2>  >> /etc/wpa_supplicant.conf
awk '!/#psk*/' /etc/wpa_supplicant.conf  > temp
rm /etc/wpa_supplicant.conf
mv temp /etc/wpa_supplicant.conf
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B

Executing this shell enables the board to connect to one of the listed wifi ssid. It can certainly be improved... I hope this helps

lesept777 avatar Apr 17 '25 10:04 lesept777