This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Gatt_notification to Android (Razr) won't work with simpleBlePeripheral

Hi.

I'm having some trouble with getting Gatt_notification to work to my Razr. I have edited the SimpleBlePeripheral project to read on it's RX and then send this data over BLE with Gatt_notification. This works fine when using btool with the hosttestrelease.hex on the usb-dongle. (Also tested with labView and also works fine here)

I have tested with the heart-rate project and this sends fine from my keyfob over to Android (with motorola BLE API app). When using the sniffer on the dongle I get THIS data out. (where the attvalue indicates the dummy heart rate value)

When using IAR, I see that the heart rate also sends its data over Gatt_notification.(See HERE)

My problem is that when using my simpleBlePeripheral project, the sniffer and Android application won't pair together and send me any data.

I see that the motorola BLE API application uses a UUID value to trigger the heart rate data. (0000180d00001000800000805f9b34fb)

As I understand the "180d" is the 2 bytes which triggers the keyfob to send the heart-rate data. 

What I don't understand is how i can find a uuid value to use with my simpleBlePeripheral to get this working.

I can also mention that when using the heartrate project I can't get btool to read the heart-rate dummy data.

Is there something i'm missing here since I can't get the heartrate up with the btool, but only with the application?

My code from the simpleBLePeripheral is posted below.

Any help here would be much appreciated. 

Sincear, Michael

  • Hello Micheal,

    I have not used an Android device, only iOS.  I do not believe it is actually possible to pair the sniffer with the phone.  You will only see the response packets from the Keyfob.  I do not recall being able to see the iOS device from packet sniffer either.  So I think what you are seeing is only from the Keyfob.

    The easiest way to see what the UUID values are in BTool is to go to the Adv. Command tab and then select the GATT.  Then expand GATT and select GATT_DiscAllCharDescs and then Send Command.  It shows the UUID,Handle and Description of everything available on your device. By double clicking on the the descriptions, the data values will be shown. You can return to the read tab if you wish and then enter the handle for the heart rate.

    Thanks,

  • Hi Greenja. 

    I'm using the sniffer to intercept the packets from the keyfob. 

    Finally I'm now able to get data on the RX and send this over to UART. Have been testing with up to 20 bytes and this works fine. 

    To illustrate, my external micro is sending out 4 dummy bytes to the keyfob: "AA, BB, CC, DD" in a loop. 

    On the keyfob i choose to let it send 3 bytes at a time as you can see HERE:

    I also got it up and working with the Android. I used much of the code from heart rate source code, and used the UUID value from that code to trigger my app. 

    The app works in part, and by that I am able to show 1 byte of data onto my graph which I use.. 

    Image below shows 1 byte of data from the keyfob on the Razr: 

    unfortunately 1 byte payload in each packet is to low for what my proejct need, so need to have at least 2 byte or more in payload on every packet. 

    When trying to define this in the Application, i get alot of 0 on byte 2. 

    I've found THIS note from Motorola, as it explains how the bytes are sourted out. 

    So my question is if someone out here has been able to modify the .jar files to show more bytes on the application? 

    Sincear, Michael.