GPS, Bluetooth and Android Transparent Transmission
Wireless device communication with each other is in our live everywhere. Here we will show you how to transparent transmit GPS receiver module's GPS Data to PC or Android phone or at same time by Bluetooth. That's means we will use Bluetooth device connect GPS receiver module and send GPS Data to other side Bluetooth device, then used a USB-to-RS232 adapter transmit the data to PC. If you still do not very clear :), please read on , we divided this post into three steps:
1. Material preparation;
2. Transparent transmit to Android;
3. Transparent transmit to PC.
Step One: material preparation.
It's a cool project and maybe you will get good idea from this. Let's take a look what material we need preparation.
The project's material include:
1. Two Blueooth devices, here we used a Bluetooth Bee (HC-05) with XBee/Bluetooth Bee USB adapter and a Bluetooth Modem - Minimum pass-through module(HC-06). You can reference "ElecFreaks Bluetooth Family" for more options.
2. One Android phone, here we used the first and classic Android phone - G1, though it is a old guy.
3. One GPS receiver module, we used Easy GPS Unit – Fastrax UP501 Receiver Module. Fastrax UP501 GPS receiver module with embedded GPS antenna enables high performance navigation in the most stringent application, special used UART interface.
5. PC and Power supply，at last of course you need a PC and a 3.3V power supply, if you have not 3.3v power supply, you could use Arduino main board provided it. OK, use these material UP501-to-Bluetooth Modem connect: RX – TX, TX – RX, GND – GND, VDD&VDD_B – VCC - 3.3V Power supply. (Note: VDD_B is backup power supply, there must be connected, otherwise UP501 receiver module do not working.) Bluetooth Bee is through XBee/BTBee USB adapter connect to PC. The Connection as below:
Step two, transparent transmit to G1
1. Ok, if you connection is correct and then power on the GPS & Bluetooth device. The state LED will start Blink. Here we just used serial port send GPS receiver module data to Bluetooth device - Bluetooth Modem - Minimum pass-through module(HC-06), then send it to the paired device. So the next step is pair with G1.
2. How dose Bluetooth device pair with Android ? Just follow me , if you want more details please reference "Communication between Android and Arduino with Bluetooth(2)" --> Dowload our Bluetooth App here, and then install it, and you will see a Blueooth Bee icon. --> Click the icon enter and then click the “Open Bluetooth” enable Bluetooth to make it discoverable. There is a dialog box will appear and select “Yes”. --> Click “Open Bluetooth” and then Click “AS Client”, it will search the remote devices and return the device address. Click the address to pair and connect it and the paire password is "1234", if connect succeed it will return to the menu and GPS data as below:
From the figure, there are GPRMC, GPGGA, GPGSA, GPGSV data etc. Right now, the G1 has receive the original GPS data, we did not carefully analyse the GPS data. Maybe you can do it. Step three, transparent transmit to PC
1. Keep on GPS & Bluetooth connection, and connect Bluetooth Bee to PC with XBee/Bluetooth Bee USB adapter.
2. Open a serial port tool, SecureCRT or sscom32E etc, Here we used sscom32E to monitor Serial port and send AT command. Select USB adapter COM correctlly, and BaudRate is 34800, and then send ‘AT’ for testing. If return 'OK ' that means you have enter AT mode. (Note: HC-05 enter AT mode must set KEY pin to High Level, If you used XBee/Blutooth Bee USB adapter you just need select the KEY switch to 'H' on board).
3. Before pair with each other, you should set the Bluetooth Bee to Master mode, because of pair each other must be a Master and a Slave mode. The Bluetooth Modem - Minimum pass-through module(HC-06) is Slave mode at here. The command(More details about Bluethooth visit wiki) as below: ----> at+role = 1 //Change the role. <---- OK // Return -----> at+init // Initialization <---- OK -----> at+inq //Search the remote devices and return address <----+INQ:11:6:30074,1F00,7FFF //Slave device address ----> at+pair=11,6,30074,20 // pair request <---- OK -----> at+link=11,6,30074 //after paired successful, link to each other <----- GPS DATA
OK, we have transparent transmit GPS data to Android or PC side by Bluetooth, about GPS Workbench please read "Easy GPS Unit – Fastrax UP501 Receiver Module".