BLE INDICATE : how do I send confirmation message to the server after receiving data using INDICATE request ?

Former Member
Former Member

Hello,

I'm a beginner and I'm currently bulding a GARMIN App to communicate in BLE with a python server which uses bluez library.

My app has two characteristics :

1) RX_CHARACTERISTIC used for "WRITE request" (send data from app to server)"

2) TX_CHARACTERISTIC used for "INDICATE request" 

 I'm using a python server (using the library bluez) to send my data to my GARMIN app using the INDICATE request and I have two question :.

 When I retrieve (on my app) data sent by indications, I normally have to send a response (confirmation) to my server.

 

1) Garmin app part :  Is the confirmation response generated automatically or do I have to create a method which sends a confirmation message to my server once I get the data ? or are there any methods to do so ?

 

2) Python server part : Do I have to modify my python server so I can retrieve the confirmation response ?

 

Thank you in advance for your precious collaboration.

 

Cordially.

  • I don't know that CIQ Ble handles indications, and I have nothing that looks to use indications, but in digging around, it kind of looks like you enable indications in the same way you do notifications.

    On the CIQ side, instead of sending [0x01,0x00]b to the characteristics cccd, it looks like you send [0x02,0x00]b.

    As far as the ack for an indication, that could already be handled for you.

    All I can suggest is try it.

  • Former Member
    Former Member in reply to jim_m_58

    Hello Jim,

    I tried it :) and I think you're right.

    Since I can send data for my server consecutively, I think the confirmation message might be sent intrisically once the onCharacteristicChanged method is called. So the server intrisically receives it which allows it to send new data. 

    Thank you again :).

    I had another question : I used the method named "Communications.transmit(content, dictionnary, listener)" to simulate the confirmation received.

    Here are the arguments of the transmit method :

    - content : I used "1", true, [1]b but none of the seemed to work

    - dictionnary : {} (empty dictionnary

    - listener : onComplete() method which prints "done" once the operation is completed.

    here is the line : Communications.transmit("1",{},onComplete()).

    I tried to use it inside the onCharacteristicChanged method but I get the following error : InvalidValue

    Do you know where it could come from ?

    Cordially.

  • I have never done anything with a companion app, so I don't know.