Problem using serial write [closed]
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
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.
What happens if you do
write(std::string("T, 3\n");
? (obviously do#include <string>
at the top of your file too)Write still returns 0
I would need more context to help, it would be great if you could provide a complete, but simple example which has the problem.