Reputation: 44
I would like to ask if it is possible to take and send raw ascii data from a logging device.
I have a device that you can connect sensors and take values (analogs and digitals).the device has got female rj45 socket which goes to an rj45->serial adapter, which adapter goes to serial->usb adapter. I can easily control the device with ascii commands via usb(telnet terminal etc) but can I somehow remove the serial->usb adapter? Can I send raw ASCII commands via my laptop's ethernet? can I take the response of that device via my laptop's ethernet?
ps-> that's the device: http://www.infinite.com.gr/products/202
Upvotes: 0
Views: 2095
Reputation: 155065
No, you cannot.
With physical connectors there are always 2 specifications in-play: the mechanical specification (the shape of the connector), and the electrical specification (the data on the wires in the connector).
In your case, the RJ-45 (actually "8P8C Modular Connector") is mechanical specification, but the electrical specification is (I assume) RS-232 (or some other UART/serial-port standard, like RS-433, RS-485, etc). RS-232 does not mandate the use of a D-Sub DB-9 connector (indeed, RS-232 often uses DB-25 instead of DB-9). While RS-232 requires 8 signal wires and 2 grounds (10 conductors in total), the EIA/TIA 561 and Yost specifications define a way to combine some conductors together to allow for RS-232 to run on 8P8C connectors and Ethernet cabling (UTP Cat 5 or higher for 8 conductors).
Compare this with Ethernet (specifically IEEE 802.3u for "Fast Ethernet", typically 100BASE-TX) which is an electrical specification, which commonly uses 8P8C connectors (but not necessarily-so - and older versions of Ethernet used "vampire taps" instead - nothing like today's connectors).
Now, you might wonder if you could somehow program your Ethernet hardware so that it sends RS-232 signals down the wire instead of Ethernet frames - this is hypothetically possible if your NIC is a giant FPGA and you're also programming your own operating system - however that is unlikely, and OS-level network interfaces do not expose a way to control individual pin signals - I believe the lowest-level interface provided on Linux and Windows is a raw Ethernet frame.
A simpler solution is to get a simple cheap, solid-state 8P8C-to-DB-9 adapter :)
Upvotes: 2