Tiny Core Base > Raspberry Pi
Help with piCore15 and wifi.sh
Paul_123:
Now that I'm at home looking at whats going on, its more likely related to the tty.
What is your connection to the pi. keyboard, ssh?
Rich:
Hi Paul_123
I don't know if this is of interest to you. Last February someone
reported an issue involving ESSID containing an ampersand:
https://forum.tinycorelinux.net/index.php/topic,26819.0.html
I worked out some changes to handle certain troublesome
characters in reply #18. I don't know if any of them were
incorporated. Maybe they are of some interest?
Paul_123:
I don’t use wifi.sh, nor do I have time to test every combination of odd characters. Not sure who is the official maintainer, or if it’s in the TC git somewhere, but I would just implement the changes you suggested, and see what shakes out next
gadget42:
searched DDG for "tcgetattr: Inappropriate ioctl for device"
and read these:
https://unix.stackexchange.com/questions/417362/concalc-tcsetattr-error-inappropriate-ioctl-for-device
https://unix.stackexchange.com/questions/82658/bash-script-error-stty-standard-input-inappropriate-ioctl-for-device
given TCL14x worked, but TCL15x fails, could this be a change in busybox?
(tcl14=busybox_1.36.0 and tcl15=busybox_1.36.1)
timbee:
The error comes from this line
--- Quote ---system("wpa_passphrase " s " < " ptmp " > /etc/wpa_supplicant.conf")
--- End quote ---
It appears that wpa_passphrase no longer accepts input redirected from a file.
the solution that seems to work is to have the password as a command line argument
--- Quote ---system("wpa_passphrase " s " " p " > /etc/wpa_supplicant.conf")
--- End quote ---
the line creating the temporary file can be deleted
--- Quote ------ /usr/local/bin/wifi.sh
+++ wifi.sh
@@ -106,13 +106,12 @@
}
function associate(t,d,s,p,c) {
- print p > ptmp
keyphrase=" key restricted "
if ( p == "" ) { keyphrase = "" }
selchannel=" channel "
if ( c == "" ) { selchannel = "" }
if (t == "WPA") {
- system("wpa_passphrase " s " < " ptmp " > /etc/wpa_supplicant.conf")
+ system("wpa_passphrase " s " " p " > /etc/wpa_supplicant.conf")
system("wpa_supplicant -i " d " -c /etc/wpa_supplicant.conf -B -D $WPADRV >/dev/null 2>&1")
} else {
system("iwconfig " d " essid " s keyphrase p selchannel c)
--- End quote ---
Warning this appears to work in my case but it has not had any testing other than my home WPA network.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version