I'm just about putting the finishing touches on a Bluetooth SPP Android app that I spent the last few weeks working on. I know there are several that are better and do pretty much the same stuff like the Amarino and Bluetooth SPP Pro. But I wanted to code my own and release the code as open source without any restrictions. I don't want to release it unless I'm happy with the code (which needs some more refactoring), but if anyone needs the source, please let me know and I'll post the link here.
It would be a great help if folks on the forum can try it out and give me some feedback in terms of functionality and usability. I'm also happy to work on feature requests/changes that anyone can suggest.
Lastly, I feel I've reached a point where I can contribute (at least a little) in terms of any help anyone needs with getting Bluetooth running on Android and interfacing with Arduino. If anyone is having trouble with his/her implementation of Bluetooth on Android and interaction with Arduino, I'll do my best to help out. Just leave a note on this thread.
Here's the download link: Link removed Look below for link on Google play
Shameless PLUG to my blog which has more details and a video of my last bluetooth enabled robot: Click here
Update (10-July-2013): The app has been published! I've also uploaded the code to github, if anyone needs the code:
Hi Robert - Thanks for trying it out. Honestly, it never crossed my mind that the app could be used to interact between 2 android devices. Were you able to establish the connection without changing the UUID? Reason I ask is that the default UUID in the app is for Serial interfaces only.
Regarding the bugs in the Bluetooth serial profile, I'm not aware of any existing bugs. But one bug I've consistently noticed when using an android phone and the JY-MCU module is that a disconnect command should always be issued before you power off either device. Otherwise, a hard reboot would be required for the other one. i.e. if you turn off the JY-MCU without disconnecting, you most likely would need to reboot your android phone before you can connect again. It won't help if you turn off Bluetooth and turn it back on under settings. I can confirm this in both Android 2.3 and 4.2.2
hi,
i already try using the BlueSerial and i can be used.. but i want to try to modified the app with change the textfield for input 0 and 1 using some buttons like ON and OFF button.. could you give me the information how to modified the app? thank you all.. i hope you all can give me the information about how to modified the app using buttons to control the LED..
Thanks for using the app! I think what you're saying is completely doable but you will need a little bit of android programming knowledge. You will need to remove the text controls on the main screen and replace them with buttons similar to the "send" button currently which sends the data over bluetooth. But instead of getting the text from the textbox, it will be hardcoded to send a specific value. Then you can create more buttons, copy the code over and just change the hardcoded text.
A person on the net was able to create a color wheel and modify the same app to control the mood lighting of his RGB led strips at home. So, this should definitely be doable. Take a shot at it and let me know if you face any problems.
Work keeps me a bit busy these days, so I may not respond immediately. But I'll get back to you surely! All the best!
titilianty:
hi,
i already try using the BlueSerial and i can be used.. but i want to try to modified the app with change the textfield for input 0 and 1 using some buttons like ON and OFF button.. could you give me the information how to modified the app? thank you all.. i hope you all can give me the information about how to modified the app using buttons to control the LED..
thankyou for your information
i already try to modified the app and it make a good one.. but i have any problems now, not for the buttons..
if we use the bluetooth for communicate between android and arduino, first me must pair with arduino bluetooth and then we can control the arduino using android by bluetooth. the problem is, how to change the name of bluetooth of arduino and change the pairing code from android? as usual, if we can change the bluetooth name and pairing code of the arduino, we just change in the code of arduino, like this command : ("\r\n+STNA=BluetoothName\r\n");
but how to change bluetooth name from android not from the code of arduino? Thankyou.. i need your help, please
I am trying to draw graphs in android mobile out of data from accelerometer via bluetooth module,can you help me out with the graph part in android phone from the data that i have received from this app.
titilianty:
thankyou for your information
i already try to modified the app and it make a good one.. but i have any problems now, not for the buttons..
if we use the bluetooth for communicate between android and arduino, first me must pair with arduino bluetooth and then we can control the arduino using android by bluetooth. the problem is, how to change the name of bluetooth of arduino and change the pairing code from android? as usual, if we can change the bluetooth name and pairing code of the arduino, we just change in the code of arduino, like this command : ("\r\n+STNA=BluetoothName\r\n");
but how to change bluetooth name from android not from the code of arduino? Thankyou.. i need your help, please
Hey sorry for the late reply to this. That is definitely a good question. I haven't bothered to go deep into this because I didn't need it, but it's something you will need if you want to build something more than a prototype. Here is a link which allows you to change the name of the device. You can set it up so that the device disconnects when you do this, then programs it and then opens it for connection again.
Your app will also need to re-scan for available bluetooth devices. Might be a bit more involved. You can find more search results by searching for "linvor AT commands"
souryab:
I am trying to draw graphs in android mobile out of data from accelerometer via bluetooth module,can you help me out with the graph part in android phone from the data that i have received from this app.
Sorry, I won't be able to help you with graphs on the Android since I haven't worked with them. But there are several results on Google and Stack Overflow which help with this.
Also here's a link that someone who used the app mailed me. It's an ECG scanner that uses Bluetooth, I'm impressed
I know im re-awakening a practically dormant thread, but this seem'd as good a place to start as any.
I was wondering if anyone knew enough about java to help me meld this bluetooth serial app with another called "Arduino Colour"
Arduino Colour is an app that basically allows you to send 3 bytes representing RGB colour values over a USB OTG connection with a supported device.
You select a colour by tapping on the screen and it sends the 3 bytes that represent it over USB by calling "device.write()" which is added by a custom android driver simply called "usb-serial-for-android"
A sketch on the arduino then reads these 3 bytes and uses them to set the PWM value of 3 pins to make the LED strip change colour, though nothing says you couldnt modify it to send a comma separated list of integers and catch them on the arduino with "Serial.parseInt()" and do it that way.
Essentially, i want to add BlueTooth support to the Arduino Colour app. Any help you can offer would be appreciated.
I took a look at the Arduino Colour app and I think it's pretty interesting that it allows you to do it over USB OTG.
My suggestion would be to set up the Arduino code and see if it works via Blue Serial by just typing the code in. Once that works, you can build your own "Activity" in Blue Serial which will have buttons that will have pre-assigned values to pass over bluetooth.
Should be fairly straightforward if you reuse the code from Blue Serial. It's been a while since I worked on this, but from what I remember, it was more difficult to get Serial.parseInt working the way I wanted when I had a variable length instruction set.
Take a shot at it and feel free to ask if you have any questions!
void setup() {
pinMode(13,OUTPUT);
Serial.begin(9600);
}
void loop() {
char c = Serial.read();
Serial.println("you have a connection");
if (c == '1') digitalWrite(13,HIGH);
Serial.println("13 on");
if (c == '2') digitalWrite(13,LOW);
Serial.println("13 off");
delay(1000);
}
so when i use serial monitor every this is ok and fine
but when i use mobile app Bluetooth spp pro nothing is happening
unreadable text continue receiving on mobile from arduino
sir what to do have to some correction in hard wiring or what ??
i see somewhere voltage divider is used to to maintain some voltage level at rx or tx pin of HC-05 module.
what to do please help
please suggest best app to control digital pin to set high/low via bluetooth
Why all the white space that makes your post hard to read ? Please edit it and tidy it up.
Are you using a Uno ?
I presume you are trying to use your Bluetooth device connected to the same Rx and Tx pins that are use for USB communication with yout PC ?
Have you disconnected the Arduino from the PC before trying to use the Bluetooth device? If not the two uses will be conflicting with each other.
It is common to use SoftwareSerial to create a second SerialPort on some of the other I/O pins and connect the Bluetooth module to those pins. That way you can communicate with your Bluetooth device and your PC at the same time.