RS-422 to Ethernet

News, updates, and discussions around the official NABU.CA RetroNET Internet Adapter.
c1ph3rpunk
Posts: 69
Joined: Wed Apr 12, 2023 5:52 am

RS-422 to Ethernet

Post by c1ph3rpunk »

Just picked up one of these off Amazon to mess with:

USR-TCP232-306 Serial to Ethernet Converter LAN Ethernet TCP/IP to RS232 RS485 RS422 Converter2 https://a.co/d/gayknr9

Is there a setup/usage HOWTO guide around for how to use these types of devices with the NABU Internet adapter?
User avatar
tastypies
Posts: 32
Joined: Fri Mar 31, 2023 1:37 pm
Location: UK

Re: RS-422 to Ethernet

Post by tastypies »

I'm guessing the easiest way will be to install a virtual com port driver (perhaps http://www.pusr.com/support/download/us ... tware.html) and to then use whatever com port that exposes in DJs Internet Adapter.

It'll be interesting to see if/how this works given that NABU RS-422 seems a little fussy at the best of times.

Of course I'd be happy to add instructions to the Unoffical HowTo once it's working.

D. :)
c1ph3rpunk
Posts: 69
Joined: Wed Apr 12, 2023 5:52 am

Re: RS-422 to Ethernet

Post by c1ph3rpunk »

Agreed, bit rate worries me, unsure how many things can be adjusted in it, we shall see.

Was thinking the virtual com port myself unless the Internet adapter software can initiate an outbound tcp connection. No idea what they’d even talk to each other using.
masto
Posts: 39
Joined: Wed Mar 29, 2023 10:15 pm

Re: RS-422 to Ethernet

Post by masto »

I am using exactly that box with my NABU.

There is no reason to dink around with virtual com ports, just set it to TCP Client mode and have it connect to your internet adapter of choice. They all support this method, since it's what MAME uses.

Personally, I have nabud running on a linux server so it's always connected and ready to go. Of course it works with nabu.run as well ( but you need to run a websocket proxy.

ook ook
c1ph3rpunk
Posts: 69
Joined: Wed Apr 12, 2023 5:52 am

Re: RS-422 to Ethernet

Post by c1ph3rpunk »

Excellent, I was wondering if it could operate that way. Also good to hear about nabud, I have a Pi 3 getting replaced soon that I was going to try to repurpose for that very thing.
c1ph3rpunk
Posts: 69
Joined: Wed Apr 12, 2023 5:52 am

Re: RS-422 to Ethernet

Post by c1ph3rpunk »

masto wrote: Sat Apr 22, 2023 11:58 pm I am using exactly that box with my NABU.

There is no reason to dink around with virtual com ports, just set it to TCP Client mode and have it connect to your internet adapter of choice. They all support this method, since it's what MAME uses.

Personally, I have nabud running on a linux server so it's always connected and ready to go. Of course it works with nabu.run as well ( but you need to run a websocket proxy.
What settings are you using for the serial adapter side? Have mine set to the following:
Image

But don't get two-way for some reason:

Image

Cable appears correct, as best as I can tell. What are the LED's on the 422->Ethernet adapter doing when yours works correctly?
masto
Posts: 39
Joined: Wed Mar 29, 2023 10:15 pm

Re: RS-422 to Ethernet

Post by masto »

Screenshot of USR-TCP232-306.jpg

ook ook
c1ph3rpunk
Posts: 69
Joined: Wed Apr 12, 2023 5:52 am

Re: RS-422 to Ethernet

Post by c1ph3rpunk »

masto wrote: Sun Apr 30, 2023 2:11 pm Screenshot of USR-TCP232-306.jpg
Thanks, finally got back to this and my previous cabling is off in some way, it looks like the pins on the NABU side aren't the way I documented them, they seem to be reversed. I switched them around and now I get connected.

I'm using the same settings you have, and it works, but it's noticeably slower than the straight RS-422 to USB cable, perhaps as much as 1/3rd the speed, or at least the perceived speed. Is yours that slow?
masto
Posts: 39
Joined: Wed Mar 29, 2023 10:15 pm

Re: RS-422 to Ethernet

Post by masto »

I think we covered it on Discord, but as this is a more permanent record, I'll say here as well: the slowness with the RS-422 to Ethernet bridge seems to come from the host software, not the hardware. This was discussed a while back when I got mine (Discord link, for those who partake) and we came to the conclusion it was probably the Nagle algorithm, and it's probably important for the adapter software to set TCP_NODELAY to avoid performance issues. I made a comparison video when I discovered this:



In my experience, it's just as fast as a direct connection when this issue isn't manifesting.

ook ook
c1ph3rpunk
Posts: 69
Joined: Wed Apr 12, 2023 5:52 am

Re: RS-422 to Ethernet

Post by c1ph3rpunk »

Good to know and have documented more publicly, while things like Discord are great means of conversing, I feel not being public a lot gets lost.

Certainly not a show stopper, just annoying really.

Thanks for the info.
Post Reply