Maker Pro
Maker Pro

Can you use serial communications on ethernet?

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Today's question comes from seeing this:

http://www.instructables.com/id/How-to-Make-a-9-Pin-Serial-to-Ethernet-Cable/?ALLSTEPS
http://www.instructables.com/id/How-to-Make-a-9-Pin-Serial-to-Ethernet-Cable/?ALLSTEPS
I may have need of converting serial to ethernet, old legacy equipment that still works well, but is technologically outdated unless I can put it on the network. This is a very short run, of maybe 40cm - can the above link be used or will a powered converter such as this one, be necessary?

Thanks!
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That instructable doesn't make the serial port accessible on an Ethernet LAN; it just adapts one type of connector to the other, so you can send serial data over a piece of Ethernet cable!

To do what you want, you would need a microcontroller-based board that implements the Ethernet protocols and provides an addressable serial device that can be interrogated from another Ethernet device using the Ethernet protocols.

I know nothing about this, so that's all I can say. I think there are others here who know the ins and outs of Ethernet and can tell you more.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The instructable may not be what you are looking for. It is not a seerial-to-ethernet converter. All it shows is how to connnect an RJ45 connector to a DB9 connector. This is not Ethernet!

I think you are looking for a converter which allows you to communicate with the converter via Ethernet and the converter connects to the end device via a serial port. Google "serial over Ethernet" for suitable products.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Apparently the device was one revision away from an onboard ethernet! :( as such I was informed that the chipset is not even on the board and thus not compatible!

Thank you both for the information.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
If you have a serial port on your PC, all you need is some software to take serial port data and forward it over the internet. If you do not have a port, you can get a serial to USB converter that will give you a serial port.

Bob
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
We've had another user on here talk about an ethernet device to do this.
It's a Serial Ethernet Bridge : http://www.dcbnet.com/datasheet/etherbridge.html

You can DIY with an computer, or a microcontroller.
(Edit... of course they charge a lot of money for them... you can't exactly get them from RadioShack so they attempt to grip your manly parts by charging well over a couple hundred $ for maybe $30 in parts)
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
We've had another user on here talk about an ethernet device to do this.
It's a Serial Ethernet Bridge : http://www.dcbnet.com/datasheet/etherbridge.html

You can DIY with an computer, or a microcontroller.
(Edit... of course they charge a lot of money for them... you can't exactly get them from RadioShack so they attempt to grip your manly parts by charging well over a couple hundred $ for maybe $30 in parts)
Indeed! My first post had a link to what I was thinking of using, but the main board doesn't have the brain on board to manage the operations I was looking for. Such is life.
Thanks!
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
It's possible. The third party device has RS 232 and 485? communication potentials.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Would a Raspberry Pi do this? Or a BeagleBone?
Good call Kris.
I don't see why they can't.
You could send the stream as plain text, or encrypt it. It could be sent via TCP for a more accurate delivery at the expense of a bit of a delay in transmitting and additional overhead, or you could send it via UDP which would be a lower latency link (but would be missing error correction)

This would depend on what chopnhack plans to 'bridge' over Ethernet.
If you can afford to buffer, transmit, and playback I would recommend TCP.
Otherwise UDP... but remember that UDP may drop packets so a portion of the original serial stream may be lost... if the end-points can compensate it should be fine.

I have a pair of Raspberry Pi I can try here in a LAN environment.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
This would be for accessing and alarm panel via smartphone. The vendor has third party application on google store, but since the board does not have a ethernet jack, I was told the board was one revision too old. The serial port allows for connectivity to the web via a different app. It may be something I can backdoor by running a home server to host the software and then connect the server to the serial port. Slow, but sure. The remote access would more than likely be very clunky - smartphone would need to remote into the server and access the hosted program.

Why is technology so difficult? :mad:
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
This would be for accessing and alarm panel via smartphone. The vendor has third party application on google store, but since the board does not have a ethernet jack, I was told the board was one revision too old. The serial port allows for connectivity to the web via a different app. It may be something I can backdoor by running a home server to host the software and then connect the server to the serial port. Slow, but sure. The remote access would more than likely be very clunky - smartphone would need to remote into the server and access the hosted program.

Why is technology so difficult? :mad:
It's not difficult, it's interesting!
Because of the function... instead of bridging serial over ethernet, why not just build a web-based front-end on a RaspberryPi and use it to directly communicate with the serial connection on the Alarm? The Pi (or other device) would completely deal with timing and 2-way communications without worrying about latency or other potential network issues.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
instead of bridging serial over ethernet, why not just build a web-based front-end on a RaspberryPi and use it to directly communicate with the serial connection on the Alarm?
Are you suggesting a text window like a terminal? So you can type on it and that's sent to the alarm unit through its serial port, and anything it sends back is displayed in a text window?

John, how is the alarm unit's serial port normally used? Do you connect it to a terminal and communicate with it using text? Or does the manufacturer have a special program to interrogate it, using a special protocol? Do you have any way of interrogating it locally at the moment?
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
It's not difficult, it's interesting!
And exceedingly frustrating!! I think Microsoft had a hand in the design :rolleyes:

Because of the function... instead of bridging serial over ethernet, why not just build a web-based front-end on a RaspberryPi and use it to directly communicate with the serial connection on the Alarm? The Pi (or other device) would completely deal with timing and 2-way communications without worrying about latency or other potential network issues.
Very elegant solution.... me likey very much :D - I will save this for future reference when my to do list is smaller. I am in the investigating phase right now! My first option of scrapping and starting all over was not very appealing. You wouldn't believe me if I told you the price of these systems now :eek:

Are you suggesting a text window like a terminal? So you can type on it and that's sent to the alarm unit through its serial port, and anything it sends back is displayed in a text window?
Kris, the system has two consoles that have LCD readouts, but no, the system is limited to predefined textual output based on triggers - i.e. a zone triggers an event whether that be a door open or a motion sensor, etc. It was also a home automation system that was very cool a decade ago, was using x10 to be able to turn lights on, etc. Yesteryear's cats meow is todays stinky garbage :D:D I would like to extend its longevity by being able to access it via smartphone, I think it will be a cool project. The manufacturer has a program that has to be purchased to communicate with the serial port. I am not sure of the protocol. I have a manual somewhere, I will have to dig into it further to see if its proprietary or open.

Thanks to both of you!! I will certainly pursue this, just after I finish get a better footing on programming, write code for the dust collector project, install said project, paint the house.... you know ;):p
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Are you suggesting a text window like a terminal? So you can type on it and that's sent to the alarm unit through its serial port, and anything it sends back is displayed in a text window?

John, how is the alarm unit's serial port normally used? Do you connect it to a terminal and communicate with it using text? Or does the manufacturer have a special program to interrogate it, using a special protocol? Do you have any way of interrogating it locally at the moment?
I was thinking of a simple webpage with pre-defined buttons and perhaps a status read-out.
Because this would be coupled directly to the alarm, I would highly discourage a console of any kind that could allow unknown or malformed information to be sent to the alarm.
The web-based front end would communicate to the user. (ie, on any phone, or tablet.), the back-end could be written in a number of languages and would be the intermediary in which the alarm would communicate to.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Kris, the system has two consoles that have LCD readouts, but no, the system is limited to predefined textual output based on triggers - i.e. a zone triggers an event whether that be a door open or a motion sensor, etc.
OK, so it transmits information when events occur. You could try capturing that data through the serial port in a PC or other device. If you have an oscilloscope you can look at the data stream and figure out the bit rate, otherwise you'll have to try them all one at a time. You may find that the information it transmits is plain text and has a standard format that can be parsed (e.g. by a script running on a web server) and converted into events or information for display on a web page.
I am not sure of the protocol. I have a manual somewhere, I will have to dig into it further to see if its proprietary or open.
Good luck with that!
Thanks to both of you!! I will certainly pursue this, just after I finish get a better footing on programming, write code for the dust collector project, install said project, paint the house.... you know ;):p
Ah, you're taking it easy these days are you? :)
 
Top