3
\$\begingroup\$

I'm looking to interface a Seeedstudio Bluetooth Bee with an Android phone for a project, and I want to get the Arduino code down pat.

Specifically, I want to be able to set the time over Bluetooth (which will then interface to a RTC module), then receive RFID strings over the Bluetooth module.

There is a side issue, and thats whether all my NewSoftSerial stuff will play nicely - an exercise for me later, once I have the Bluetooth working.

The code set out by Seeedstudio is helpful, but not complete enough to explain to me. I have a moderate knowledge of Bluetooth, but I'm not afraid to ask questions. Hopefully, I can get the Bluetooth side of things to play "nice" so I can concentrate on the NewSoftSerial issue.

Here is some of the code I'm using to initialise the Bluetooth Bee, and I'm hoping I can then pair the Bee with the phone, and transfer data using the serial profile.

Serial.print(“\r\n+STWMOD=1\r\n”);

Serial.print(“\r\n+STNA=modem”);

Serial.print(“\r\n+RTPIN=0000\r\n”);

delay(2000);

Serial.print(“\r\n+INQ=1\r\n”);

delay(2000);

Serial.print(“\r\n+STBD=9600″);

I guess, what I'm asking for is the process of connection - on Seeedstudios forum once the +INQ=1 command is issued, then the phone (or computer) can find the Bee. As you can see, I have an RTPIN of "0000" (secure, I know...) so inputing that into the phone will pair the phone and Bee? Or am I way off the mark?

Many thanks.

Shane.

\$\endgroup\$
  • 1
    \$\begingroup\$ edit in what you have already figured out and what you have going on. Right now someone has to do the project for you for them to really answer this question. I think you will get more answers as the size of the answer required goes down. \$\endgroup\$ – Kortuk Mar 16 '11 at 8:33
  • \$\begingroup\$ Hi, I have some initialsation code, as follows: Serial.print(“\r\n+STWMOD=1\r\n”); Serial.print(“\r\n+STNA=modem”); Serial.print(“\r\n+RTPIN=0000\r\n”); Serial.print(“\r\n+INQ=1\r\n”); Serial.print(“\r\n+STBD=9600″); In this, I'm following the lead of the Seeedstudio material, but I'm unsure of whether it'll allow me to pair the phone with it. In fact, the only thing I understand is the 9600 baud setting... I'll look up some AT commands now. \$\endgroup\$ – user3397 Mar 16 '11 at 8:38
  • \$\begingroup\$ I guess, what I'm asking for is the process of connection - on Seeedstudios forum once the +INQ=1 command is issued, then the phone (or computer) can find the Bee. As you can see, I have an RTPIN of "0000" (secure, I know...) so inputing that into the phone will pair the phone and Bee? Or am I way off the mark? \$\endgroup\$ – user3397 Mar 16 '11 at 8:58
  • 1
    \$\begingroup\$ edit the new information into your original question. This improves the question and will improve your number of answers. \$\endgroup\$ – Kortuk Mar 16 '11 at 9:21
1
\$\begingroup\$

I found some example code on a website, this fellow is doing almost exactly what I'm doing, just the information is going from phone to Arduino, not Arduino to phone.

All the code is downloadable, and I've checked it out - I'm going to try the PDE, and see if I can connect from my Mac and U8300.

It also includes constructs for the code I need on the phone side, which was going to be my next question after this one - two for the price of one!

http://ai.kittywolf.net/index.php/BTArduinoLED1

Have a look, its said in the description that (paraphrase) "the initialisation sequence must be done right..." so I can now use this code as a guide.

Hope this helps!

Shane.

\$\endgroup\$
0
\$\begingroup\$

Are you by chance using a Nexus S? If so, you already have both read and write NFC/RFID functionality.

Write function news release: NFC World Article

More from Android: Android SDK

Otherwise, using a bluetooth RFID reader to transfer the RFID info to android has been accomplished without the need for arduino, but if you're just dead-set on using arduino as a third device middle-man... here's some links that might help.

Arduino RFID Sniffer

Amarino (Android + Arduino Toolkit) This uses the bluetooth uart module for communications between phone and arduino just as you're wanting

Hope this helps...

-- Daerk

\$\endgroup\$
  • \$\begingroup\$ Thanks for your help - there is a reason the Arduino is there. I know its an almost redundant piece of gear, but in this case, it makes one piece of a greater whole. The phone is merely a terminal to a greater network, over PMR. I'm not using a Nexus S, and while I'm intrigued by its NFC capabilities, definitely there is no explanation of which frequency and standard it uses. I also know about Amarino, and while I agree its quite good, it doesn't serve me in this example. Put quite simply, I was using the wrong serial port on the Arduino. Rewrite of the code fixed that. \$\endgroup\$ – user3397 Apr 7 '11 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy