ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

p2os driver with ser2net

asked 2014-05-05 07:34:03 -0500

Ohashi gravatar image

Hi, I am new to both ROS and Linux system, just to start.

I was asked to try to connect a Ubuntu Desktop (Quantal) with ros Hydro, with a Pioneer 3 AT, Debian (Sarge) as onboard computer. The connection would be through tcp/ip. The idea is for the Debian to receive serial data (through a local port ) the p2os_driver package would send, and for the Ubuntu to receive serial data (also through tcp/ip) the robot would send. We want the connection to be such, that both parts would not notice the serial data is not connected via serial link, but via tcp/ip. I came across the ser2net, which seems to solve this problem, tough I am not certain. I tried this:

On the Debian, I ran ser2net with this in the conf file:

60001:raw:0:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT

On the Ubuntu, I ran ser2net with this in the conf file:

192.168.1.32,60001:raw:0:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT

It did not work, or at least when I tried to use p2os_driver, the node kept replying to not have received packets from the robot. Can anyone tell me if ser2net can work with another host other than localhost, like I tried? And if so, does only this works for the bidirectional connection as expected in a serial connection? And of course, why haven't I been able to establish a connection?

Thanks for the attention, and sorry for not being much ROS-related. Also, if you can suggest me an alternative that is not upgrading the Debian version in order to install ROS, unless it's really the only option left, I would appreciate a lot.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-07 15:26:08 -0500

TimboInSpace gravatar image

I can confirm it works. my setup does serial A <> computer A<> wifi <> computer B <> Serial B, using ser2net and socat Your debian ser2net conf is correct

60001:raw:0:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT

On ubuntu, install socat and run this:

sudo socat pty,link=/dev/ttyV0,echo=0,raw tcp:[debian hostname]:60001

Then on your ubuntu computer you can access your debian computer's /dev/ttyS0 through the local virtual serial port /dev/ttyV0

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-05 07:34:03 -0500

Seen: 433 times

Last updated: Apr 07 '15