Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPi3: GPS cannot connect via UART #393

Closed
ghost opened this issue Apr 20, 2016 · 9 comments
Closed

RPi3: GPS cannot connect via UART #393

ghost opened this issue Apr 20, 2016 · 9 comments

Comments

@ghost
Copy link

ghost commented Apr 20, 2016

  1. Stratux version: 0.8r2 build da5f5d0

  2. Stratux config:

    SDR
    [X] single
    [ ] dual

    GPS
    [X] yes
    [ ] no
    type: MTK3339

    AHRS
    [ ] yes
    [x] no

  3. Description of your issue:

On the Raspberry Pi 3, devices ttyAMA0 and ttyS0 are not the same device. ttyAMA0 connects to the PL011 hardware UART (accessible via GPIO pins 8 and 10). ttyS0 uses a differrent hardware address and interrupt (mini-UART / Bluetooth?) -- in either case it does not address hardware connected to pins 8/10.

Suggest removing references to /dev/ttyS0 from ry835ai.go.

root@raspberrypi:/dev# dmesg | grep "tty"
...
[    0.268390] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 29, base_baud = 50000000) is a 16550
[    0.927135] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev2
root@raspberrypi:/dev# cat /dev/ttyAMA0
$GPGSV,3,2,12,51,36,199,,17,33,091,27,25,18,317,25,24,18,247,26*76
$GPGSV,3,3,12,03,09,034,14,05,05,187,16,28,03,147,16,23,01,068,*79
...
root@raspberrypi:/dev# cat /dev/ttyAMA0
root@raspberrypi:/dev# 
@peepsnet
Copy link
Contributor

peepsnet commented Apr 20, 2016

So can we get the 835/836 to connect on the pi3?

I am having an issue with that. I can get ttyS0 to show data with the 835 connected to pins 8 & 10. But it is unreadable. I am not able to get any baud rates to return usuable data...

If I screen /dev/ttyS0 9600 I see data but it's junk. If I disconnect pins 8 or 10 the data stops...

I have tried to connect on /dev/ttyAMA0 on my rpi3 and nothing. I have talked with cyoung about this.

I have 2 835's and both work on my rpi2. Plugging either 835 in to the rpi3 and I get nothing usuable.

My Rpi2 does not have a ttyS0 at all. Does yours? With the 835 connected there is a ttyAMA0 but no ttyS0

The ttyS0 only was seen on the rpi3...

PS. Got 2 ry836ai on the way

@skypuppy
Copy link

@ghost
Copy link
Author

ghost commented Apr 20, 2016

Add dtoverlay=pi3-miniuart-bt to the end of /boot/config.txt. This will release the Bluetooth adapter from using the hardware UART, and make serial accessible over the GPIO pins.

@ghost
Copy link
Author

ghost commented Apr 20, 2016

Simulpost! :-D

@skypuppy
Copy link

Great minds think alike: always in the gutter.

@peepsnet
Copy link
Contributor

peepsnet commented Apr 20, 2016

I followed the steps here:
http://www.briandorey.com/post/Raspberry-Pi-3-UART-Overlay-Workaround

and was able to get valid NMEA data on ttyAMA0

Does this mean we have to have version checks for RPi3's and mod the /boot/cmdline.txt , /boot/config.txt and sudo nano /lib/systemd/system/hciuart.service on all RPi3 on initial boot?? or can we do this for all RPi's and it will still work??

And then the Bluetooth will never work with a serial port interface in use????

@ghost
Copy link
Author

ghost commented Apr 20, 2016

@peepsnet -- we're using a version of Jessie dated after 3/18, so the simplified method in @skypuppy 's post (and originally discussed on reddit: https://redd.it/4bh5ku) is what we've been using on our Pi3s, and what I submitted in PR #394.

In theory, this should still allow BT use on the "mini UART" - though I haven't tested. Also need to validate on older Pi's.

@peepsnet
Copy link
Contributor

peepsnet commented Apr 20, 2016

Thats just the
nano /boot/config.txt
add dtoverlay=pi3-miniuart-bt
reboot
ok. ill try that.

@peepsnet
Copy link
Contributor

SO the question become does this line in the /boot/config.txt break the RPi2s and RPi0s...

cyoung added a commit that referenced this issue Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants