Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Serial communication with Ubunut 16.04 Host

0 votes
Hello JeVois Team,

I am currently trying to make JeVois speak to a ROS-based system (on Ubuntu 16.04). I have already written some code which produces the desired output on the serial console in JeVois Inventor. As expected, I could not read the serial data from this port in a ROS-Node or Terminal, because the IDE blocks this port. So here my question: How can I run a specific script that's saved on Jevois without opening the IDE? I have already tried modifying the initscript.cfg (as explained in the headless tutorial), I can then connect to the port after plugging the cam out and in again but it shows no messages. I can not even determine what runs on Jevois after restarting, only when I open the IDE the saliency demo is running. (But if this demo would already run after plugging the camera in, wouldn't I see  the serial output generated by it?)

I also already deactivated ModemManager, as written in your tutorial.

Thank you for your help
asked Jul 22, 2019 in User questions by Canorvantis (120 points)

1 Answer

0 votes

You probably need to send serial outputs to the serial-over-USB port, adding this to your initscript.cfg, after you have loaded a module with setmapping2:

setpar serout USB

Have a look here for more details: http://jevois.org/doc/UserCli.html

in particular, see section on "Serial communication types": JeVois sends two types of messages: log messages that provide information messages to humans (serlog), and output messages about what it sees and that are intended for machines (serout).

Then, each of these can be directed to either the hardware 4-pin port, or serial-over-USB port, or both, or none.

To select what goes where, you send instructions to JeVois, eg

setpar serout Hard # serout messages to 4-pin port

setpar serlog USB # serlog messages to serial-over-USB

setpar serout None # serout messages not sent anywhere

setpar serlog All # serlog messages sent to both 4-pin and serial-over-USB

In the code of a module, to send a message to serout, you use sendSerial(), and to send to serlog you use LINFO(), LERROR(), or LFATAL() and note that LFATAL() also throws an exception.

answered Jul 23, 2019 by JeVois (46,580 points)