# Automatic reconection with BlueDuino rev.2

**URL:** <https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865>\
**Category:** Arduino\
**Created:** [January 13, 2017, 9:09am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865 "2017-01-13T09:09:14Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 13, 2017, 9:09am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/1 "2017-01-13T09:09:14Z")

</div>

Is there any way to configure an automatic reconnection when the connection link is lost first bluetooth and then you enter the connection field?. Sorry for my bad English.

Regards

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [January 13, 2017, 9:24am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/2 "2017-01-13T09:24:04Z")

</div>

firmware 2.2.3 add a new command `AT+AUTH`, please try to change the auth mode to “auth and bond”

```auto
AT+AUTH3

```

But you need set same passcode for both peripheral and central.

Let me know if this work

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 13, 2017, 9:38am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/3 "2017-01-13T09:38:03Z")

</div>

…Cut of sketch:

…  
Serial1.println(“AT+AUTH3”);  
delay (1000);  
Serial1.println("AT+PIN=123456);  
delay(1000);  
Serial1.println("AT+CONN123456789010);  
delay(1000);  
…  
The setup is correct (I Check in Monitor Serie), pero no working

Regards

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 13, 2017, 9:39am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/4 "2017-01-13T09:39:38Z")

</div>

Sorry:  
Serial1.println(“AT+AUTH3”);  
delay (1000);  
Serial1.println(“AT+PIN=123456”);  
delay(1000);  
Serial1.println(“AT+CONN123456789010”);  
delay(1000);

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 13, 2017, 11:02am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/5 "2017-01-13T11:02:30Z")

</div>

This is my setup():  
void setup(){  
Serial.begin(9600);  
Serial1.begin(9600);  
pinMode(9,OUTPUT);// Pone el pin9 como salida para Vibro  
delay(200);  
Serial1.println(“AT+ROLE2”); // Lo hace central  
delay(1200);  
Serial1.println(“AT+RESET”); // Reset  
delay(1200);  
Serial1.println(“AT+POWR1”); // Le pone potencia TX=4db  
delay(1200);  
Serial1.println(“AT+AUTH3”);  
delay(1200);  
Serial1.println(“AT+PIN=123456”);  
delay(1200);  
Serial1.println(“AT+CONN00158300C355”); //conecta al BLE esclavo  
delay(3000);

vibra();  
}  
And this the answer of the monitor serial:  
OK+Set:2  
OK+RESE  
T  
OK+Set:1  
OK+S  
et:3  
OK+Set:1234  
56  
OK+CONNA

Say I’m connecting to a slave BLE sh-hc-08 (BLE)…  
If the connection is lost, … or I turn off the slave BLE, when it lights it does not pairing anymore

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [January 16, 2017, 1:41am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/6 "2017-01-16T01:41:00Z")

</div>

First, you should make this changes before reset

```auto
Serial1.println("AT+ROLE2"); // Lo hace central
delay(200);
Serial1.println("AT+POWR1"); // Le pone potencia TX=4db
delay(200);
Serial1.println("AT+AUTH3");
delay(200);
Serial1.println("AT+PIN=123456");
delay(200);
Serial1.println("AT+RESET"); // Reset
delay(2000);

```

The BLE sh-hc-08 is a BLE module from other manufacture? It can’t connect directly if it’s not in bonding mode. Please check the AT command manual for that module.

We’ll try to test with other BLE module also.

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 16, 2017, 10:03am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/7 "2017-01-16T10:03:14Z")

</div>

I´ll try to test new sketch. The ble slave is Bolutek Co…In slave mode you have the following AT commands:  
In slave mode you have the AT commands:  
[http://www.martyncurrey.com/bluetooth-modules/](http://www.martyncurrey.com/bluetooth-modules/)  
And I do not see any to bind.

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 16, 2017, 11:16am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/8 "2017-01-16T11:16:52Z")

</div>

These are the AT commands in slave mode:

[http://www.martyncurrey.com/wp-content/uploads/2016/02/AT-09-BT-05\_BBLE\_05.jpg](http://www.martyncurrey.com/wp-content/uploads/2016/02/AT-09-BT-05_BBLE_05.jpg).

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [January 17, 2017, 2:43am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/9 "2017-01-17T02:43:50Z")

</div>

Please check the `AT+TYPE` command for hc-08. I think it’s similar with our `AT+AUTH` command

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 17, 2017, 9:04am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/10 "2017-01-17T09:04:14Z")

</div>

I have already changed the sketch according to your instructions, I already tried “AT + TYPE3” in the HC-08, but it still does not work.

Regards

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 17, 2017, 9:07am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/11 "2017-01-17T09:07:11Z")

</div>

I think the AT + TYPEx command works only in master mode

regards

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [January 18, 2017, 1:48am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/12 "2017-01-18T01:48:37Z")

</div>

I will test it later when I got a HC-08 also.

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [January 18, 2017, 7:08am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/13 "2017-01-18T07:08:52Z")

</div>

Ok April, thanks for you support…One question…You will have to see that the HC-08 has only one characteristic and the bluduino two…one for TX and another for RX?

Regards.

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [January 18, 2017, 7:29am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/14 "2017-01-18T07:29:24Z")

</div>

> [@aramil13](#):
>
> one for TX and another for RX?

Yes. For Blueduino, that is

---

<div class="post-metadata">

**Author:** ![aramil13](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@aramil13](https://bbs.aprbrother.com/u/aramil13)\
**Post date:** [February 11, 2017, 9:00am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/15 "2017-02-11T09:00:46Z")

</div>

Hello April, thanks for your interest. Have your engineers tested the connection and autoreconexion between blueduino and HC\_08?

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [April 26, 2017, 10:32am UTC](https://bbs.aprbrother.com/t/automatic-reconection-with-blueduino-rev-2/865/16 "2017-04-26T10:32:02Z")

</div>

Hi,

We got HM-10 module recently. Here’s [update](https://bbs.aprbrother.com/t/sending-data-from-blueduino-central-role-to-another-ble-device/949/11)
