I’ve managed to connect my Siglent SDS2104X Plus oscilloscope to my WiFi network using a USB WiFi dongle.
I’ve managed to get code execution and telnet access to my SDS2104X+ without opening it up, and had a look around at its file systems. (Probably will be blogged later)
Anyway, the main thing here is, as expected, it uses Zynq FPGA + Linux, and does have a few WiFi driver modules already lying around. So I’d like to connect it to my WiFi network, to avoid having to route and connect the ethernet cable every time I move it around.
1 | # ls -1 /usr/bin/siglent/drivers/ |
1 | # ls -R -1 /lib/firmware/ |
That mt7601u is clearly a WiFi driver. I can also find r8188eu in /sys/module
, and these firmware binary blobs.
So I got a cheap little mt7601u WiFi dongle from Amazon.
Plugging it in, and sure it’s detected alright, as wlan0
:
1 | # ip link |
The iw
wireless management tool isn’t here, so that’s a bit annoying.
But at least wpa_supplicant
does exist, that’s good enough to connect to some WiFi networks.
First, write a wpa_supplicant
configuration file, e.g. wpa.conf
:
ctrl_interface=/tmp/wpa_supplicant
update_config=1
network={
ssid=”MyWiFi”
psk=”Passw0rd”
}
Power on, start WiFi, and DHCP client:
1 | echo on > /sys/class/net/wlan0/power/control |
…and, Ethernet connection is dropped.
Apparently, the oscilloscope main application (/usr/bin/siglent/main.app
) checks network interfaces periodically. It is probably not expecting to see a second wlan0
interface up, ends up resetting assigned IP addresses on all network interfaces.
So, either kill main.app
, or disconnect ethernet once WiFi is connected.
To make this process automatic after reboot, prepare a USB drive, and in its top level directory, create a shell script named siglent_device_startup.sh
:
#!/bin/sh
root=`dirname $0`
if ip link show wlan0; then
echo on > /sys/class/net/wlan0/power/control
wpa_supplicant -B -i wlan0 -c $root/wpa.conf
udhcpc -i wlan0
fi
And, of course put the wpa.conf
file at the same place too.
Plug in the USB drive and WiFi dongle on its two front USB ports, power it on, it should automatically run the code and connect to the WiFi network.