I\'m working on a project in which I have to receive some 25 character data at a time in order to process it in Raspberry Pi. Here is the example code that generates some da
I had to struggle with this when reading gps data in raspberry pi. The output would stop after about 10seconds and report
device reports readiness to read but returned no data (device disconnected?)
The solutions given in almost all forums are for raspberry pi 2 with wheezy. I finally managed to get continuous gps streaming in my raspberry pi3 with jessie by doing the following:
enable_uart=1
and add dtoverlay=pi3-disable-bt
in /boot/config.txt. then rebootI had to change my /boot/cmdline.txt to
dwc_otg.lpm_enable=0 console=tty1 console=serial0,9600 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
then reboot
stop getty:
sudo systemctl stop serial-getty@ttyAMA0.service
to disable: sudo systemctl stop serial-getty@ttyAMA0.service
You need to be careful with the /boot/cmdline.txt. Any mistake in the file may make your raspberry pi to not boot. It is better keep a backup of the file before editing. Also set the baud rate properly. In my case, it was 9600. Hope this helps!