Phantom event type with Bad Checksum

Folks,
Strange problem here. My Electron is publishing fine but I get a strange response to my
"curl https://api.particle.io/v1/devices/events?access_token=…"

Essentially i get the proper output to the line

String gps_line =
      "{\"lat\":"    + String(convertDegMinToDecDeg(GPS.latitude))
      + ",\"lon\":-"   + String(convertDegMinToDecDeg(GPS.longitude))
      + ",\"i\":"   + String(accelMax)
      + ",\"it\":"   + String(maxImpactTime)
      + ",\"ila\":"   + String(convertDegMinToDecDeg(impactLat))
      + ",\"ilo\":"   + String(convertDegMinToDecDeg(impactLong))
    + ",\"a\":"     + String(GPS.altitude)
    + ",\"q\":"     + String(GPS.fixquality)
    + ",\"spd\":"   + String(GPS.speed)
    + ",\"mot\":"   + String(motionInTheLastMinute)
    + ",\"s\": "  + String(GPS.satellites)
    + ",\"vcc\":"   + String(fuel.getVCell())
    + ",\"soc\":"   + String(fuel.getSoC())
    + "}";
status = gps_line;
Serial.println(gps_line);
Particle.publish(MY_NAME + String("_location"), gps_line, 60, PRIVATE);

but then I get a fast repeating list of
Events called GPS with Bad Checksums… The weird thing is… I’m not publishing any event called GPS… Is it possible that this is some residual function or variable share from some earlier code that the system thinks I’m still using ?

*> event: AssetTracker_location*
*> data: {"data":"{\"lat\":44.381274,\"lon\":-72.938298,\"i\":14816,\"it\":1458157894,\"ila\":44.366667,\"ilo\":72.933333,\"a\":106.599998,\"q\":2,\"spd\":0.000000,\"mot\":0,\"s\": 8,\"vcc\":3.978000,\"soc\":89.589844}","ttl":"60","published_at":"2016-03-16T19:55:14.170Z","coreid":"590051000951343334363138"}*

*> event: GPS*
*> data: {"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T19:55:18.059Z","coreid":"590051000951343334363138"}*

*> event: GPS*
*> data: {"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T19:55:18.219Z","coreid":"590051000951343334363138"}*

*> event: GPS*
*> data: {"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T19:55:21.469Z","coreid":"590051000951343334363138"}'*

*> .... etc....*

Any idea where I’m getting this phantom publication… and why it has a bad checksum ? I think this is eating through my data allotment !
any help appreciated. Thanks
-jc

It looks like you are using PRIVATE events on the publish command, but you are using the public event stream when you are subscribing to them using curl.

What happens when you do:

curl https://api.particle.io/v1/devices/0123456789abcdef01234567/events/temp?access_token=1234

with 01234... replaced by your device ID and temp replaced by your event name?

1 Like

Bko,
Thanks… I’ll try that… but I don’t think the problem is in my subscription… Look at what I see in my console… … No curl involved…
-jc

EVENT NAMEDATAPUBLISHED ATDEVICE
Show 0 new event
GPS{ error: "bad checksum"}March 16th at 4:58:00 pmjcelectron
{"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T20:58:00.667Z","coreid":"590051000951343334363138","name":"GPS"}
GPS{ error: "bad checksum"}March 16th at 4:58:00 pmjcelectron
{"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T20:58:00.487Z","coreid":"590051000951343334363138","name":"GPS"}
GPS{ error: "bad checksum"}March 16th at 4:58:00 pmjcelectron
{"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T20:58:00.277Z","coreid":"590051000951343334363138","name":"GPS"}
GPS{ error: "bad checksum"}March 16th at 4:57:59 pmjcelectron
{"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T20:57:59.597Z","coreid":"590051000951343334363138","name":"GPS"}
GPS{ error: "bad checksum"}March 16th at 4:57:59 pmjcelectron
{"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T20:57:59.427Z","coreid":"590051000951343334363138","name":"GPS"}
GPS{ error: "bad checksum"}March 16th at 4:57:59 pmjcelectron
{"data":"{ error: \"bad checksum\"}","ttl":"60","published_at":"2016-03-16T20:57:59.177Z","coreid":"590051000951343334363138","name":"GPS"}
GPS{ error: "bad checksum"}March 16th at 4:57:31 pmjcelectron

OK, I see now that the coreid’s are all for the same device.

This has happened before when someone was using a PRODUCT_ID in the product maker flow and the firmware that was flashed was not what they expected.

Could that be happening for you?

How are you compiling? Web IDE? Particle CLI or Dev? Local toolchain?

Can you go to https://dashboard.particle.io and watch the event stream and verify they are from the device?

Editing with Atom, then using CLI to compile and dploy via USB.
eg:

 ./build.sh motion-tracker
flash --serial motion-tracker.bin

Whats a Product ID… and How might I be setting it ? …

ps… is there a way to post a picture ? I’d like to show a console. I see these checksum errors in my dashboard… and the histograms seem to imply they are using a lot of data… e.g. … every 30 seconds or so, i get a bunch of blue rectangles in the hitogram that correspond to one of the checksum errors

thanks
-jc

Yes… they all have the correct cored…

I just did an experiment and commented out all publishes in my code… I still get the bad checksum errors… but it looks like i’ve stopped using data…

any idea what might be causing this ?
Thanks so much for your help !
-jc

Are any of your other devices publishing? Does the deviceName publishing match your electron?

Are you using any library that might do the publishing for debugging purposes?
How does your code look like?

Yes, just copy paste it or use the upload symbol

Folks,
I resolved this… I was using Adafruit_GPS … which had an embedded Particle.Publish on bad checksum from the GPS. I still have not resolved why I occaisionally am getting a bad checksum from the GPS… which seems to be working… but commenting out the Publish cured my phantom event… and my data being used up quickly
-jc