Products > Test Equipment
Why can't I netcat into my Rigol DS2072A ? Linux, LAN, etc.
(1/2) > >>
LinuxGuy123:
Hi.

I'm trying to send some SCPI message to my DS2072A and I'm not getting any responses.

It is connect to my local network via DHCP at 192.168.1.125.  I can ping it with no problem.

My workstation is running Fedora 36 Linux.

I've tried to send several commands, such as:


--- Code: ---echo ":DISPLAY:DATA? ON,OFF,PNG" | nc -w1 192.168.1.125 5555 | dd bs=1 skip=11 of=image.png
echo “:SYST:LANG?” | nc -w1 192.168.1.125 5555

# echo ":DISPLAY:DATA? ON,OFF,PNG" | nc -w1 -4 192.168.1.125 5555 | dd bs=1 skip=11 of=image.png
^C
0+0 records in
0+0 records out
0 bytes copied, 136.488 s, 0.0 kB/s



--- End code ---


I've tried this both as a regular user and as SU.  What am I missing ?

Thanks

Do I have to enable something on the scope to enable it to reply to SCPI commands ?

Are there any simple tests othre than ping <scope IP> to test why it isn't work ?

My scope is software version 00.03.03.sp1.  Do I need to update it before SCPI commands will work ?



gnif:

--- Quote from: LinuxGuy123 on August 23, 2022, 05:42:02 pm ---I've tried this both as a regular user and as SU.  What am I missing ?

--- End quote ---

There is no need to do this as `root` as your regular user can open outgoing ports using netcat just fine. While I can't speak to the issue you're having as I am not familiar with the device or the protocol, you should know that unless you specify `-n` to `echo` it will also output a carrage return, which might be messing things up.

For example


--- Code: ---echo -n ":DISPLAY:DATA? ON,OFF,PNG" | nc -w1 192.168.1.125 5555 | dd bs=1 skip=11 of=image.png

--- End code ---
LinuxGuy123:

--- Quote from: gnif on August 23, 2022, 06:11:28 pm ---There is no need to do this as `root` as your regular user can open outgoing ports using netcat just fine.

--- End quote ---
OK.


--- Quote ---While I can't speak to the issue you're having as I am not familiar with the device or the protocol, you should know that unless you specify `-n` to `echo` it will also output a carrage return, which might be messing things up.

--- End quote ---

Are these commands supposed to be sent with a CR or a CR/LF or nothing ?

Thanks for the reply.
gnif:

--- Quote from: LinuxGuy123 on August 23, 2022, 06:28:24 pm ---Are these commands supposed to be sent with a CR or a CR/LF or nothing ?

--- End quote ---

That's what I meant, I am unsure if they are, but the `echo` command by default will output a line-feed (\n) if you do not specify the -n switch if you are unaware. This can and has caught me out on occasion in the past.
You can explicitly output a line feed (\n) or a carriage return (\r) with `echo` by using the -e switch, for example


--- Code: ---echo -ne "SomeText\r\n"

--- End code ---

As to why it's not working, if it isn't this, someone here with more experience will need to provide an answer I am sorry.
LinuxGuy123:
I still can't connect it over the LAN, but USB works.


--- Code: ---echo "*IDN?" > /dev/usbtmc0; cat /dev/usbtmc0
RIGOL TECHNOLOGIES,DS2072A,DS2D164752690,00.03.03.SP1

--- End code ---

I'll update the firmware and report back.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod