Wifi Siglent SDS1104X-E workaround SSID/PSK with Spaces and Special Characters - Page 1
Forum section: electronics / testgear

author: wiltwong
author_rank: Newbie
timestamp: July 27, 2021, 06:14:47 pm
content: 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 settingsThe 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:#!/bin/sh(sleep 20wpa_process_id=$(pidof wpa_supplicant)if [ $wpa_process_id ]; thenkill $wpa_process_idficat <<EOF > /usr/bin/siglent/usr/wifi/wpa.confnetwork={ssid="Your SSID With Spaces"psk="Your PSK With Spaces"}EOFwpa_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

author: SMB784
author_rank: Frequent Contributor
timestamp: July 27, 2021, 09:20:46 pm
content: Quote from: wiltwong on July 27, 2021, 06:14:47 pmI 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

author: wiltwong
author_rank: Newbie
timestamp: July 27, 2021, 10:01:35 pm
content: 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

author: tautech
author_rank: Super Contributor
timestamp: July 28, 2021, 07:54:45 am
content: Great find and work.And placed in front of the Siglent DSO team.

author: tv84
author_rank: Super Contributor
timestamp: July 28, 2021, 11:26:50 am
content: Quote from: wiltwong on July 27, 2021, 06:14:47 pmIf 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...

author: wiltwong
author_rank: Newbie
timestamp: July 30, 2021, 09:11:00 pm
content: 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

author: Ringmodulator
author_rank: Regular Contributor
timestamp: August 05, 2021, 05:27:49 pm
content: 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

author: blurpy
author_rank: Regular Contributor
timestamp: August 05, 2021, 06:29:05 pm
content: Quote from: Ringmodulator on August 05, 2021, 05:27:49 pmThis 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.

author: kcbrown
author_rank: Frequent Contributor
timestamp: August 05, 2021, 07:18:27 pm
content: Quote from: Ringmodulator on August 05, 2021, 05:27:49 pmFrankly, 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.

author: SMB784
author_rank: Frequent Contributor
timestamp: August 05, 2021, 09:08:37 pm
content: 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 scopeQuote from: Ringmodulator on August 05, 2021, 05:27:49 pmI 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 controla 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.

author: tautech
author_rank: Super Contributor
timestamp: August 24, 2021, 03:56:08 pm
content: This issue is addressed in the latest firmware:https://www.eevblog.com/forum/testgear/siglent-sds1204x-e-released-for-domestic-markets-in-china/msg3643876/#new

author: maskedviperus
author_rank: Contributor
timestamp: August 24, 2021, 04:58:05 pm
content: But now my nonofficial wifi doesn't work.Anyone else?

author: SMB784
author_rank: Frequent Contributor
timestamp: August 24, 2021, 06:04:42 pm
content: Quote from: maskedviperus on August 24, 2021, 04:58:05 pmWhat do you mean by nonofficial?

author: maskedviperus
author_rank: Contributor
timestamp: August 24, 2021, 07:07:49 pm
content: i mean...i did the update on my 1104xe today. both os and firmwareI had installed unofficial keys via official methods.....generated via a pretty nifty python scripti 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 usemy 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

author: SMB784
author_rank: Frequent Contributor
timestamp: August 24, 2021, 07:12:14 pm
content: Quote from: maskedviperus on August 24, 2021, 07:07:49 pmDoes the wifi option still show up as an enabled option on the info screen?

author: tv84
author_rank: Super Contributor
timestamp: August 24, 2021, 09:20:39 pm
content: Quote from: maskedviperus on August 24, 2021, 07:07:49 pmSorry 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.

author: maskedviperus
author_rank: Contributor
timestamp: August 24, 2021, 10:39:16 pm
content: 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.

author: bdunham7
author_rank: Super Contributor
timestamp: August 24, 2021, 11:15:23 pm
content: 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.

author: SMB784
author_rank: Frequent Contributor
timestamp: August 25, 2021, 01:28:19 am
content: So is the consensus that this fix has made the WiFi issue worse then it was before the patch was released?

author: bdunham7
author_rank: Super Contributor
timestamp: August 25, 2021, 01:44:09 am
content: 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.

author: maskedviperus
author_rank: Contributor
timestamp: August 25, 2021, 02:11:29 am
content: Sounds like im not alone. Identical issues.Good.Most likely then its just an issue not related to official vs not official adapter.

author: 1audio
author_rank: Frequent Contributor
timestamp: August 26, 2021, 04:01:13 am
content: 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).

author: tautech
author_rank: Super Contributor
timestamp: August 26, 2021, 05:10:04 am
content: Quote from: 1audio on August 26, 2021, 04:01:13 amYes 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.

author: 1audio
author_rank: Frequent Contributor
timestamp: August 26, 2021, 01:09:48 pm
content: 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.

author: tautech
author_rank: Super Contributor
timestamp: August 26, 2021, 07:20:41 pm
content: Quote from: 1audio on August 26, 2021, 01:09:48 pmJust 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.

author: 1audio
author_rank: Frequent Contributor
timestamp: August 26, 2021, 11:47:40 pm
content: That's not just non-intuitive, it different from almost everything I can think of, except my very vintage NI GPIB-ENET ethernet adapter (which used RARP). Working that way can cause issues since the DHCP server won't see a renewal and could hand out that IP to something else later.I'll do some more testing today. It seems to have trouble with Google's NTP server on boot. but on a manual access later it works. I can try others but Google's (216.239. 35.0) should be a good international target without the usage limits some of the others have.This network stuff is pretty basic and old. Maybe the processor vendor's linux sources are (20 years) out of date?Maybe Siglent needs a beta test group to catch some of this stuff before wide release.Everything else seems to work pretty well.

author: tv84
author_rank: Super Contributor
timestamp: August 27, 2021, 08:12:41 am
content: Quote from: tautech on August 26, 2021, 07:20:41 pmI wouldn't call it a trap. It's a bad, bad implementation. I can't understand how this is not caught up by the betatester group!

author: tautech
author_rank: Super Contributor
timestamp: August 27, 2021, 09:54:32 am
content: Quote from: tv84 on August 27, 2021, 08:12:41 amMaybe but it has been like this for 8 years and a change in Siglent's philosophy and implement it in all their instruments will take a massive push from everyone whose input they value and respect.First instrument that I discovered this was a 2013 SDS2304 which was maybe their first and certainly my first instrument with LAN so I've learned to live with it.However just what is the industry standard if there is such a thing ?While DCHP is set to ON and the instrument is rebooted is negotiating a new IP a crime ?Or if we press Save (a negotiated or user set IP) should DCHP be automatically disabled so not to be ON at boot ?

author: Ringmodulator
author_rank: Regular Contributor
timestamp: August 27, 2021, 10:28:09 am
content: Using the DHCP assigned adress, store it and then turning DHCP on the scope off, can lead to a situation, where the DHCP reassigns this adress to another device when the scope is not active.Then you have two devices trying to use the same ip adress as soon as the scope is active again.

author: tautech
author_rank: Super Contributor
timestamp: August 27, 2021, 10:37:47 am
content: Quote from: Ringmodulator on August 27, 2021, 10:28:09 amQuite so.However for those that have little idea of IP stuff DCHP ON allows negotiation of a correct IP address which then they can assign a higher IP address to avoid conflict and turn DCHP OFF.Not all of us can remember our IP address, subnet or gateway so for ease of use DCHP allows us to get it mostly right.

author: 2N3055
author_rank: Super Contributor
timestamp: August 27, 2021, 10:55:07 am
content: DHCP is quite well standardized.You use it when you don't want to manage all IP addresses manually.When enabled, it will contact DHCP server, that will give it IP address and other parameters to correctly setup TCP/IP stack.Correct info has to be previously setup in a DHCP server. DHCP server has pools of addresses that it can hand out to hosts.Once server gives you one of the addresses from the Pool, that address comes with a lifetime period (lease period). Inside that lifetime period, server remembers what address it has "leased" to you, and client will get that same address all the time, as long as it keeps reconnecting to network regularly. If a client, doesn't get connected to network for time longer that leased time, server "reclaims" lease and puts IP back to pool for others to use...When deciding on addressing policy on your network, you need to set ranges to be used for static addresses and which ranges will be used for DHCP pools. They should never overlap.On DHCP server (one that is fully featured) you can also create permanent leases. That way you practically have static addresses but they get centrally managed.DHCP should never have any interaction with any other higher level network protocols. It happens early in TCP/IP stack initialization, when binding IP address to network interface.NTP client running at startup should have triggered start by completion of TCP/IP initialization, otherwise timeouts are likely.I'm seriously thinking of creating a whitepaper "TCP/IP simplified for T/M users: How to connect things in a lab via TCP/IP networks without making a big deal out of it.."

author: 1audio
author_rank: Frequent Contributor
timestamp: August 27, 2021, 10:54:30 pm
content: DHCP has been standardized and common on pc's and phones for 20 years. It's pretty fundamental which is why most people never encounter issues. The default stack from the processor vendor should handle this all seamlessly. Turning off DHCP really should be a special exception for use when exposing the web server to the internet for example. (Probably not a good idea here).

author: 2N3055
author_rank: Super Contributor
timestamp: August 28, 2021, 08:06:41 am
content: Quote from: 1audio on August 27, 2021, 10:54:30 pmYes exposing anything to Internet is not a good idea.But there are many reasons to keep IP addresses fixed. How do you know which one is which today?All you need is an text document to keep track which one is which and what addresses are used up.Stick an IP to the front of the instrument and you are good..And then you add them to DNS and you address your scope as "3104T" not 192.168.10.13. Or "thebeast" for a 6GHz scopeSo there is a reason for static and there is a reason for DHCP...

author: blurpy
author_rank: Regular Contributor
timestamp: August 28, 2021, 09:27:03 am
content: It sounds to me like this broke in the newest firmware. Works like expected on mine at 6.1.35R2. I can shut down the scope and start it again and it keeps the DHCP settings.So 2 new bugs introduced:1. Wifi is gone2. DHCP forgets its settings

author: tautech
author_rank: Super Contributor
timestamp: August 28, 2021, 09:40:50 am
content: Quote from: blurpy on August 28, 2021, 09:27:03 amYes WIFi is broken and reported as such.DCHP is working correctly and will retain IP settings when DCHP = OFF.

author: modoran
author_rank: Regular Contributor
timestamp: August 28, 2021, 09:51:07 am
content: What is wrong with DHCP ? There is no issue for me, I keep DHCP ON and setup my dhcp server on my MikroTik router to always give the same IP address to the scope based on MAC. The IP cannot be assigned to anything else. I even assigned a static domain name to my scope "siglent.lan" to not forget it's IPwifi is the only thing which does not work.For NTP I also use ntp server hosted on my router, scope does not go to the internet at any time.

author: blurpy
author_rank: Regular Contributor
timestamp: August 28, 2021, 09:55:45 am
content: Quote from: tautech on August 28, 2021, 09:40:50 amYou can't say DHCP is working correctly if you have to turn it off.But it works for me in the old firmware with DHCP on, so I'm just basing this on what 1audio experienced after upgrading.

author: Ringmodulator
author_rank: Regular Contributor
timestamp: August 28, 2021, 11:29:47 am
content: My take on this:If the wifi router is under your control, create a permanent lease for the scope in the dhcp on the router, based on the mac adress.Or use fixed a ip address, which is outside the dhcp range in the router.Where the wifi router is not under your control, e.g. work enviroment, educational enviroment, service work at customer site, just use the dhcp service on the scope and leave it on.Yes, the ip may change from time to time and you have to update it for the http browser then.Chris

author: 1audio
author_rank: Frequent Contributor
timestamp: August 28, 2021, 03:40:11 pm
content: The problem is that the "DHCP" only requests an IP address when manually prompted. As in not dynamic. Its more of a helper in setting a manual IP address than DHCP. However if you get an address from DHCP then it has a lease with an expiration and needs to be renewed. Usually you set a block for static IP addresses to prevent the DHCP server from issuing those addresses. not following these rules will cause problems.

author: bingo600
author_rank: Super Contributor
timestamp: August 29, 2021, 09:07:07 am
content: Quote from: 1audio on August 28, 2021, 03:40:11 pmTehcnically you're right , but people that (mis)Uses/understand this: Are usually saved by the fact , that most (decent) dhcp servers do a ping towards the address they're about to hand out as a new lease , and will not hand it out if there is an answer.That "unfortunately" saves your butt , and will not get you to think about what is really happening.Kinda' like proxy arp saved a lot of butt's when they forgot to set a default gateway.Network ppl. had a hard time convincing users to remember to also set the def-gw... Why they said , it works wo.Luckily for security reasons , proxy arp was removed as default from ie. Cisco router interfaces , a while ago./Bingo

author: 2N3055
author_rank: Super Contributor
timestamp: August 29, 2021, 09:46:55 am
content: Quote from: bingo600 on August 29, 2021, 09:07:07 amWell that is not part of the DHCP standard. Windows DHCP does it (DHCP server side IP conflict detection) for instance.But DHCP standard does not mandate it. And it is abad practice to rely on it.DHCP has a list of leases and if IP is not handed out and it is in a pool, it's available. That is only information that is sure.IP conflict detection is responsibility of host itself, and ARP is used for it not ICMP...It is done this way specifically to protect from badly configured DHCP server mass configuring many duplicate IP addresses to DHCP client (to prevent ARP storms).So thehostshouldrefuseto configure with DHCP addressif it detects IP is already in use with MAC different than his.In which case it can default to internal autoconfigure IP, or leave IP unconfigured.See RFC5227....I agree that it is one of those "fixes" that only promote ignorance and misconfiguration. I prefer clear error messages that lead to fixing all problems and having network in perfect shape.But all this "let's make it easy for people that don't understand it" makes companies do all this "simplifying" that only promote confusion. But, it's a sign of times , I guess.

author: bingo600
author_rank: Super Contributor
timestamp: August 29, 2021, 10:07:12 am
content: Quote from: 2N3055 on August 29, 2021, 09:46:55 amI know the aboveBut you'd need to on the same L2 to "ARP" , lot's of Corp DHCP servers aren't.So they "just send a ping".But yes i've also seen a M$ come up w. the Duplicate IP detected - Based on ARP.I actually think the ISC-DHCP server might do the same (ping) , i haven't verified though./Bingo