WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCore64 14.0 wifi.sh failures  (Read 1415 times)

Offline jim

  • Newbie
  • *
  • Posts: 15
TinyCore64 14.0 wifi.sh failures
« on: February 17, 2024, 10:58:20 AM »
Wifi.sh:
ESSID:"Baymont Inn & Suites"
sh:  Suites: Input/output error
Failed to connect.

Offline jim

  • Newbie
  • *
  • Posts: 15
Re: TinyCore64 14.0 wifi.sh failures
« Reply #1 on: February 17, 2024, 11:00:36 AM »
Hard to debug.
Laptop reboots if wifi is reconfigured
Posting more gets internal server error.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: TinyCore64 14.0 wifi.sh failures
« Reply #2 on: February 17, 2024, 01:46:08 PM »
Maybe bad char "&" at ssid or password.

I think you can search about wifi.sh in this forum to investigate to have bad char in the ssid.

Search
« Last Edit: February 17, 2024, 01:48:12 PM by patrikg »

Offline jim

  • Newbie
  • *
  • Posts: 15
Re: TinyCore64 14.0 wifi.sh failures
« Reply #3 on: February 17, 2024, 06:32:19 PM »
Yes, I expect that it is a problem with '&' not being quoted or escaped correctly.

My search skills have not found much that is close yet.

No password, there is a landing page to click through though.

It appears to not produce much help with set -x, I think it is running in awk when it dies.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11221
Re: TinyCore64 14.0 wifi.sh failures
« Reply #4 on: February 17, 2024, 08:40:26 PM »
Hi jim
I set the wireless SSID on my router to:
Code: [Select]
Baymont Inn & Suitesand got the same error.

I removed the ampersand and connected. Then I looked
at  wifi.db  in my home directory and the last entry was:
Code: [Select]
Baymont\ Inn\ Suites PASSWORD WPASo the script is escaping the blank spaces. So I set the
first entry in  wifi.db  to:
Code: [Select]
Baymont\ Inn\ \&\ Suites PASSWORD WPABut even with the ampersand escaped I got the following result:
Code: [Select]
tc@box:~$ sudo wifi.sh -a
Found wifi device wlan0
Standby for scan of available networks...
Set to try a few times to obtain a lease.
Attempting auto connection with Baymont\ Inn\ \&\ Suites
Error for wireless request "Set ESSID" (8B1A) :
    too few arguments.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11221
Re: TinyCore64 14.0 wifi.sh failures
« Reply #5 on: February 17, 2024, 09:21:45 PM »
Hi jim
I did a little more digging. This worked:
Code: [Select]
tc@box:~$ wpa_passphrase "Baymont Inn & Suites" PASSWORD | sudo tee -a /etc/wpa_supplicant.conf
network={
        ssid="Baymont Inn & Suites"
        #psk="PASSWORD"
        psk=66e49fe73d49ee76ac368db3afcdd2b52f0634127b5c257b907f8efaa72e9367
}
tc@box:~$ sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
tc@box:~$ iwconfig
lo        no wireless extensions.

dummy0    no wireless extensions.

tunl0     no wireless extensions.

wlan0     IEEE 802.11  ESSID:"Baymont Inn & Suites" 
          Mode:Managed  Frequency:2.462 GHz  Access Point: 54:B7:BD:DC:32:76   
          Bit Rate=1 Mb/s   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=48/70  Signal level=-62 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:1   Missed beacon:0

eth0      no wireless extensions.

tc@box:~$

So my guess is something in wifi.sh is tripping on the ampersand.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11221
Re: TinyCore64 14.0 wifi.sh failures
« Reply #6 on: February 18, 2024, 06:58:25 AM »
Hi jim
The following 2 changes fix it.

Change this:
Code: [Select]
gsub(" ","\\ ",sid[i])To this:
Code: [Select]
gsub(" ","\\ ",sid[i])
gsub("&","\\\\&",sid[i])

Change this:
Code: [Select]
gsub(" ","\\ ",sid[selection])To this:
Code: [Select]
gsub(" ","\\ ",sid[selection])
gsub("&","\\\\&",sid[selection])

Makes me wonder what other legal characters can cause trouble.

    [Edit]: Fixed typo. Changed sid[ i] to sid[selection] in last line.  Rich
« Last Edit: February 18, 2024, 09:05:34 PM by Rich »

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: TinyCore64 14.0 wifi.sh failures
« Reply #7 on: February 18, 2024, 07:28:06 AM »
"Illegal" characters for a network ID are: ?  "  $  [  \  ]  + so these should be ignore-able
I would ESTIMATE problems MAY exist with * % @ = / depending on the circumstance, platform and operating system.
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: TinyCore64 14.0 wifi.sh failures
« Reply #8 on: February 18, 2024, 07:59:16 AM »
ADDN: ...and possibly `ticks and 'single-quotes'??
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11221
Re: TinyCore64 14.0 wifi.sh failures
« Reply #9 on: February 18, 2024, 08:07:40 AM »
Hi CentralWare
So I guess the question is, how many of those should
we allow for?
Space: The average user wants to insert field separators in names.
Ampersand: I get it, Ben & Jerry, Barnes & Noble, Punch & Judy, etc.

Do we want to accommodate every "genius" who wants to deviate
from using 0-9, A-Z, and a-z by using "clever" punctuation?

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: TinyCore64 14.0 wifi.sh failures
« Reply #10 on: February 18, 2024, 08:42:47 AM »
Theoretically, if we're encapsulating the entire string in quotes, spaces "s h o u l d" be accounted for. (?)
Asterisks -- I've never seen nor used one in an ID, but it's "allowed" and more times than not, escape \* is going to be needed.

: and / are more Win based screw-ups so they're likely able to be disregarded here, but semi/colon is a worthwhile router test "just cuz"
as I think our baby firewalls allow almost any/everything - including illegals...

SSID: asdf\qwer:$5%+[] was permitted on a WatchGard XTM series AND a Cisco 3600 (up-stream from it) didn't bitc... complain about it :o
Okay, add $ and \ to our hit-list; to my dazed look the above SSID is visible on this Win'Nix desktop

* $ \ & and space encapsulation should cover MOST of the bases; those others who just HAVE to create identities which fall within the realm of illegals...  shouldn't be our problem
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11221
Re: TinyCore64 14.0 wifi.sh failures
« Reply #11 on: February 18, 2024, 08:56:49 AM »
Hi CentralWare
... * $ \ & and space encapsulation should cover MOST of the bases; those others who just HAVE to create identities which fall within the realm of illegals...  shouldn't be our problem
Are you saying we should accommodate the illegal  $  and  \  characters?

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: TinyCore64 14.0 wifi.sh failures
« Reply #12 on: February 18, 2024, 10:16:34 AM »
Yes (I would, simply because I can CREATE an SSID with them on certain hardware and that they actually WORK, even though standards say
they're illegal and the few Tenda, TP-Link, D-Link and EnGenius routers which were tested when I sent that update agree that they're illegal
and have the user "try again" -- but that's not saying everyone else does - or that other models of the same brands do as well.)

$ is a Linux problem regardless -- not as much on Win (used to $HIDE directories, otherwise can be used for most anything else)
* is a Linux problem and a completely different Win problem (Win = Wildcard - just "illegal" period, so SSID="MY*PRECIOUS" choked
    on Win11 test a few minutes ago just responding "Cannot connect to network" and that's it.)
\ is a Linux issue, not as much on Win (mainly batch issues from yester-year)
& is a Linux only thang (that I'm aware of)  SSID="Tom & Jerry" worked out of the box in both directions wunder win10/win11;
   CentOS must have encountered this previously as it's already prepared for it.  Debian...  I think my image is "borked"; doesn't act right.
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: TinyCore64 14.0 wifi.sh failures
« Reply #13 on: February 18, 2024, 01:05:48 PM »
Funny facts.
I have setup my IPhone with the name of :) as emoji.
And when i setup my phone with internet sharing, it shares my phone with ssid :) as emoji.
And when a search a little of this topic on the web, i can find that the standard don't say so much of what chars are correct to use.
So you can even use some chars that are difficult to type in from ordinary keyboard.

Have heard about some have tried to use $s $d, so even leak and break the phones, with seen this ssid's.

I think lots of implenentations have difficult to use chars that are not ascii.


 

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: TinyCore64 14.0 wifi.sh failures
« Reply #14 on: February 18, 2024, 01:44:32 PM »
I think lots of implenentations have difficult to use chars that are not ascii.
Yes, but the problem lies within the first half of the ASCII table where certain characters "mean something"
to the underlying operating system that's trying to connect to it, especially shells and interpreters.

For example, the ° symbol (Degrees) is easy to implement into a router.  It works in both directions,
but may be a pain to input manually and almost impossible for hardware like printers to connect without
using WPS.  This can be a benefit for security - or a liability for sanity!

The $ (Dollar Sign) on the other hand means Currency to most people...  but to a Linux based computer,
it means Variable in many cases thus why it's considered a Reserved character and must be "Escaped" for
the computer to see it as a normal character.
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair