2017-11-02 02:01 AM
I have a little problem with BlueNRG-1 chip. I want that the first time I pair my phone with the BlueNRG-1 Testboard.
When I switch off bluetooth on my phone (iPhone) and the switch on, I want that my phone connects automatically to my BlueNRG-1 Testboard (like headphones).
But this doesn�t work.
The pairing process works well (first I get the event 'hci_le_connection_complete_event' and after the confirmation on my phone I get the event 'aci_gap_pairing_complete_event') but when I reconnect bluetooth the board goes always in the advertising mode and I don�t know why.
If the BlueNRG-1 needs to be configured or must the phone make sure that an automatic connection has been established?
#bluenrg-1-automatic-connection-after-pairing2017-11-03 07:26 AM
Dear Tino,
please notice that the connection establishment procedure is always up to the Central device (the iPhone in your case) and not up to the Peripheral (BlueNRG-1 in your case).
If BlueNRG-1 is advertising correctly, then your phone should be able to find it during scanning.
If you want your iPhone to connect automatically to the BlueNRG-1, you should do it programmatically from iOS side.
Best regards,
Antonio
2017-11-05 10:58 PM
Hello Antonio,
thank you for your answer. But I have one question: Do I need an own app to connect automatically?
I think when the phone is paired with the BlueNRG-1, that the phone connects automatically to the board and I have nothing to do. Is it wrong ?
2017-11-06 02:00 AM
Dear Tino,
what is the program you are running on the BlueNRG-1 Peripheral?
Kind regards
Andrea
2017-11-06 02:18 AM
I write an own program on the BlueNRG-1 Peripheral.
In the Init Function I send the following functions:
ret = aci_gap_set_io_capability( IO_CAP_NO_INPUT_NO_OUTPUT );
ret = aci_gap_set_authentication_requirement( BONDING, MITM_PROTECTION_NOT_REQUIRED, SC_IS_NOT_SUPPORTED, KEYPRESS_IS_NOT_SUPPORTED, 7, 16, DONOT_USE_FIXED_PIN_FOR_PAIRING, 123456, STATIC_RANDOM_ADDR );
When I connect my phone with the BlueNRG-1 Board I get the follwing Event:
hci_le_connection_complete_event.
I send after 2s:
ret = aci_gap_slave_security_req( connection_handle );
Now I get the Event 'aci_gap_pairing_complete_event' but when I reconnect the BlueNRG-1 I get no automatically Connection to my board.
2017-11-06 02:39 AM
One option to check the correctness of the security setting could be comparing your current configuration with the one implemented by the BLE_Security example included in the official
package.2017-11-07 11:54 PM
Dear Andrea,
I test the BLE_Security example for the STSW-BLUENRG-1-DK, but I have two problems:
1. When I start the Pairing process everything works fine, but after 30s the Connection lost to the board. Why?
2. I have the same Problem before. After a Pairing and a reset my board, the IPhone doesn´t connect to the board again
2017-11-08 12:51 AM
Dear Tino,
couldyou checkifsuch issue/behavioris also experienced with a mobile based on Android? For this use case, maybe
Marchese.Graziella
can provide further clarifications.