Problem using serial write [closed]

asked 2015-04-22 11:11:26 -0500

NightGenie gravatar image

updated 2015-04-22 17:38:02 -0500

I'm trying to make a ros node to communicate with epuck robots through a serial rfcomm device, the port connects(and the bt led on the robot turns on) but the write function returns 0 and the robot does nothing any help? the qt terminal example works so there should be something wrong with my code ubuntu 14.04; ros indigo, bluetooth adapter BT0015 from LogiLink Edit The robot is this one www.e-puck.org

I'm using this wjwwood.io/serial/ for serial communication

I'm passing a string to the write function of the object like this

write("T, 3\n");

I mentioned the qt example just as a prove that my hardware works

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-08-28 03:04:34.915214

Comments

Please improve your question, from this I have no idea what software in ROS you are using, what part of your code has the problem (other than write, but what are you writing and how?), what an epuck robot is, or what qt terminal example you're using.

William gravatar image William  ( 2015-04-22 13:39:36 -0500 )edit

What happens if you do write(std::string("T, 3\n");? (obviously do #include <string> at the top of your file too)

William gravatar image William  ( 2015-04-22 19:19:30 -0500 )edit

Write still returns 0

NightGenie gravatar image NightGenie  ( 2015-04-23 04:35:27 -0500 )edit

I would need more context to help, it would be great if you could provide a complete, but simple example which has the problem.

William gravatar image William  ( 2015-04-24 15:29:53 -0500 )edit