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.

SimpleBLEPeripheral 傳送問題



己使用1.4.0

連續傳送 data Characteristic 1,發現是收到不data  

看了舊文章 write 是要等待回應,才能繼續向下

可以改成write without response ,因為是新手

是怎樣設定,在那個文件檔收改, 求解謝謝

  • 更改一下character 的属性即可,例如,可以仿照下面的例程更改:

    /*********************************************************************
    * Profile Attributes - Table
    */
    static gattAttribute_t testAttrTbl[] =
    {
    // Test Profile Service
    {
    { ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */  // 这个是声明service
    GATT_PERMIT_READ, /* permissions */
    0, /* handle */
    (uint8 *)&testService /* pValue */
    },

    // Data Characteristic Declaration                              // 这个是声明character的属性
    {
    { ATT_BT_UUID_SIZE, characterUUID },                      
    GATT_PERMIT_READ,                                                // 这代表这个character(UUID)只能被主设备读,一般character都这样声明
    0,
    &testDataProps
    },

    // Data Characteristic Value                                       // 这个是character值的属性
    {
    { TI_UUID_SIZE, testDataUUID },
    GATT_PERMIT_READ | GATT_PERMIT_WRITE,    // 可读可写,也就是主设备扫描到这个UUID,可以对他进行赋值操作
    0,
    testData                                                                                            
    },

    };

    如果你程序中不能写,请检查一下,是否也配置成了这样,或者可以参考TI例程中的sensorTag 例程中的testservice.c这信源文件

    1、希望可以帮到你,祝你早日解决问题,同时分享一下你解决问题的方法,谢谢!

    2、如果哪里不会可以继续提问,谢谢!