I have some Fusion boards with Ethernet and find that I am able to turn relays on and off via Netcat without any problem:
echo -en ‘\xAA\x03\xFE\x6C\x01\x18’ | nc 10.1.0.164 2101 | hd -v -e ‘256/1 "%02X " “\n”’ |sed ‘2q;d’
echo -en ‘\xAA\x03\xFE\x64\x01\x10’ | nc 10.1.0.164 2101 | hd -v -e ‘256/1 "%02X " “\n”’ |sed ‘2q;d’
Note, the hd and sed commands are just for formatting and I don’t get a response either, if they are removed. In all cases, when I send a command the Busy light flashes.
However, there is no response, and when I try the 2-way communications test I also get no response:
echo -en ‘\xAA\x02\xFE\x21\xCB’ | nc -C 10.1.0.164 2101 | hd -v -e ‘256/1 "%02X " “\n”’ |sed ‘2q;d’
The actual objective is to detect contact closure on the GPIO pins, however I don’t get a response to:
echo -en ‘\xAA\x03\xFE\xAF\x01\x5B’ | nc 10.1.0.164 2101 | hd -v -e ‘256/1 "%02X " “\n”’ |sed ‘2q;d’
And in fact, when I run NCD Base Station, UXP SCAN contact closure input, I get all zeros back even though UXP2, IN2 is grounded. If I run AD8 8-channel analog input, I get 0V for IN2 and 5V (pulled high) for all the others which is correct.
What do I need to do differently to get a response back from the Fusion with Netcat? Note, I also tried creating a RAW virtual com port with: socat pty,link=/dev/vcom0,raw tcp:10.1.0.164:2101 &
But when I echo a command to /dev/vcom0 it doesn’t even flash the busy light.
Why doesn’t UXP SCAN contact closure input in NCD Base station give me a 1 for the contact that is in fact closed?