Serial Communication in Canonical Mode [closed]
Clash Royale CLAN TAG#URR8PPP
I am sending commands over a serial port from a Linux embedded device to some serial enabled firmware using ascii human-readable commands terminated by newlines. Is it appropriate to use canonical mode here, or is canonical mode usually reserved for interactive terminals? The examples I find online for this type of application use raw mode.
In particular, in canonical mode, how do I check without blocking if an entire line is available for reading?
serial-port
closed as off-topic by thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz Dec 14 at 8:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz
add a comment |
I am sending commands over a serial port from a Linux embedded device to some serial enabled firmware using ascii human-readable commands terminated by newlines. Is it appropriate to use canonical mode here, or is canonical mode usually reserved for interactive terminals? The examples I find online for this type of application use raw mode.
In particular, in canonical mode, how do I check without blocking if an entire line is available for reading?
serial-port
closed as off-topic by thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz Dec 14 at 8:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz
what language or event framework are you using? with async I/O there's usually "hey there's some data available" notifications or callbacks
– thrig
Dec 11 at 18:07
I'm using C/C++. Since I don't want to parse lines myself, I want to know if a full line is available, not just some data. There is a discussion happening under my post on Stack Overflow: stackoverflow.com/questions/53728798/…
– Colin
Dec 13 at 21:00
add a comment |
I am sending commands over a serial port from a Linux embedded device to some serial enabled firmware using ascii human-readable commands terminated by newlines. Is it appropriate to use canonical mode here, or is canonical mode usually reserved for interactive terminals? The examples I find online for this type of application use raw mode.
In particular, in canonical mode, how do I check without blocking if an entire line is available for reading?
serial-port
I am sending commands over a serial port from a Linux embedded device to some serial enabled firmware using ascii human-readable commands terminated by newlines. Is it appropriate to use canonical mode here, or is canonical mode usually reserved for interactive terminals? The examples I find online for this type of application use raw mode.
In particular, in canonical mode, how do I check without blocking if an entire line is available for reading?
serial-port
serial-port
asked Dec 11 at 17:00
Colin
13819
13819
closed as off-topic by thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz Dec 14 at 8:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz
closed as off-topic by thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz Dec 14 at 8:49
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – thrig, RalfFriedl, Stephen Harris, Archemar, Mr Shunz
what language or event framework are you using? with async I/O there's usually "hey there's some data available" notifications or callbacks
– thrig
Dec 11 at 18:07
I'm using C/C++. Since I don't want to parse lines myself, I want to know if a full line is available, not just some data. There is a discussion happening under my post on Stack Overflow: stackoverflow.com/questions/53728798/…
– Colin
Dec 13 at 21:00
add a comment |
what language or event framework are you using? with async I/O there's usually "hey there's some data available" notifications or callbacks
– thrig
Dec 11 at 18:07
I'm using C/C++. Since I don't want to parse lines myself, I want to know if a full line is available, not just some data. There is a discussion happening under my post on Stack Overflow: stackoverflow.com/questions/53728798/…
– Colin
Dec 13 at 21:00
what language or event framework are you using? with async I/O there's usually "hey there's some data available" notifications or callbacks
– thrig
Dec 11 at 18:07
what language or event framework are you using? with async I/O there's usually "hey there's some data available" notifications or callbacks
– thrig
Dec 11 at 18:07
I'm using C/C++. Since I don't want to parse lines myself, I want to know if a full line is available, not just some data. There is a discussion happening under my post on Stack Overflow: stackoverflow.com/questions/53728798/…
– Colin
Dec 13 at 21:00
I'm using C/C++. Since I don't want to parse lines myself, I want to know if a full line is available, not just some data. There is a discussion happening under my post on Stack Overflow: stackoverflow.com/questions/53728798/…
– Colin
Dec 13 at 21:00
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
what language or event framework are you using? with async I/O there's usually "hey there's some data available" notifications or callbacks
– thrig
Dec 11 at 18:07
I'm using C/C++. Since I don't want to parse lines myself, I want to know if a full line is available, not just some data. There is a discussion happening under my post on Stack Overflow: stackoverflow.com/questions/53728798/…
– Colin
Dec 13 at 21:00