Invalid core id in one of the particle events

Hello,
One of the events published from particle has an invalid core id. Event below:

event: DeviceInfo
data: {“data”:“type=IP_List,localIP=xx.xx.xxx.xx,gatewayIP=xx.xx.xxx.x,BSSID=aa:bb:cc:dd:ee:ff”,“ttl”:60,“published_at”:“2017-12-04T18:45:04.278Z”,“coreid”:“38004300025–53532373238”}

Any idea what’s causing this?

Thanks
Dheeraj

Did you publish this information from your device?

Yes

In that case, you might want to show the firmware code for us to determine how you are constructing the publish information that caused the id to be incorrect.

1 Like
void setup(){
    publishIPs();
}

void loop(){

}

void publishIPs()
{
    char ipAddressList[100] = {0};
    memcpy(&ipAddressList[0], "type=IP_List,", 13);
    getLocalAndGateWayIPs(&ipAddressList[13]);
    Particle.publish("DeviceInfo", ipAddressList, 60, PRIVATE);
}

void getLocalAndGateWayIPs(char * buf)
{
    byte bssid[6] = {0};
    WiFi.BSSID(bssid);

    sprintf(buf, "localIP=%s,gatewayIP=%s,BSSID=%02x:%02x:%02x:%02x:%02x:%02x", WiFi.localIP().toString().c_str(),
        WiFi.gatewayIP().toString().c_str(), bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]);
}

This happened only once though.

Hi @dheerajdake,

Hmm, this isn’t really a failure that’s generally possible, or one I’ve ever seen. Are you looking at the event list in the console? Maybe the view on the webpage truncated the number? Are you seeing this truncation via a webhook, or from the CLI?

Thanks,
David

Hello,
I am using the curl api in console.particle.io and am viewing the log in terminal.

Thanks
Dheeraj

Hi @dheerajdake,

Can you try using one of the many supported clients for consuming these events, and did you see this happen more than once?

Thanks,
David

Also I see that the core id is separated exactly into 2 parts with ‘–’. Is the core id generated by joining 2 buffers or something?

This is the first time I saw this. I rebooted my device and I didn’t see this again. I’ll comment if I see it again. What did you mean by “Can you try using one of the many supported clients for consuming these events”?

Thanks
Dheeraj

Hi @dheerajdake,

No, that is not how the ID is constructed, hence why I said this type of failure doesn’t really make sense. I suspect this is an artifact related to the use of curl for SSE streams.

Thanks,
David

Okay. I have a webhook setup for that event. I’ll check if it reported there correctly.

Thanks
Dheeraj

1 Like

Hello @Dave,
The web hook did post with correct core id. So then it might be related to what you said.

Thanks
Dheeraj

1 Like