Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to ttyACM0 supported? #35

Open
TobyOnGithub opened this issue Mar 3, 2024 · 1 comment
Open

Connection to ttyACM0 supported? #35

TobyOnGithub opened this issue Mar 3, 2024 · 1 comment

Comments

@TobyOnGithub
Copy link

Hi there, I have connected my AUNO to my linux box and Arduino IDE finds it on port /dev/ttyACM0 (ACMZERO). But in BSP it shows up with a alternating green/red flickering for () and something is plotted. The scetch I have uploaded is
https://github.com/upsidedownlabs/BioAmp-EXG-Pill/blob/main/software/EMGEnvelop/EMGEnvelop.ino

In the terminal from where I have started BSP it writes:
unable to get portstatus: Bad file descriptor

I do set the baudrate to 115200.

Any suggestion what is wrong?

@Mikaburrie
Copy link

Mikaburrie commented Jan 30, 2025

I'm about a year late, but I figure I'd post this in case somebody else ran into this issue. I had the same issue as you described. The selection for the serial device (ttyUSB0 in my case) was flickering between red and green while plotting some values.

The program has a timeout for reading serial values, and if it doesn't receive anything in a certain time frame, it assumes the serial connection has stopped. Increasing the value of cycle_timeout defined in include/BetterSerialPlotter/SerialManager.hpp to 500000 extends this timeout and solved the issue for me. After doing this, the serial selection stays a solid green color and everything is read properly.

As for the 'unable to get portstatus: Bad file descriptor' error, I think that is due to a bug in the mahi library used for serial communication. When a port is closed, the is_open_ property isn't set to false. When open() is called after closing a port, close() is called again which prints the error.

I hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants