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.

lightblue里面的manufacturer data问题



你好,yan

      lightblue看到的manufacturer data,具体意义是什么,他的组成部分是怎么购成。这个对我很重要。

谢了

祝好

Lincoln

  • 林肯,

    你说的是Manufacturer Specific data 把?

    这是搜索的时候外设发的广播包里面的数据。

    Manufacturer Specific data 就是厂商指定私有广播内容,0xFF 打头,数据头两个字节为厂商信息(指定的厂商你可以参考)https://www.bluetooth.org/en-us/specification/assigned-numbers/company-identifiers,后面内容为厂商自定义内容。

  • 谢了,yan。还有些问题请教,如下:

    一)
     static void performPeriodicTask( void )
    {
      uint8 valueToCopy;
      uint8 stat;

      // Call to retrieve the value of the third characteristic in the profile
      stat = SimpleProfile_GetParameter( SIMPLEPROFILE_CHAR3, &valueToCopy);

      if( stat == SUCCESS )
      {
        /*
         * Call to set that value of the fourth characteristic in the profile. Note
         * that if notifications of the fourth characteristic have been enabled by
         * a GATT client device, then a notification will be sent every time this
         * function is called.
         */
        SimpleProfile_SetParameter( SIMPLEPROFILE_CHAR4, sizeof(uint8), &valueToCopy);
      }
    }
    (1)valueToCopy

    这个写属性变量值是随机产生的。还是一定要设置好变量值再用GATT_WriteCharValue函数去写。

    是否有产生随机数的函数?

    (2)这个拷贝给char4后,周期发给主机,这个周期是否是只要主从机连接着,定时就发送,除非断开。还是在设定的时间内,到时间就发送。

    二)

    (1)你讲主机扫到从机,从机响应后,连接, 配对,鉴权,加密,绑定按顺序进行的系统过程,我用ios app连接,弹出配对框前,发现好像是显示了连接,按配对框的时候,还出现服务就绪字样,我想知道配对是在服务就绪之前,还是之后?STK 加密是指配对加密吗?

    (2)高功率蓝牙。比如耳机,发现显示配对后,还要扫描连接。难道他们的配对,连接顺序不一样吗?望告知。

    谢了

    祝好

    lincoln

  • 林肯,

    一)

    (1)  默认是 0, 你可以通过central 用write命令来修改。没有产生随机数的函数。

    (2)  只要连着,并且char 4 的notification 是打开的,就会周期发送给主机。

    二)

    (1) 一般配对加密绑定是在服务查找之前。STK是指short term key,是没有绑定前提下产生的key, 用来给这次连接后续数据加密。

    (2) 传统蓝牙,如果已经绑定过,那么只要耳机是处于page scan状态,也就是可被连接状态,就能被连上(即使耳机没有处于inquiry scan 状态,白话就是无法被搜索到),而且你说的顺序,也并没有一个统一的说法,有些设备会在SDP 之前就要求配对加密了,有些设备会在SDP之后,看厂商了,都是可以的。