XDK scan record for ble
Answer
1/11/18 3:17 PM

Hello,

We've been trying to connect our XDK to an android box via BLE. The one issue we have is that the scan record comes in with a bunch of 0's and doesnt appear to be a valid scan/advertise UUID. This obviously crashes on our android box when trying to parse. Im wondering where this can be fixed inside of the XDK so that the UUID/Scan record is valid. Any input from anyone who has had this issue will be greatly appreciated.

Thanks!

Ike

 

 

0 (0 Votes)
RE: XDK scan record for ble
Answer
1/12/18 4:30 PM as a reply to Athanasios Ikonomou.

Hello Athanasios,

Welcome to the XDK Community.

I investigated the issues you are facing regarding the scan record of the UUIDs. As far as I can tell, when using the app BLE Scanner (available for both Android and iOS), the UUIDs are displayed correctly, when having flashed the VirtualXdkDemo or the SendDataOverBle example respectively.

Furthermore, I took a look at the BLE implementation and found out that the service UUIDs are hardcoded. The UUIDs should therefore always be the same, when you scan for services on your Android Box.

Nevertheless, I would like to know more about your issue to be able to propose a helpful solution.

Could you please go more into detail about your use case? Are you using the VirtualXdkDemo, the SendAccelerometerOverBle example or an own implemented BLE application as a starting point? In regards to the Android box, could you tell me what kind of device you are using?

In what way are you trying to access the UUIDs? Does your Android box offer functionalities to display the UUIDs and access the services, or are you programming your own application?

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo

0 (0 Votes)
RE: XDK scan record for ble
Answer
1/12/18 4:43 PM as a reply to Franjo Stjepandic.

Hi Franjo,

I appreciate the help. Is it possible to communiate via email (included below) as Id like to send some images of our data and some code and more details of our specific android box.

Thanks.

Ike

aikonomou@shff.com

0 (0 Votes)
RE: XDK scan record for ble
Answer
1/12/18 10:08 PM as a reply to Athanasios Ikonomou.

Franjo,

Ive reached out to another bosch represenative as well,. The device name appears to be 0'd out when trying to get its advertisedata. He said he was aware of it as well. I can pass along more details and code via email. We are using the senddatable example for this as well.

Ike

aikonomou@shff.com

0 (0 Votes)
RE: XDK scan record for ble
Answer
1/15/18 5:07 PM as a reply to Athanasios Ikonomou.

Hello Athanasios,

I have an idea which may be able to solve this issue, which I would like you to try out.

I assume this issue is caused because the BLE mac address not fixed and always has a different one on startup. As such, it is also not the one written on the back of your XDK. As such, I would ask you to extend your implementation file SendAccelerometerDataOverBle.c file at line 434 with the following code:

if(RETCODE_OK == BlePeripheral_SetMacAddress(XDK_BLE_MAC_ADDRESS))
{
   retval = BlePeripheral_SetDeviceName((uint8_t*) XDK_BLE_DEVICE_NAME);
}
Additionally, please add the following define into the header file at SendAccelerometerDataOverBle.h .

#define XDK_BLE_MAC_ADDRESS UINT64_C(0xXXXXXXXXXXXX)

Do insert your mac address values into the statement (without the separating colons) UINT64_C(0xXXXXXXXXXXXX) instead of the twelve X .

This small change in the SendAccelerometerDataOverBle example will ensure that the BLE mac address of your device is statically hardcoded and it may resolve your issue.

Nevertheless, if this approach does not solve your issue then I would be glad to talk via Email about further steps to solve this issue.

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo

 

0 (0 Votes)