ArduinoCore-arc32 icon indicating copy to clipboard operation
ArduinoCore-arc32 copied to clipboard

how to modify value of Characteristic

Open idone-wangqiang opened this issue 10 years ago • 4 comments

I want to modify the BLEWrite's value from 0x02 to 0xFEC9

the wechat airsync protocol require the ble device provide Write & Indicate Characteristic,the Write Characteristic 's value must be 0xFEC9,and Indicate Characteristic's value must be 0xFEC7.

I have modify the BLECharacteristic.h file like this : `enum BLEProperty { // broadcast (0x01) not supported

BLERead                      = 0xFEC9,

BLEWriteWithoutResponse     = 0x04,

BLEWrite                    = 0xFEC7,

BLENotify                 = 0x10,

BLEIndicate               = 0xFEC8

};`

but it doesn't work

Can someone give me help?

idone-wangqiang avatar Jun 16 '16 03:06 idone-wangqiang

modify the uuid of Characteristic?

327 avatar Jun 20 '16 07:06 327

Hi @idone-wangqiang, you say "I want to modify the BLEWrite's value from 0x02 to 0xFEC9", but then in the code you show, you have set BLEWrite to 0xFEC7. As a result I'm not really sure what your question/problem is. Can you please do three things for me, so that I can help you;

  1. Clearly state your intention, and show the code that you plan to use to achieve your intention.
  2. State the expected outcome when you test your code changes (i.e. how will you know if it works)
  3. State the actual outcome (How do you know that it didn't work).

eriknyquist avatar Jun 20 '16 23:06 eriknyquist

Thank you very much for your reply. My question is : How to modify the uuid of Characteristic in curieBLE library?

I don't know the default uuid of Characteristic,but in arduino 101,

I want to set BLEWrtie's uuid to 0xFEC9,where can modify the uuid in curieBLE library ?

airsync debugger This Android app can test the result.

idone-wangqiang avatar Jun 21 '16 05:06 idone-wangqiang

@SidLeung do you know what the intention is here? Perhaps you can advise, in case I'm missing something.

@idone-wangqiang , If you would like to report a bug please follow the 3 steps I posted in my previous comment. If you have questions about how to use the BLE library then please direct them to the forum: https://forum.arduino.cc/index.php?board=103

eriknyquist avatar Jun 21 '16 17:06 eriknyquist