2020-08-24 09:00 AM
since last mounth, i cannot connect anymore to my sensor (TILE.BOX) by ble with windows 10 because the code are automaticaly generated. I suspect last update
windows don't let me write the std code (123456). So did you know the issue? do you have contermesure? Without BLE, i cannot use Unicleo gui from laptop.
Thanks for your help
Solved! Go to Solution.
2020-08-31 01:48 AM
I'm using allmems2 V2.1.0 as an example (many fw are similar in that section, because they all links to the same app), but here are specific instructions:
if(ret){
ALLMEMS2_PRINTF("\r\naci_gatt_update_char_value failed\r\n");
while(1);
}
////////////////////// BEGINNING OF CODE TO ADD //////////////////////////
aci_gap_set_io_capability(IO_CAP_DISPLAY_ONLY);
////////////////// END OF CODE TO ADD ////////////////////////
ret = aci_gap_set_authentication_requirement(BONDING,
MITM_PROTECTION_REQUIRED,
SC_IS_SUPPORTED,
KEYPRESS_IS_NOT_SUPPORTED,
7,
16,
DONOT_USE_FIXED_PIN_FOR_PAIRING,
123456,
0x00);
void aci_gap_pass_key_req_event(uint16_t Connection_Handle)
{
status = aci_gap_pass_key_resp(CurrentConnHandle, 123456)
}
If you have any more problem coding, please, tell me which errors warning you encounter
2020-08-25 03:06 AM
Hi @david binkowski ,
I think that the problem is due to some windows update, On my PC the pin has to be typed as before (Windows10 Version 10.0.17763 build 17763).
I can give you some pointers to the Microsoft support page for Bluetooth ( https://support.microsoft.com/en-us/help/14169/windows-10-fix-bluetooth-problems ), or you can try to use the older interface, instead of the newer Windows 10 Bluetooth pairing interface. (open the Control Panel, then Devices and Printers -> Click Add A Device at the upper left, then follow the pairing process).
Can I ask you How did you use the SensorTile.box with BT and Unicleo? I mean, which fw do you use and how do you connect it to the software?
2020-08-25 05:00 AM
Hi @niccolo.ruffini
Thanks for your help
I have always try with old interface but this is the same way, windows generate a code instead of ask me to write the mine...
The use of unicleo.gui is very simple when the connection are etablisheed ;) . You need to pairing TILE.BOX with windows and open unicleo. if you have activated the BLE fonction in option menu, normaly unicleo detect automaticaly the sensor (with BLE adress in select device). It work with Fonction Pack allmems2,etc...
2020-08-26 07:11 AM
Hi @david binkowski ,
I looked into the problem and I found that the allmems2 function pack (like others) are supposed to be paired only with the ST BLE Sensor App. For this reason, the Function pack was not coded to be paired with windows, and because of a check for I/O capabilities (probably introduced with the latest update, but I'm not sure), the pairing procedure cannot be completed.
To fix this, the firmware should be modified to adapt to the request:
you should set the I/O capabilities with aci_gap_set_io_capability(IO_CAP_DISPLAY_ONLY) before setting the autentication requirement, and add the call back to aci_gap_pass_key_req_event in case the request arrives, with a aci_gap_pass_key_resp(CurrentConnHandle, 123456).
This should fix the pairing problem.
Let me know if this fixes your problem.
2020-08-28 07:10 AM
Hi @niccolo.ruffini
Please could you be more accuracy for the firmware modification, my knowledge about prog with STM32CubeIDE are limited. by exemple the name of the files that i need to modify.
Thanks
2020-08-31 01:48 AM
I'm using allmems2 V2.1.0 as an example (many fw are similar in that section, because they all links to the same app), but here are specific instructions:
if(ret){
ALLMEMS2_PRINTF("\r\naci_gatt_update_char_value failed\r\n");
while(1);
}
////////////////////// BEGINNING OF CODE TO ADD //////////////////////////
aci_gap_set_io_capability(IO_CAP_DISPLAY_ONLY);
////////////////// END OF CODE TO ADD ////////////////////////
ret = aci_gap_set_authentication_requirement(BONDING,
MITM_PROTECTION_REQUIRED,
SC_IS_SUPPORTED,
KEYPRESS_IS_NOT_SUPPORTED,
7,
16,
DONOT_USE_FIXED_PIN_FOR_PAIRING,
123456,
0x00);
void aci_gap_pass_key_req_event(uint16_t Connection_Handle)
{
status = aci_gap_pass_key_resp(CurrentConnHandle, 123456)
}
If you have any more problem coding, please, tell me which errors warning you encounter
2020-09-22 05:22 AM
Thanks for your reply i try asap the solution (not the time yet) and come back to you if needed
2020-10-09 05:35 AM
Hi Niccolo,
I encountered couple of error
first
and second when i try to change CurrentConnHandle to Connection_Handle
I suppose that i need to declare some variables. I precise that i use the same FW version like you ALLMEMS2 V210
Thanks for you help
Regards
2020-10-09 06:04 AM
Hi @david binkowski ,
status is a variable that is there for debugging purposes, you can either
void aci_gap_pass_key_req_event(uint16_t Connection_Handle)
{
aci_gap_pass_key_resp(Connection_Handle, 123456);
}
void aci_gap_pass_key_req_event(uint16_t Connection_Handle)
{
uint8_t status;
status = aci_gap_pass_key_resp(Connection_Handle, 123456);
}
in the latter option, you have a variable that can be checked during debug, but in the end it should not be a problem for you.
Let me now if this solves your problem.
2021-05-12 09:02 AM
Hi Niccolo
Sorry for the late answer. I confirm that the solution solve my issue. I can connect with my laptop.
Windows ask me to write the pairing code as usual. 123456 work well!
Many thanks for your support
Best regards