×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Linux serial communication => nul characters

Linux serial communication => nul characters

Linux serial communication => nul characters

(OP)
Hi,

i programming (c++) a communication application using struct termios. the communication runs but the character 0 (ASCII NUL, binary 0) will ignored, always and at both streams, input and output. the communication port is /dev/ttyS0 (PC-Com1).

the essential configuration of the port is setting on "raw" (non-canonical, ...) and all input and output options are disabled (no parity checking, no OPOST, ...).

what can i do to transfer the nul character correctly??

thanks all!!!!

hostbuster

RE: Linux serial communication => nul characters

I cannot c++ but I have done some comm applications: is it possible that your application considers nullce as field delimiter? Can you perhaps change the null to some least frequently used character instead of it just before the transmission? This is not an exellent step but works.
m777182

RE: Linux serial communication => nul characters

(OP)
Hi m777182,

thank you for your reply. That was my first self written communication program under linux. In raw mode nul characters will transferred. The fault was between the ears :(
Now i can say (for interested programmers and beginners): programming serial communication for linux is very easy!!! easier than for windows!!!

thank you and best regards!!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources