![]()
The results you describe are similar to non-blocking canonical mode (when you actually want (blocking) raw mode). ![]() However, when I try to read from the serial port read() returns -1 almost all the time, until suddenly at a seemingly random point I get a massive dump of messages all at once. The read() is supposed to block until an EOL (end of line) character is received. The results you describe are similar to blocking canonical mode (when you actually want (blocking) raw mode). #Purebasic Serial Port Example codeI've tried setting it up in a blocking configuration but if I do that the code just hangs indefinitely at the first read(). So the issue seems to be when I try to read from the port. I've connected my laptop to the serial port as well so I can spy on the transmissions using RealTerm, and I've verified that commands are being sent by the MIO-3260 correctly AND being responded to correctly by the drive. Let me know if there's anymore information I can provide. Sometimes I run it and it responds most of the time and then mysteriously it just stops and then comes back intermittently. I've been troubleshooting it for the last few days and have no idea what's going on. Instead I receive a huge number all at once and none at other times (for example I just received 810 bytes at once after sending 946 commands with no response). Here's a sample of the kind of message I should be receiving. To read from the serial port, my code is as follows: uint8_t buf //Rx bufferįor(int i=0 i
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |