I’m using screen to read the text from a serial console. The problem is the output seems to only have newline \n but not carriage return \r, so the display looks like this…
Line1
Line2
Line3
I wonder if there is any patch to fix this issue?
When I need to read the serial data from some devices in Linux, I used the screen but I’ve found the similar problem above. And it was frustrating that there is almost no solution to solve the problem. So I start to try Picocom, a tiny and easy-use tool like screen. The most importance is that it can map something to avoid the above phenomenon.
you can type command as follows:
picocom -b115200 /dev/ttyUSB0 –imap lfcrlf
where -b represents the baud rate and /dev/ttyUSB0 is the name of device. imap is the input map which means map [LF] to [CRLF] in input data.
Since I has not installed the Chinese input in my ubuntu, what I can do is to record that in English.
Problem: I compiled my Contiki codes (for example, “hello-world”) and upload to the telosB. Generally, we use the instructions as follows:
make hello-world.upload TARGET=sky
But the failed words instead of expected results appeared on the terminal. It said about permission denied for the ttyUSBx ports.
I searched on Google and found most circumstances like me are with higher version of msp430-gcc. If you added sudo the aforementioned command, you well get “make: msp430-gcc: Command not found” something like that. It looks confused and I posted my solution here which is referred to this.
Solution:
sudo adduser $USER dialout
Type the above command to add “user” to the dialout group and log out for this change to take effect next time you start or restart the computer directly. Everything will be ok!