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.

No messages from serial port without reading USB serial

+1 vote
Hi,

we use the JeVois to run vision algorithms and send the results via mavlink across the hard serial port. Thereby we ran into a weird problem. When we run the JeVois in standalone mode (streamoff start) we can see the algorithms running (screen on usb serial) and receive mavlink messages . However, as soon as we close the screen connection, we don't receive mavlink messages anymore. The module continues running as we can observe through logs as well as a counter that we send via the usb serial.

This problem appeared after the update to jevois 1.9 and caused quite severe problems. Do you have an idea what could cause this issue and how to resolve it ?

Edit: We found a way to circumvent this problem. If we configure the 'serlog' also to 'Hard' the problem does not appear. So it seems the mavlink access does not indicate to keep the serial port open, Is that possible?

So to summarize:

serlog USB serout Hard --> The sending of messages over the hard port stops when we don't listen to the messages on the USB port.

serlog Hard serout Hard --> The problem does not appear. We receive everything on the hard port.

Thank you.
asked Oct 4, 2018 in Programmer Questions by phildue (420 points)
edited Oct 4, 2018 by phildue

1 Answer

0 votes

Thanks for the detailed report, we will investigate. There are recurring issues with serial-over-USB which stem from the following limitation (in the linux kernel or in the serial-over-USB specifications, we are not sure):

- on the JeVois side, there is no way to know whether someone is listening on the host side

- but, if we send too much data and nobody is listening, we will eventually block as the buffers are full

So we have to find some logic for not blocking (which would completely halt the main loop on JeVois) without knowing whether someone is listening or not. That logic is in Serial.C in writeInternal() and indeed we have updated it recently which may have triggered your problem. The reason was that during large file transfers over that link (used by the Inventor to upload code, icons, etc to JeVois) we would eventually drop data which would completely break the transfer. We will try to update the logic so it both works for large file transfers and for your scenario. In the meantime, maybe try setpar drop true and see whether that has any effect?

the code is here, in writeInternal():

http://jevois.org/doc/Serial_8C_source.html

answered Oct 4, 2018 by JeVois (46,580 points)
Thank you for the quick reply. Unfortunately the option did not help.
...