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);

猜你喜欢

转载自blog.csdn.net/u013578795/article/details/86706503