WurthElektronik / WirelessConnectivity-SDK_STM32

Software development kit for Würth Elektronik eiSos wireless connectivity products (implementation for STM32 microcontrollers).
Other
7 stars 6 forks source link

Got an undocumented +BLESECNCREQ:0,xxxxxx message #9

Closed alexbrickwedde closed 3 weeks ago

alexbrickwedde commented 3 weeks ago

I have a StephanoI_ATBluetoothLE_IOCapabilities_DisplayYesNo configuration and got the message +BLESECNCREQ:0,xxxxxx from the Stephano-I with xxxxxx being the PIN displayed on the mobile phone. Unfortunately there is no corresponding event in this SDK and i couldn't find the AT command for replying to this message.

mah-eiSmart commented 3 weeks ago

This will be fixed in the next release. So far reply with

ret = StephanoI_ATBluetoothLE_ConfirmValue(StephanoI_Examples_ConfirmSecurityKeyRequest.conn_index, true);

alexbrickwedde commented 3 weeks ago

It looks like AT+BLECONFREPLY=0,1 is not the expected answer.

+BLECONN:0,"40:ae:b0:b9:2c:ef"
+BLECONNPARAM:0,0,0,6,0,500
+BLECONNPARAM:0,0,0,39,0,500
AT+BLEENC=0,3
OK
+BLESECNCREQ:0,924092
AT+BLECONFREPLY=0,1
OK
+BLEAUTHCMPL:0,1
+BLEDISCONN:0,"40:ae:b0:b9:2c:ef"

On AT+BLECONREPLY i get an OK, but it doesn't finish connecting. After some more seconds +BLEAUTHCMPL:0,1 indicates "encryption failed".

alexbrickwedde commented 3 weeks ago

It looks like AT+BLECONFREPLY=0,1 is not the expected answer.

+BLECONN:0,"40:ae:b0:b9:2c:ef"
+BLECONNPARAM:0,0,0,6,0,500
+BLECONNPARAM:0,0,0,39,0,500
AT+BLEENC=0,3
OK
+BLESECNCREQ:0,924092
AT+BLECONFREPLY=0,1
OK
+BLEAUTHCMPL:0,1
+BLEDISCONN:0,"40:ae:b0:b9:2c:ef"

On AT+BLECONREPLY i get an OK, but it doesn't finish connecting. After some more seconds +BLEAUTHCMPL:0,1 indicates "encryption failed".

Sorry for the confusion. Android showed two pairing requests, when accepting the 2nd one it seems to work.