Author Topic: Ethernet to DB9 cable - usable?  (Read 5372 times)

0 Members and 1 Guest are viewing this topic.

Offline HDL_CinC_DragonTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Ethernet to DB9 cable - usable?
« on: December 17, 2008, 10:55:19 PM »
I found an old cable in a box that converts male RJ-45(the end that would plug into the computer/circuit) to male DB9(the end with the pins rather than holes). I hope I got the genders correct :P Im wondering If I would be able to talk to my robot from my comp with this setup? Would it be possible to hook up the Ethernet side to my computer and have the Serial side be on the robot since my current main PC doesnt have Serial ports(I could build a quick PC out of spare parts specifically for this if need)? I did a quick google search and didnt turn up anything useful on the matter. Any one know of anything like this?
Thanks in advance

-Dragon
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline HyperNerd

  • Robot Overlord
  • ****
  • Posts: 139
  • Helpful? 5
  • N3rd1n80r
Re: Ethernet to DB9 cable - usable?
« Reply #1 on: December 18, 2008, 02:13:15 AM »
Hi Dragon,

After a google search, the cable seems to be for enabling a PC without an ethernet port to have one, using the serial port. (maybe like an external LAN card?)
The thing that puzzles me though is the male RJ-45 connector, surely it would be a female one, to accept an RJ-45 cable, or maybe the device plugs directly into the socket on the router/modem?

One of the devices I found could be used this way, as it was for cash registers. The ethernet end plugs into a computer and becomes a virtual COM port. The other end of the cable becomes a standard serial port. Is this what you meant?

Maybe I'm getting confused :-\

Hope I was of some assistance.

 -HyperNerd
« Last Edit: December 18, 2008, 02:16:30 AM by HyperNerd »
There are 10 types of people in the world - those who understand binary, and those who don't.

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: Ethernet to DB9 cable - usable?
« Reply #2 on: December 18, 2008, 03:26:17 AM »
RS232 and Ethernet are too very different beasts. An plain cable can't possibly be used to make the link. Unless that cable has some electronics on it it's probably an awkward serial cable from a company that lacks imagination. I've got an similar cable from an APC UPS. They use an RJ45 jack at one end an DB9 at the other end. They also have a variation of the cable that has RJ45 at the UPS and USB at the computer end.

Get an USB-to-RS232 converter, it's the way to go. Or get an USB programmer for your MCU (if your MCU supports it).

Offline HDL_CinC_DragonTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: Ethernet to DB9 cable - usable?
« Reply #3 on: December 18, 2008, 02:53:32 PM »
@HyperNerd
Nope im positive that its a male RJ-45 and male DB9. Perhaps the cable was made as a sort of crossover cable for PC to PC communication?

@Cosminprund
I have a USB programmer for my MCU so thats not really the issue. I was just wondering if I could use that cable to send information from my MCU to my computer or or laptop.

Im willing to bet that I could use it like a normal UART connection. If im not mistaken only like 4 wires are necessary? This cable has 4 of em.
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline HyperNerd

  • Robot Overlord
  • ****
  • Posts: 139
  • Helpful? 5
  • N3rd1n80r
Re: Ethernet to DB9 cable - usable?
« Reply #4 on: December 18, 2008, 03:38:09 PM »
Hi Dragon,

Does your cable have some kind of box (device/circuit/convertor) attached to it inline, or is it just the straight through cable, ie. no electronics within the cable? If it is just a straight through cable, then it is probably of no use whatsoever to you, as Cosminprund said:
Quote
Unless that cable has some electronics on it it's probably an awkward serial cable from a company that lacks imagination.

this is a picture of the device I found at http://industrialethernet.com/net232.html:

and it's intended use in cash registers :):

This is I think what you need ;D

 -HyperNerd
There are 10 types of people in the world - those who understand binary, and those who don't.

Offline HDL_CinC_DragonTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: Ethernet to DB9 cable - usable?
« Reply #5 on: December 18, 2008, 03:54:16 PM »
Nah if there were any electronics inline id have mentioned it; its just a straight through cable. Ah well. Im sure ill find SOME use for it some day :)

Thanks for the replies :)

-Dragon
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: Ethernet to DB9 cable - usable?
« Reply #6 on: December 18, 2008, 04:50:09 PM »
Cables like that are usually used to telnet/ssh into routers/switches and storage controllers. They are usually not wired as straight through cables

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: Ethernet to DB9 cable - usable?
« Reply #7 on: December 19, 2008, 01:58:36 AM »
I'm willing to bet that I could use it like a normal UART connection. If I'm not mistaken only like 4 wires are necessary? This cable has 4 of em.

Without going into too many details on what ethernet is, just answer those questions:

Where are you going to set the MAC address for the serial/ethernet device?. Onto the cable itself or onto the device (MCU) you're connecting to? You can't have ethernet unless you have a MAC address.

Where are you going to set up the IP address? While you can do ethernet communication with a device that only knows TCP, it's easier if the device understands TCP/IP.

How are you going to communicate with the device? If you want UART you probably need a Virtual Serial driver on the PC. What voltage level will the link work at? Who's going to do the voltage level translation? What speed is the link going to work at? Did you notice serial connection speeds are usually given in Bounds (kilobaud at most) while the smallest ethernet speed is 10 MEGA bits per second?

Offline lanamor

  • Jr. Member
  • **
  • Posts: 45
  • Helpful? 0
Re: Ethernet to DB9 cable - usable?
« Reply #8 on: December 19, 2008, 01:09:14 PM »
Cables like that are usually used to telnet/ssh into routers/switches and storage controllers. They are usually not wired as straight through cables

Pomprocker is correct mostly. The DB9 would connect to the PC and the RJ45 would connect to the console port of the switch/router. To make things even more difficult; different venders can use different pin outs which make proprietary cables. If your cable is blue it's probably from Cisco.

 


Get Your Ad Here

data_list