Hi
Im trying to control ethernet potentiometer from ubuntu using TCP socket in Python3.
Trying to send basic command named “Read the Startup Value for a Specific Potentiometer” from this doc:
As I undestand, to get startup value of potenciometer, I need to send three bytes to socket:
hex: 0xFE, 0xAD, 0x01
my Python program is as follows:
import socket
from time import sleep
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(0.5)
s.connect(('192.168.1.207', 3000))
s.send(bytes([254, 173, 1]))
sleep(0.5)
s.recv(256)
And it just timeouts - meaning no data from device received back.
I made network setup before (to set static IP=192.168.1.207 and specific port=3000)
And I can see the port via nmap:
Nmap scan report for 192.168.1.207
Host is up (0.00040s latency).
Not shown: 996 closed ports
PORT STATE SERVICE
80/tcp open http
3000/tcp open ppp
8080/tcp open http-proxy
30000/tcp open ndmps
It looks like your command is correct. Do you have a Windows Machine available to try controlling it using Base Station? You can find Base Station at Start - NCD.io
Can you change the port number back to 2101 on the Ethernet module and try Base Station again? Barring that you can manually enter the connection information as in the attached image:
Today I managed to make this work.
I still have one question:
Is there a known sure-to-work sequence of actions to set device IP address via web-interface 80 port?
The sequence I followed (maybe useful for descendants)
Factory Reset
1.1. Button from right to ETH - press for 5 sec
1.2. Jumper for two pins from left to ETH
1.3. PWR Reset
Change IP
2.1. try ping 192.168.1.88, discover ports 2101, 80, 8080
2.2. take Windows laptop - for NCD Config Tool
2.3. This utility should automatically load all device settings (factory ones actually) and show you
2.4. Change ONLY IP-address
2.5. Push Apply Settings button
2.6. now device should work with new IP addr (for example 192.168.1.207)
Make sure all worked
3.1. PWR reset
3.2. try ping new IP 192.168.1.207
3.3. choose any command from datasheet (named Potentiometer Quick Start Guide, see earlier on this thread) and try to send it with Python script (see earlier on this thread) to port 2101 (default one). Device should not timeout and break pipe. Device should anwser something (according to datasheet)
I have some pending changes to the web pages that will improve reliability of configuration through the web interface, but its a very odd problem that it only seems to fail through OS’ with linux kernel as opposed to a unix kernel. It shouldn’t make a difference, but somehow it does. The web page will still need to be uploaded through the configuration tool.
Do you know what firmware your Ethernet module came with?