silicon gatewayhost mqtt 修復設備入網只報1個端口的問題

device-table-discovery.c :

// We have a new endpoint.
static void newEndpointDiscovered(EmberAfPluginDeviceTableEntry *p_entry)
{
  // Figure out if we need to do anything, like write the CIE address to it.
  if (p_entry->deviceId == DEVICE_ID_IAS_ZONE) {
    // write IEEE address to CIE address location
    emAfDeviceTableSendCieAddressWrite(p_entry->nodeId, p_entry->endpoint);
  }
  p_entry->state = EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_JOINED;
  // New device is set, time to make the callback to indicate a new device
  // has joined.
  emberAfPluginDeviceTableNewDeviceCallback(p_entry->eui64, p_entry->endpoint);//增加endpoint參數
  emAfDeviceTableSave();
}

gateway-relay-mqtt.c:

將  deviceTableIndex = emberAfDeviceTableGetFirstIndexFromEui64(eui64);

替換爲

deviceTableIndex = emberAfDeviceTableGetIndexFromEui64AndEndpoint(eui64,endpoint);

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章