Author Topic: Wifi Siglent SDS1104X-E workaround SSID/PSK with Spaces and Special Characters  (Read 4746 times)

0 Members and 1 Guest are viewing this topic.

Offline wiltwongTopic starter

  • Newbie
  • Posts: 3
  • Country: us
The issue with spaces and special characters in the SSID/PSK configuration seems to be in the user interface and the way it handels saving that information. In the UI, you can change the "Net Interface" to "WLAN", overwrite the /usr/bin/siglent/usr/wifi/wpa.conf file (via the startup script below) and restart wpa_supplicant process it will connect to your wifi that has special charaters and spaces in either the SSID, PSK or both. To get the IP address you will need to use the scope interface, go into "IP Set" and toggle DHCP off and on.

On my scope (firmware 6.1.35R2) you can make the wpa.conf changes and restart thw wpa_supplicant process on boot via script on the root of the USB file named siglent_device_startup.sh with the following contents (uncomment the telnet line if you want telnet on port 2323). Replace the SSID and PSK with your own settings :) The script is pretty simple, it sleeps for 20 seconds in the background so the scope has a chance to finish initializing and then makes the wpa.conf changes.

Code: [Select]
#!/bin/sh

(sleep 20

wpa_process_id=$(pidof wpa_supplicant)
if [ $wpa_process_id ]; then
    kill $wpa_process_id
fi

cat <<EOF > /usr/bin/siglent/usr/wifi/wpa.conf
network={
ssid="Your SSID With Spaces"
psk="Your PSK With Spaces"
}
EOF

wpa_supplicant -Dnl80211,wext -iwlan0 -C/usr/bin/siglent/usr/wifi/wpa_supplicant -c/usr/bin/siglent/usr/wifi/wpa.conf &
#/usr/sbin/telnetd -l /bin/sh -p 2323 &

)&

If you update the configuration in the UI you will need to reboot to restore your overwritten wpa.conf file. Additionally, if you have LAN enabled and boot with the script, networking locks up after a while (at least it does for me).

. Wilton
 
The following users thanked this post: SMB784

Offline SMB784

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
    • Tequity Surplus
The issue with spaces and special characters in the SSID/PSK configuration seems to be in the user interface and the way it handels saving that information. In the UI, you can change the "Net Interface" to "WLAN", overwrite the /usr/bin/siglent/usr/wifi/wpa.conf file (via the startup script below) and restart wpa_supplicant process it will connect to your wifi that has special charaters and spaces in either the SSID, PSK or both. To get the IP address you will need to use the scope interface, go into "IP Set" and toggle DHCP off and on.

On my scope (firmware 6.1.35R2) you can make the wpa.conf changes and restart thw wpa_supplicant process on boot via script on the root of the USB file named siglent_device_startup.sh with the following contents (uncomment the telnet line if you want telnet on port 2323). Replace the SSID and PSK with your own settings :) The script is pretty simple, it sleeps for 20 seconds in the background so the scope has a chance to finish initializing and then makes the wpa.conf changes.

Code: [Select]
#!/bin/sh

(sleep 20

wpa_process_id=$(pidof wpa_supplicant)
if [ $wpa_process_id ]; then
    kill $wpa_process_id
fi

cat <<EOF > /usr/bin/siglent/usr/wifi/wpa.conf
network={
ssid="Your SSID With Spaces"
psk="Your PSK With Spaces"
}
EOF

wpa_supplicant -Dnl80211,wext -iwlan0 -C/usr/bin/siglent/usr/wifi/wpa_supplicant -c/usr/bin/siglent/usr/wifi/wpa.conf &
#/usr/sbin/telnetd -l /bin/sh -p 2323 &

)&

If you update the configuration in the UI you will need to reboot to restore your overwritten wpa.conf file. Additionally, if you have LAN enabled and boot with the script, networking locks up after a while (at least it does for me).

. Wilton

I am very, very interested in this workaround.  Can you perhaps describe the process a little more?  For example: does the USB need to remain plugged in, in order for the script to allow for special characters in the SSID/PSK, or can you just run the script once and the scope will now connect to your wifi forever?  Does this script persist through reboot with/without the USB plugged in?

If this works the way you say it does, this solves a major outstanding bug in this instrument.

***EDIT*** This method works, however it does NOT persist beyond restart without the USB connected. It does persist beyond restart WITH the USB connected
« Last Edit: July 27, 2021, 09:46:33 pm by SMB784 »
 

Offline wiltwongTopic starter

  • Newbie
  • Posts: 3
  • Country: us
You can remove the USB drive after the scope boots and it will persist until you power down or reboot the scope (or access the wifi configuration). As noted, you need to have to have the USB drive in when it boots since the scope resets the wifi configuration to the one stored in it's proprietary database on every boot.

. Wilton
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28300
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Great find and work.  :clap:
And placed in front of the Siglent DSO team.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 
The following users thanked this post: SMB784, blurpy

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3217
  • Country: pt
On my scope (firmware 6.1.35R2) you can make the wpa.conf changes and restart thw wpa_supplicant process on boot via script on the root of the USB file named siglent_device_startup.sh with the following contents (uncomment the telnet line if you want telnet on port 2323). Replace the SSID and PSK with your own settings :) The script is pretty simple, it sleeps for 20 seconds in the background so the scope has a chance to finish initializing and then makes the wpa.conf changes.

If you are restarting the wpa_supplicant process, why do you use filename wpa.conf? Wouldn't it be simpler to use a config file with other name and there wouldn't be the risk of overwriting?

BTW, nice hack. It should be possible to put it in a permanent way if Siglent doesn't do it.

PS: If you want I can quickly place the script in a .ADS and then you would be able to run it whenever you desire in order to have those settings added to the config without needing to reboot...
« Last Edit: July 28, 2021, 11:49:59 am by tv84 »
 

Offline wiltwongTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Totally agree that you could use any location for the updated wpa.conf, it could even reside on the USB stick. Might even be better there or somewhere in temporary memory storage (tmpfs) since overwriting it every time you reboot would make very contributions to overall flash wear over time. TBH, I wasn't sure if that file was used elsewhere, but I suspect now it is not.

Putting it into the firmware is also an option, but you would need it to execute on boot in the init scripts or with some other mechanism (can't telnet in or use SCPI commands until the network is up, chicken and egg problem), you would also have to hardcode the SSID/PSK.

. Wilton
 

Offline Ringmodulator

  • Regular Contributor
  • *
  • Posts: 123
  • Country: de
Frankly, I think that Siglent deserves to get some butts kicked for this.

The scope dispalys networks with SSIDs that include spaces und you can select them.

And then, .... it simply does not work. No indication, that there is a problem with the SSID whatsoerver.

There are envrioments, where the naming of the network is just not under your control.
Think of educational settings, professional settings, work on site at a customer and so on.

The scope is running on some kind of Linux with a somewhat generic wifi dongle.
 I am no expert on this. To me it looks like just including an updated "driver" or wifi libary to solve this issue.

The intergrated web server was a main feature, that let me chose the 1104X-E over the 1202X-E.

Chris
 

Offline blurpy

  • Regular Contributor
  • *
  • Posts: 232
  • Country: no
Frankly, I think that Siglent deserves to get some butts kicked for this.

The scope is running on some kind of Linux with a somewhat generic wifi dongle.
 I am no expert on this. To me it looks like just including an updated "driver" or wifi libary to solve this issue.
This thread proves that it actually works at the Linux level, by overriding configuration in wpa_supplicant.
The issue is somewhere in Siglents application running on top of Linux, and as such seems completely fixable in firmware without driver updates or updates to the underlying OS.

So yeah, this deserves a kick in the butt... which it looks like tautech tried a few posts ago. Hopefully that helps.
 

Offline kcbrown

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: us
Frankly, I think that Siglent deserves to get some butts kicked for this.

The scope dispalys networks with SSIDs that include spaces und you can select them.

And then, .... it simply does not work. No indication, that there is a problem with the SSID whatsoerver.

Frankly, it sounds suspiciously like someone at Siglent who doesn't know what he's doing wrote a shell script that doesn't handle whitespace properly.  Happens all the time from what I've seen of the software industry.

 

Offline SMB784

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
    • Tequity Surplus
The fact that this is such a simple fix kinda confirms that they aren't too interested in investing too much into the firmware updates for this scope

Frankly, I think that Siglent deserves to get some butts kicked for this.

The scope dispalys networks with SSIDs that include spaces und you can select them.

And then, .... it simply does not work. No indication, that there is a problem with the SSID whatsoerver.

There are envrioments, where the naming of the network is just not under your control.
Think of educational settings, professional settings, work on site at a customer and so on.

The scope is running on some kind of Linux with a somewhat generic wifi dongle.
 I am no expert on this. To me it looks like just including an updated "driver" or wifi libary to solve this issue.

The intergrated web server was a main feature, that let me chose the 1104X-E over the 1202X-E.

Chris

I brought up your exact comment about Siglent selling this scope as having a usable web server yet being unable to connect to a wifi not under user control a long time ago.  If all a third party hobbiest had to do was create a simple shell script to fix a major bug then what was Siglent doing for the past two+ years? This issue prevented the scope from being used as intended in a huge number of normal use cases; people paid money for wifi dongles so they could access the unit remotely only to find that they couldn't due to some simple bug that was known about for years yet went unfixed.
« Last Edit: August 05, 2021, 09:42:42 pm by SMB784 »
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28300
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline maskedviperus

  • Contributor
  • Posts: 24
  • Country: us
But now my nonofficial wifi doesn't work.

Anyone else?
 

Offline SMB784

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
    • Tequity Surplus
But now my nonofficial wifi doesn't work.

What do you mean by nonofficial?

Offline maskedviperus

  • Contributor
  • Posts: 24
  • Country: us
i mean...
i did the update on my 1104xe today. both os and firmware

I had installed unofficial keys via official methods.....generated via a pretty nifty python script

i have never attempted or considered doing the 200mhz "hack" on this scope.  Kept it as "legit" as i could cuz i have no true desire to make any real changes to the device beyond adding the functionalities for my own personal hobby use

my 9$ tplink branded wn-725n no longer works.  When inserted it says wifi device detected, but when I go to the menu there is no way to enable it or even recognize that wifi exists.

wired lan works fine
 

Offline SMB784

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
    • Tequity Surplus
i mean...
i did the update on my 1104xe today. both os and firmware

I had installed unofficial keys via official methods.....generated via a pretty nifty python script

i have never attempted or considered doing the 200mhz "hack" on this scope.  Kept it as "legit" as i could cuz i have no true desire to make any real changes to the device beyond adding the functionalities for my own personal hobby use

my 9$ tplink branded wn-725n no longer works.  When inserted it says wifi device detected, but when I go to the menu there is no way to enable it or even recognize that wifi exists.

wired lan works fine

Does the wifi option still show up as an enabled option on the info screen?
« Last Edit: August 24, 2021, 08:15:59 pm by SMB784 »
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3217
  • Country: pt
my 9$ tplink branded wn-725n no longer works.  When inserted it says wifi device detected, but when I go to the menu there is no way to enable it or even recognize that wifi exists.

Sorry but, I have to say that that was a nice tactic to stop guys from wining about the special chars... 

Now, we only miss a Siglent release note saying that the special chars are handled only by Siglent's own WiFi interface.  :-DD
 

Offline maskedviperus

  • Contributor
  • Posts: 24
  • Country: us
It matters not to me, as i will go wired lan.

And according to siglent, it should not have changed in that manner.

But the option to switch from wired to wireless just doesnt show up now.

Thats all i know.
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 7811
  • Country: us
I updated the firmware but not the OS.  I don't remember where they were before, but the USB/LAN/WIFI settings are in UTILITY--NEXT PAGE 2/4 -- I/O --Net Interface/LAN.  I can't find by USB dongle at the moment since I took it out to use the USB port a while back.

I was going to wait on the OS until I see how it shook out. 
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline SMB784

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
    • Tequity Surplus
So is the consensus that this fix has made the WiFi issue worse then it was before the patch was released?

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 7811
  • Country: us
Yep, broken.  :(

I found my dongle.  If I press the NET INTERFACE button with it out, I get a 'wireless adapter not detected' message.  If I insert the dongle, I get 'wireless adapter detected', but the NET INTERFACE indicator remains on LAN.  If I press the button, it just sits there and does nothing.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline maskedviperus

  • Contributor
  • Posts: 24
  • Country: us
Sounds like im not alone. Identical issues.

Good.

Most likely then its just an issue not related to official vs not official adapter.
 

Offline 1audio

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: us
Am I the only one with DHCP issues on wired? I installed the firmware and OS update. All went well until I enabled the ntp server. I could not get it to work until I discovered the IP address was not set. I had set it with DHCP and it seemed ok however it does not stay set over a power cycle. I need to manually run DHCP to get an address. And my tp-link adapter doesn't work either (I use wired lan normally anyway).
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28300
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Am I the only one with DHCP issues on wired? I installed the firmware and OS update. All went well until I enabled the ntp server. I could not get it to work until I discovered the IP address was not set. I had set it with DHCP and it seemed ok however it does not stay set over a power cycle. I need to manually run DHCP to get an address. And my tp-link adapter doesn't work either (I use wired lan normally anyway).
Yes after this FW install everything is factory reset.
For the NTP clock to work properly you need assign it to your local NTP server's IP address and Google can help you find it.
Then you should also set NTP to resync at boot and while you have a working connection to your LAN the clock will be correct after each boot.
« Last Edit: August 26, 2021, 05:45:06 am by tautech »
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline 1audio

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: us
The ntp stuff works fine. The scopes ip address switches to all zeros on boot and dhcp doesn't get an address until I disable and reenable it. Once restarted it all works.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28300
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
The ntp stuff works fine. The scopes ip address switches to all zeros on boot and dhcp doesn't get an address until I disable and reenable it. Once restarted it all works.
:-//
Just checked my SDS1104X-E updated a couple days back and NTP and LAN IP saved and at boot everything just works.
A little trap is leaving DCHP ON whereas you should only use it to initially find your LAN IP and then set a unique IP for the scope, disable DCHP and Save the new IP.
A typical setup below captured from the webserver.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf