Society of Robots - Robot Forum

Software => Software => Topic started by: Benn on May 27, 2010, 05:13:31 AM

Title: Bluetooth connection problem
Post by: Benn on May 27, 2010, 05:13:31 AM
Hi all. I bought a BTM-112 Bluetooth module, because i want to control my robot from the laptop. Now, i powered the module,
and paired it with the laptop, everything looks fine, just that, when I write AT comands in the hyperterminal, the module is not responding.
I checked the baud rate, reinstalled the module, etc...but in vain. It is still not responding. Why?
P.S: the RTS and CTS signal are not wired.
Please any ideas?

This is the module:
www.adelaida.ro/product_info.php?products_id=4201&osCsid=c01807500eda6f7f3ea80d42cd3a10d2 (http://www.adelaida.ro/product_info.php?products_id=4201&osCsid=c01807500eda6f7f3ea80d42cd3a10d2)
Title: Re: Bluetooth connection problem
Post by: guncha on May 27, 2010, 09:10:08 AM
Sometimes the module needs to be specifically set to command mode (as opposed to data mode, when it just dumps in UART everything it receives from the computer). For some you do that with a special command (like "+++") or some start up in command mode and then switch to data mode after some time of inactivity, say 30 seconds.

So, to test this, you should check if your robot receives the data you put in hyperterminal. If so, it means that the module is in data mode and you need to check the documentation on how to switch it.
Title: Re: Bluetooth connection problem
Post by: Benn on May 27, 2010, 01:20:18 PM
I checked, and the robot doesn't sent or receive any data to/from Hyperterminal.
Also, in the documentation of this module, nowhere is written about those 2 modes you mentioned.

I think the device is not connected. When i connect it from Hyperterminal, it connects, but if i write: AT, it does not respond with ERROR or with OK.
Title: Re: Bluetooth connection problem
Post by: Benn on May 28, 2010, 08:09:18 AM
Finally, i discovered that guncha was right. The bluetooth is in data mode...and i was able to transmit data from robot to hyperterminal, until now.
The datasheet i had was not complete, and i found another one that is telling me about how to change from data mode to command mode:

+++  When the device is in Data mode, it can be forced back into Command mode while maintaining the
       connection to the remote device. The sequence characters should be with 1000ms guard time.


Now the problem is, i tryed to change the mode, but it didn't work. Please explain me what does it mean 1000ms guard time. Maybe here is the problem.
Title: Re: Bluetooth connection problem
Post by: guncha on May 31, 2010, 10:37:40 AM
I just looked at that datasheet and it is kinda cryptic. Nevertheless, a quick google search for "guard time" brought this page up:

http://en.wikipedia.org/wiki/Time_Independent_Escape_Sequence (http://en.wikipedia.org/wiki/Time_Independent_Escape_Sequence)

The part about Hayes 302, I believe, is what you're looking for.