LTE_BLE_Gateway read and write in characteristic

Hello,

I would like to know if it is possible to provide an example based on the lte_ble_gateway sample for writing and reading the characteristic!

I changed the example and I'm connecting with an nRF52840, but I'm not able to write or read the characteristics.

I noticed that many people also have difficulty in incrementing this in the example, so I think it would be very useful if they could demonstrate this in an example, most topics about this tell the user to base themselves on the nus_client example, but it's not that trivial, the code bases are very different and even based on this code I could not implement it successfully.

The tutorial in the link below demonstrates very well how to perform this implementation based on NUS, but I find a lot of incompatibility when I try to implement the functionality described in the tutorial for the lte_ble_gateway sample. Is it possible to implement this functionality in the sample? Could you give a very brief example of writing and reading the characteristics?

 Building a Bluetooth application on nRF Connect SDK - Contrasting to SoftDevice - Part 2 Central role 

I'm using NCS 2.0.0 and nRF9160DK!

Thank you.

  • Hi 

    If you are just using an uint8_t then I stand by my earlier answer: There is no difference between 02 and 2 in a uint8_t. They will both get the binary value 00000010. 

    The difference must be down to how you interpret the result on the other side. 

    To illustrate this you could always check the result of the variable in the debugger (after writing 02 or 2), or run a test like this:

    uint8_t a = 2, b = 0x02;
    if(a != b) 
    {
        // If this code runs, something is seriously wrong.... 
    }

    Regardless, good to hear that you found a workaround Slight smile

    If you have some other issue in the future I would suggest opening a new ticket, unless the issue is closely related to what we have already discussed. 

    Best regards
    Torbjørn

Related