I have a small problem. I have purchased a Bluetooth adapter and have inserted it into my Pixhawk TELEM1 port following this easy tutorial:
I now need to read GPS coordinates transmitted from an Android application I developed that are received by this Bluetooth module. Inside the App these cords can be typed, selected by tapping a Google Map Fragment in the App or retrieved from a DB on my website. My current efforts to read from the TELEM port have used Mission Planner python scripts.
It is extremely easy to set a waypoint with a simple Python Mission Planner python script:
I would love to be able to fill the lat,lng and alt variables with data retrieved from the Android App I have developed. Unfortunately, I do not know how to access the TELEM 1 pin to read from. The closest I have found to this is:
ser = serial.Serial(port='/dev/ttyUSB0', baudrate=57600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, timeout=0)
print("connected to: " + ser.portstr)
I believe ttyUSB0 is a USB port, and I believe it is the USB on the Pixhawk. I have tried modifying the USB0 and other parameters to a variety of tags hoping to discover the TELEM1 pin by chance, but no luck yet. (I found this script from http://stackoverflow.com/questions/24227833/reading-data-from-ardup...)
So in short, does anyone know how to read data from bluetooth with python scripts with a pixhawk and ardupilot? Or at least a way to read data coming in through the TELEM port? Or do you know of any board/setup that will allow me to read bluetooth data from my App to set waypoints? I would be eternally grateful.
I will release all the code and even allow people to use my servers to store/transmit their own cords for free as soon as I get this, which will be way cool for the community I think.
Also, I did make a similar post in the ardupilot forums but have received no help:
(Mods I did not know what category to put this in, so I left it blank. Feel free to put it wherever and sorry)