TCP/IP serial communication

Howdy,

I am currently using DIGI connect SP devices to get data from serial ports and send it to the Cloud but I would like to know if it would be possible to achieve the same thing if the other end sends the data via tcp/ip. Does the DIGI connect SP supports receiving serial data via tcp/ip? If not which would be the best DIGI device to achieve this?

Thank you!

Up - No one has the use case scenario above?

Yes you can use the Connect SP to send TCP/IP data to the serial port.

The connection you are using to connect to your cloud is actually most likely bi directional already.

Regardless if the socket is inbound or outbound it should be bidirectional.

It really depends on what you are trying to achieve but the Connect SP should be able to do it.

1 Like

“Yes you can use the Connect SP to send TCP/IP data to the serial port.”

I need to receive data via tcp/ip (ethernet port) instead of the seral port, not send it…

Tofaz, can you describe your application a little more?

You said " I need to receive data via tcp/ip (ethernet port) instead of the seral port, not send it…"

Where is this data going once it is received? To the serial port?

This mode would be TCP Sockets mode as a TCP Server (allowing inbound connections). If it is currently connecting to a cloud server, this mode would be TCP Sockets, TCP Client (making outbound connections).

https://www.digi.com/resources/documentation/digidocs/90000565/#references/r-select-port-profile.htm?Highlight="TCP%20Sockets"

Basically, log into the web interface and select the port profile as TCP Sockets as a TCP Server and then you can connect to the IP address via telnet on TCP port 2001 or a RAW connection on UDP/TCP port on 2101.

Then you can send whatever you like to the serial port.

> Where is this data going once it is received? To the serial port?

It will be sent to the Digi Remote Manager via IP as it would come from the serial port:

source sending serial data —tcp/ip—> DigiDedvice —tcp/ip—> DigiRemoteManager

Basically data will have to be received on the ethernet port and transmitted to the Digi Remote Manager via still ethernet port (this second step is the same as getting the data via the serial port).

In your link I see all use cases that use the serial port still.

Your comment about the Connect SP threw me!

You just want to send data points to a data stream in Digi Remote Manager.

You can use any device you like. Just use the python library https://github.com/digidotcom/python-devicecloud

It would take your username and password (well you would actually create an “application” user) and then post any data stream you want via API calls.

If you want to send a data stream via a Digi device then any device running their latest operating system, DAL, could do that such as their IX or EX routers. https://www.digi.com/products/networking/cellular-routers

You would use the digidevice.datapoint module in python to send the data.

https://www.digi.com/resources/documentation/digidocs/90002386/os/python-digidevice-datapoint-c.htm

The benefit of using a Digi device over a raspberry pi for example is that it would not need a username and password as it would use the device’s data channel to Digi Remote Manager to send the data, however, this would require an additional license for each device. Due to Digi’s licensing technically you could have 1000 non Digi devices uploading data streams and only pay for 1 device license if you used the username and password method but I am sure Digi would frown on this and support would be a nightmare.

Whilst you could use the Connect SP for this, I would recommend against it as coding on these devices are a pain as they run python 2.4.3 (I believe). Anything running Digi’s DAL operating system runs python 3.6 or newer.

Nicholas Wilson
Your IoT
https://www.YourIoT.com.au

Nicholas,

Thank you for your answer. It is still not clear to me if I I can use the Digi Connect SP to receive data via TCP/IP and then transmit it to another destination still using the ethernet port.

As of now I know how to receive serial data via the serial port and send it to another destination via IP, but my question is if I can do still the same but instead of receiving the data from the serial port it will arrive via TCP/IP on the ethernet port.

The Connect SP cannot be used as a TCP proxy off the shelf. You may be able to write a python script to achieve what you want but it does not have that feature out of the box. It is purely a Serial to Ethernet adapter.

Nicholas Wilson
Your IoT
https://www.YourIoT.com.au

Thank you for your confirmation!