Timeline for Script on pc only gets 640 characters via serial
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 8, 2016 at 11:12 | vote | accept | Mads Skjern | ||
Mar 8, 2016 at 9:40 | comment | added | SoreDakeNoKoto | @MadsSkjern Have you tried the suggestions in both answers? Any improvements or differences? Still reading exactly 640 chars every time? | |
Mar 8, 2016 at 8:35 | history | edited | Mads Skjern | CC BY-SA 3.0 |
deleted 30 characters in body
|
S Mar 8, 2016 at 8:30 | history | suggested | user3704293 | CC BY-SA 3.0 |
add code highlighting
|
Mar 8, 2016 at 6:13 | review | Suggested edits | |||
S Mar 8, 2016 at 8:30 | |||||
Mar 7, 2016 at 23:28 | answer | added | Majenko | timeline score: 3 | |
Mar 7, 2016 at 23:19 | comment | added | Majenko | CDC/ACM packets are 64 bytes in size. It makes sense that there may be 10 packet buffers allocated, which makes 640 bytes. | |
Mar 7, 2016 at 23:14 | comment | added | Majenko |
It could well be that the Teensy is able to buffer 640 bytes in the USB buffer and discards everything else. When you open the port on the PC it then receives the 640 bytes that have been buffered. Make the Teensy wait for the port to be opened before doing any sending (while (!Serial); )
|
|
Mar 7, 2016 at 23:11 | comment | added | Mads Skjern | I am sure I don't miss the first chunk, because when I ask it to print, it shows that the first 640 characters is the start of the data. | |
Mar 7, 2016 at 23:08 | answer | added | Nick Gammon♦ | timeline score: 0 | |
Mar 7, 2016 at 23:01 | comment | added | Majenko | Typically CDC/ACM will discard characters if the port is not open at the remote end - or it will discard characters after the buffer is full. This is different to UART since a UART can transmit regardless of what is wired or not wired to it - CDC/ACM can only actively transmit if the port is open at the remote end. | |
Mar 7, 2016 at 22:59 | comment | added | Majenko | You're not actually using a serial connection there - you're using a USB CDC/ACM connection, which is a whole different ball game. Are you sure you're not just missing the first chunk of the data while you're sending without the python program running? | |
Mar 7, 2016 at 22:25 | history | asked | Mads Skjern | CC BY-SA 3.0 |