I have the Bluetooth modules with a 4 pin header. The breakout board has two empty connections labeled key and status. Are these connected internally? I would like to be able to add a pin for key, allowing the module to be configured from a microcontroller.
Also, I have a sketch that accepts serial data from the PC and sends it to the BT module and vice-versa. If I enter AT in the serial console I receive an OK back from the BT module. However, this is the only command that is accepted. Anything else, such as AT+VERSION?, does not get a response. Is this to be expected?
First of all yes, the State and Key pins are routed internally, but you can tap into them and reset your Bluetooth connections using the Key pin, or monitor your connection status with the Status pin.
As for the serial command program, if you are entering the codes manually it would be pretty much impossible to type the hole code fast enough. You need to copy past the codes over the terminal, or hard code them into your program for them to go fast enough.
If you are already copy pasting I would be interested to see your relay program to identify any other possible issues.
The code I am using is the standard read from hardware serial, send to software serial, etc. I don’t think the Arduino sketch is the problem as I have gotten additional commands working. The biggest barrier I am facing is a lack of accurate documentation for these modules. For example, I was trying to set the connection string using AT+PSWD when the proper command for this module is AT+PIN.
I will give you some background information on what I am trying to do. Hopefully my issue will make more sense. I have small brewery setup using a few sensors to measure water parameters and an Arduino to read/display water parameters and control gas and water solenoids and an igniter. Currently, all of the sensors are hard-wired back to a remote control panel. I would like to use Bluetooth to read the sensor data. Since I have three sensors and one uC, I would like to be able to control which slave module the master is paired with. The official? documentation for the HC-05 makes it sound like this would be possible by entering command mode on the master module and changing the pairing parameters. Unfortunately, this document was apparently written for a different version of this module.
Do you have a complete datasheet for the modules you sell? Do you know if what I am trying to do is even possible? I have also been working on turning this into a product to be marketed to home brewers. The idea being that a user could load an app on their smart phone and be able to view/graph data from the sensors. That may preclude using these modules altogether as it doesn’t sound like they are compatible with the iPhone.
Any guidance you can provide would be much appreciated.