Hi all,
Iām afraid I am also having problems using /dev/ttyAMA0
on a Raspberry Pi 2 and the latest Resin OS (2.0.0.+rev3 dev, supervisor 4.1.1); and I was wondering if anyone might be able to help or suggest a fix?
My setup is a Raspberry Pi 2 (model B) with an Adafruit Ultimate GPS Hat attached. This hat communicates with the Pi over a serial interface. Using the latest Raspbian Jessie Light (4.4) rather than Resin, the device behaves as expected and GPS data comes streaming through /dev/ttyAMA0
:
Raspbian Jessie (4.4)
$ sudo stty -F /dev/ttyAMA0 raw 9600 cs8 clocal -cstopb
$ sudo cat /dev/ttyAMA0
$GPGGA,000342.800,,,,,0,00,,,M,,M,,*75
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000342.800,V,,,,,0.00,0.00,060180,,,N*4F
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,000343.800,,,,,0,00,,,M,,M,,*74
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000343.800,V,,,,,0.00,0.00,060180,,,N*4E
...
Whereas, connecting to the Resin.io supervisor container and running the same commands (without sudo) does not produce any data:
Resin OS 2.0.0+rev3 (dev), supervisor 4.1.1
$ sudo resin local ssh aa5f942.local
? Select a container /resin_supervisor (776a546709d) - Up 7 minutes
/usr/src/app # stty -F /dev/ttyAMA0 raw 9600 cs8 clocal -cstopb
/usr/src/app # cat /dev/ttyAMA0
(no output)
It is the same hardware in both cases, so Iām certain it is a configuration or software problem. Iāve wondered if the difference might be down to the cmdline.txt
or config.txt
files on Raspbian vs Resin? The Raspbian configuration files are:
Raspbian cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=16a0382a-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Resin cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
Raspbian config.txt (non default values)
dtparam=audio=on
Resin config.txt (non default values)
dtparam=i2c_arm=on
dtparam=spi=on
disable_splash=1
avoid_warnings=1
dtparam=audio=on
enable_uart=1
I was thinking of trying an older version of Resin OS next as the reports in the thread above suggest that does work? Iād be very grateful for any tips or pointersā¦
Thanks,
Martyn.