-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
usb_cdc.serials[1].connected always return False for Raspberry Pi Pico #4345
Comments
I do not see this problem with beta.3, either on Windows or Linux. I do have to be connected to
|
I wonder if the C# code you are using is closing the connection after each write or something like that. If you do a read with a timeout in C# so it hangs while you check, does it show as connected during that time? |
The C# code uses the SerialPort.DataReceived event, and waits for a text line. It opens the connection and waits. |
You need to set line state DTR to 1, it is used by tinyusb to detect terminal connection |
Thanks @hathach. Some websearching shows this is a convention, and that terminal programs typically assert it when opening the conenction. So does Some more websearching shows that other people have had this problem with C#, which defaults to DTR not being set. |
Firmware
Code/REPL
Behavior
Running the following code ALWAYS returns
False
, even when reading data to/from the Raspberry Pi Pico, on that USB CDC channel.Additional Info
Despite returning
False
, the link is working properly.I can send and receive data, without any issues.
According to this: https://circuitpython.readthedocs.io/en/latest/shared-bindings/usb_cdc/index.html
Since it is connected to a host, should return
True
.And no, the Raspberry Pi Pico is the only device connected to serial, and both ports belong to it:
![image](https://user-images.githubusercontent.com/10207857/110187767-70fb6700-7e11-11eb-9fc9-40dc30ca4bc2.png)
The text was updated successfully, but these errors were encountered: