I am trying to pair a GPS (Emlid Reach RS2+) with bluetooth but I am unable to get the bluetooth module to work in linux on the pi. I keep getting an error message “Failed to start discovery: org.bluez.Error.InProgress” when I use the “scan on” command.
Hi @antcrook -
Unfortunately BlueOS does not have support for bluetooth devices (somewhat ironic given the name!) You can report this issue and see how it is handled by the developers here - it looks like @patrickelectric noted this would be useful to support ages ago, but may need more data or demand for the feature! Commenting on that existing issue is likely better than creating a new one.
In the meantime, is it possible to connect that GPS to the ethernet network of your system (a BlueBoat?) That would let it stream data to the autopilot via UDP… as noted in the BlueBoat FAQ!
I was hoping to pair it at the linux level then access the stream from the com port with blueos
Would I be able to use the Bluart and connect it via serial port on the Receiver?
Hi @antcrook -
If your GPS has rs485 or serial uart (5v ttl levels) then yes you could connect via a Bluart. RS232 would require a different USB adapter. Does the GPS have an Ethernet connection?
I have a USB C and I have WiFi. The serial is RS232
Using a USB C to Ethernet adapter I am able to access the receiver via the DHCP assigned IP address on my desktop. The receiver allows me to stream the NMEA sentences over TCP port 9000, and using PuTTY I am able to see the data streaming. I tried to plug it into the Bluerobotics Ethernet Switch, but I am unable to determine the IP address assigned to it and the green light is on, but not flashing.
Hi @antcrook -
Does the receiver have a USB-C port that you’re connecting to via that USB to ethernet adapter? If you configure the GPS to have a static 192.168.2.X IP address, where X is something like 45, then you can further configure it to send the appropriate NMEA sentences to the autopilot at 192.168.2.2:27000. From the BlueBoat FAQ:
Any NMEA position stream can be parsed by the Navigator Autopilot. To receive the messages from a network-connected device simply configure the Autopilot parameters GPS_Type to NMEA, Serial2_Protocol to GPS, and verify no other Serial port # protocol is set to GPS. Finally, under Autopilot Firmware, Serial port Configuration, set Serial 2 to: udpin:0.0.0.0:27000. Then direct your UDP NMEA stream to the IP address of the BlueBoat. Note that these NMEA messages are required for navigation: RMC, GGA, VTG, HDT. This approach uses the ArduPilot driver to interpret the NMEA messages - you can also use the NMEA Injector in BlueOS, which has support for fewer messages. If using a serial connection to bring the NMEA position data to the Navigator serial port 3 or 4, set the appropriate Serial# Protocol parameter to GPS and restart the autopilot. NMEA messages should be sent at 10hz or faster.
I think part of my problem is that I do not have the Navigator flight controller, I am using the Orange Cube and I don’t see the option to configure the ports. I have ordered one.
I was not able to directly change the IP address on the GPS receiver, so I installed a mini router and assigned it a static IP of 192.168.2.74 and that seems to work as I can see it on Blueos. I am not able to direct the TCP stream to the 192.168.2.2 address as the only option is localhost on the receiver. Is there another way to do it from Blueos? I can also just go back to my original plan and use the serial cable with the correct usb adapter.
Hi @antcrook -
Perhaps you can set that modem to do port forwarding to direct traffic from an address you can target, to the Pi IP of .2.2? You’ll likely get better bandwidth with an ethernet vs. serial connection, but either should work…