Trouble Entering AT command mode with a Bluetooth device

Hello,

I have a Bluetooth device I want to play with – Getting it into AT command mode

Information I have:

I got this information:

  • it announces itself as "BT-05" on BLE-Scanner on my phone
  • on its back I have a string ZS-040

Pins (Print on the back, top to bottom, >> away (out), << inwards(in)):

  • >> State (shows connection state, lights up if I connect via BLE-Scanner)
  • << RxD (level 3.3V)
  • >> TxD (level 3.3V)
  • << GND
  • << VCC (3.6V – 6V)
  • << EN (Shall be the AT enable pin – connects to pin 34 with a 2k ressistor) – the place for a push button is empty

The only indicator is a red LED that blinks about the default Blink program 1s on, 1s off – never changing rhythm.

During my endeavors I have tortured the poor thing very hard – +5V constant on 3V lines and other things. So I am not sure if the Serial communication on RxD, TxD is working at all. It connects to the phone all-right – an LED to State with a ressistor lights up during the connection.

But I want to enter the command AT mode. And this seems to be different from model and the issued commands as well.

I tried:

  • baud rates 9600 and 38400 using SoftwareSerial(RxD, TxD) and Serial to connect to the Arduino GUI.

Right now I am using "Basic Software Serial" from http://www.martyncurrey.com/bluetooth-modules/ My module looks like SPP-C HC-06 / BT06 HC-06 examples. The author says:

Default to AT mode when powered on. AT commands require line ending characters (\r\n).

If you open the serial monitor and then cycle the power to the module you get

If I powercycle my module – meaning disconnecting VCC, the LED keeps blinking. I do not understand how I need to change the code to add NL/CR

if (BTSerial.available()) { c = BTSerial.read(); Serial.write(c); }

// Read from the Serial Monitor and send to the Bluetooth module

if (Serial.available()) { c = Serial.read(); BTSerial.write(c);

// Echo the user input to the main window. The ">" character indicates the user entered text.

if (NL) { Serial.print(">"); NL = false; } Serial.write(c); if (c==10) { NL = true; } }

I just want it to respond to "AT" with "OK". And since I cannot get the Serial to talk, I am not sure how I can even check if I have not damaged it in the process already.

Edit: removed Spoiler as it did not collapse text.

Touch here for the full post on the Arduino Apprentices tumblr

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s