# USB socket communication

**URL:** <https://forum.universal-robots.com/t/usb-socket-communication/31526>\
**Category:** Robot Communication\
**Created:** [November 22, 2023, 3:46pm UTC](https://forum.universal-robots.com/t/usb-socket-communication/31526 "2023-11-22T15:46:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpeva](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dpeva](https://forum.universal-robots.com/u/dpeva)\
**Post date:** [November 22, 2023, 3:46pm UTC](https://forum.universal-robots.com/t/usb-socket-communication/31526/1 "2023-11-22T15:46:59Z")

</div>

We have several UR5e systems communicating with Mahr gage amplifier box’s RS232 ports using Moxa Nport serial/ethernet adapters to an ethernet switch tied to the robot control’s ethernet connection.  
We open a socket and issue socket\_send and socket\_read commands and all is well.

The newer Mahr boxes come with a USB port.

Can I connect to one of the robot’s USB ports and open a socket that way, or do I need to use a USB-ethernet adapter, or is there another strategy that works for these situations?

---

<div class="post-metadata">

**Author:** ![dpeva](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dpeva](https://forum.universal-robots.com/u/dpeva)\
**Post date:** [May 9, 2024, 8:20pm UTC](https://forum.universal-robots.com/t/usb-socket-communication/31526/2 "2024-05-09T20:20:42Z")

</div>

I now have one of the new Mahr boxes which needs to communicate with a UR3e controller.  
As I mentioned in my first post, the older systems send & receive commands through socket\_send() and socket\_read() script commands, via serial-ethernet adapters.

I’m assuming I can go directly into a USB port in the robot, but I’m not sure what the script commands would be.

I can talk to the gage with my PC using Hyperterminal or puTTY - what would be the equivalent communication process with the UR?

Or do I just use a cheap USB-Ethernet adapter and go with the same old strategy?
