Hi All,
I am having a weird issue with an HC-06 bluetooth module that is attached to my arduino. I have written a basic code that allows me to communicate between the Arduino and a computer connected through bluetooth. Everything works, I can send and receive messages between the devices. However, if I disconnect from the device (e.g., turn the arduino off), and then attempt to reconnect upon next power on, I can no longer send and receive information between the Arduino and computer. The HC-06's status light shows that there is a connection, and the computer says it is connected to the bluetooth device, but I am unable to actually send and receive info. I have to fully forget the bluetooth device on the computer, and then reconnect to the bluetooth device before the two are able to communicate again. I have tried different computers, as well as different scripts to communicate. Every time I have to forget and reconnect to the device to get communication to work again. Any idea what is going on?
Can you just close and reopen the serial port used by the computer BT to connect to the HC06.
Unfortunately, this doesn't work. Once the initial communication connection is broken between computer and device, it will not send or receive once connected to again. That is until I forget and repair. Opening and closing the serial port doesn't fix the issue.
It sounds more like everything works, but only just. It may be a problem with inadequate power. Can you test the situation using the phone?
Hello spidarx
Welcome back.
I can reproduce the behavior.
When the window in W10 is closed, W10 terminates the BT connection.
For whatever reason. I have no idea.
I've tried with a windows computer and a Mac computer, and the same thing happens.
I only have an iPhone, which doesn't work with the hc-06, so I can test it.
I have tried two different bluetooth modules, and the behavior is the same. One first pairing, everything works. Once I disconnect after first pairing, I can no longer get the computer and bluetooth to communicate. I have to forget the device and repair.