The emulator running some demo data, and showing the result.
The Bluetooth/GPRS application I've been working on is now functional enough that it might be of use to someone. Feedback and suggestions are appreciated. Currently, the application has been left as a dumb bent pipe, so the mcu has complete control over the data stream (though it must conform to the var1=xxx&var2=yyy......\n format for parsing to work, see code and documentation).Code here bb.zipDescription:BlueBot is a bridge between Bluetooth and HTTP. Bluetooth's Serial Port Profile (AKA RFCOMM) is a streaming protocol that acts like a serial port. Due to carrier gateway restrictions, streaming network sockets are often impossible, so HTTP is used. HTTP is not streaming, so BlueBot listens for \n's in the SPP data stream to separate packets. Each packet is then forwarded to a remote server, returning a response that is streamed back over Bluetooth.Use:The UI is rough, and the program surely has bugs. I'll be tidying it up - adding a live display of data, etc... The application was built for the lowest common denominator of phones, so it should work on almost any phone that has JSR-82 and some sort of data capabilites. Be sure to install the PHP script on an accessible IP or else handshaking won't work.The general use is:-Start application-Set up network--Handshake with the remote server-Set up Bluetooth--Search for devices--Connect to a device-Run (Both Bluetooth and Network have to be setup before this)-DisconnectInstallation:I can't really offer any advice on the installation onto the phone - I am very new at this. It has been tested on 2 Blackberry phones and on the Sun ME emulator. It is an unsigned application, so it has to at least ask for permission to use Bluetooth and the network, or it might not even be allowed to install on some phones.Contents:BlueBot.java - Handles program flow and UI elements.BluetoothConnection.java - Bluetooth utilitiesNetworkConnection.java - HTTP Utilities and the network send threadReceiveThread.java - Reads the Bluetooth input and condenses them into packets for SendThread.SendThread.java - Sends packets over HTTP and sends the responses back over Bluetooth.SPP.java - A MIDlet that simulates a Bluetooth device to communicate with. Just prints some test data at 1Hz right now.kmlupdate.php - A slightly updated PHP script that parses incoming data. It doesn't return anything yet except for the handshaking phase.You need to be a member of diydrones to add comments!
Comments
On a side note, I asked a question in the forums about bluetooth/2.4GHz rc gear interference but I don't think there were any responses. I could probably get some mu-metal for it if necessary
I intend to eventually fly at long range, and I am not convinced that xbee will cut it if there are structures or mountains around. Long range radio gear seems expensive and complex to me, and I don't have an amateur radio license anyways. Cellphones are really good radios in disguise, and everyone has one!
So I'll just throw any bluetooth cellphone (ebay) with a GoPhone SIM ($0.01/kb data, very cheap) in the UAV and use a wifi or data card on the laptop (or maybe use another cellphone as the base station). The controller will have a bluetooth module which is cheaper and lower power than a full-on cellular module, so you could use it with either the IMU dev board or the ArduPilot (or anything else), or even use the cellphone processor as a more powerful onboard controller.