Adeunis ARF62 bluetooth module unable to enter command mode

Hello!
Have strange problem with Adeunis ARF62 Bluetooth dongle.
The problem is - the module unable to enter command mode via A+++ escape sequence.
My code for this purpose is:

delay(1000);
BT.write(0x41);
BT.write(0x2B);
BT.write(0x2B);
BT.write(0x2B);
BT.write(0x0A);
BT.write(0x0D);
delay(1000);

Where BT is software serial.
If i open Hyperterminal and send to module ASCII file containing A+++ characters (as stated in manual), module enters command mode beautifully.
Sequences as BT.print("A+++\r"); BT.print("A+++\n); and so on already tried :frowning:

Maybe I miss something? Any help will be much appreciated.

If i open Hyperterminal and send to module ASCII file containing A+++ characters (as stated in manual), module enters command mode beautifully.

Is Hyperterminal appending a carriage return/line feed to the data? I don’t think so.

Typically, AT+++ (with NO cr/lf) causes the switch to command mode. Anything else does not.

Yes, i tried with and without cr/lf. Module does not enter command mode only from program.

If i program sketch which only read.serial->write.bluetooth, read.bluetooth->write.serial module enters command mode via file with A+++ content through Hyperteminal.

How long does it take to enter command mode? How long does it sit in command mode, getting no input before it switches back? Maybe that delay(1000) is too long. And, of course, code snippets don't really cut it, as we can't see what is happening after you try to enter command mode.

In module manual is stated,- entering command mode with sequence
A+++ where silence timeout defined in S214 register and is 50ms.
Of course i tried to define silence 50ms, 100, 150, 40ms…
My program is very simple for testing:

Serial and softserial defines,
void setup() {
start both serials;
delay(50);
BT.print(“A+++”);
delay(50);
}
void loop() {
print some commands to softserial;
Read back answers from the module;
Print answers to PC terminal;
}

module stay in command mode infinitely until command mode is switched back to transparent mode with ATO comand. With Hypterminal module enters command mode in half second- second. I see OK answer. If i put manually module to command mode, i can upload my sketch to arduino, module stays in command mode after uploading and loop() commands works fine.

In module manual is stated,- entering command mode with sequence

A link to the manual?

http://www.adeunis-rf.com/files/faq/10/EN/ARF62_Bluetooth_dongle_UG_V3.pdf

Have strange problem with Adeunis ARF62 Bluetooth dongle.

I missed that part, at first.

How are you attaching this dongle to the Arduino?

Max232 level converter.

Max232 level converter.

How? Like a staple? One set of legs stuck in the BT dongle and one set stuck in the Arduino?

The BT dongle is a USB slave device. The Arduino is a USB slave. Two slaves can’t talk to each other. There needs to be a USB Host somewhere in the mix. The PC is a USB Host, which is why it can talk to the dongle. There are USB Host shields available for the Arduino, and you could write the driver software to talk to the BT dongle.

But, it would be cheaper, and far easier, to put the BY dongle in a drawer, and buy the right kind of BT device to connect to the Arduino.

:slight_smile: this dongle work in master mode transmitting serial signal to another device.
Uart on atmega/ arduino is used to communicate with pc, not with dongle.
Dongle interacts with arduino by means of SoftwareSerial library and connected physicaly to atmega via max232 converter. Hope i clarify my hardware setup.
I can program simple sketch to arduinom wich makes serial passthrough from pc to dongle. In this mode i can put dongle into command mode via hyperterminal as i wrote before. But cannot do that via sketch for unknown reason.