Quantcast
Channel: 蓝牙论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 7524

关于CC2640主从一体添加UART的问题

$
0
0

在主从一体例程里添加UART串口,不能进这个“if ( ( pItem->connHandle != INVALID_CONNHANDLE ) && ( pItem->value != GATT_CFG_NO_OPERATION ) ) ”里,主从机能正常链接,串口发来的数据蓝牙发送不出去,怎么回事?

for ( i = 0; i < linkDBNumConns; i++ )
  {
                  gattCharCfg_t *pItem = &(charCfgTbl[i]);

                 if ( ( pItem->connHandle != INVALID_CONNHANDLE ) &&
                      ( pItem->value != GATT_CFG_NO_OPERATION ) )
                {
                                   gattAttribute_t *pAttr;

                                     // Find the characteristic value attribute  找到特征值的属性
                                  pAttr = GATTServApp_FindAttr( attrTbl, numAttrs, pValue );
                                    if ( pAttr != NULL )
                                    {
                                                      if ( pItem->value & GATT_CLIENT_CFG_NOTIFY )
                                                        {
                                                                                status |= gattServApp_SendNotiInd( pItem->connHandle, GATT_CLIENT_CFG_NOTIFY, 
                                                                                                                                            authenticated, pAttr, taskId, pfnReadAttrCB );
                                                        }
        
                                                     if ( pItem->value & GATT_CLIENT_CFG_INDICATE )
                                                      {
                                                                              status |= gattServApp_SendNotiInd( pItem->connHandle, GATT_CLIENT_CFG_INDICATE, 
                                                                             authenticated, pAttr, taskId, pfnReadAttrCB );
                                                      }
                                      }
                        }
  } // for

Viewing all articles
Browse latest Browse all 7524

Trending Articles