Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to read the serial port by the following command after opening the device. read(fd,&UBX_buffer,1); for it was working fine but for some reason it stopped working and while I was debugging it sometimes the read function returns -1 and other times returns an integer value. what could possibly do that. I really don't know what to change because it was working fine previously.

share|improve this question
Does This help? –  Mitch Jun 7 '13 at 20:00
When syscalls fail, check the value of errno to find out why. –  psusi Jun 7 '13 at 21:39
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.