Hi, I have been using a tracker one for a couple of weeks but I keep having a weird problem. My device is set up to ping every 10 min if there is motion or every 6 hours. Sometimes, the device will just stop waking up like if no motion were detected. To fix it, I need to reset the device and it is not very usefull if I need to do that every day. I have heard about the sleep on motion problem and I was wondering if this problem was still of actuality with the tracker one. If that is the case I might have found my issue.
Thanks !
What settings do you have selected?
In location settings, you should have a maximum location update frequency of 600 (seconds, 10 minutes) and a minimum location update frequency of 21600 (6 hours).
You should have motion detection enabled, but as a test, if you disable it, do you still get updates every 6 hours, or does it stop updating?
I have a maximum update at 600 seconds, minimum at 21600 seconds as you said. I put the motion movement sensitivity at medium and I enabled sleep.
But yes I do still get my update every 6 hours even if the motion settings are disabled. Even when I get this weird problem I get my ping every 6 hours but it doesn't wake up when it starts moving unless I reset the tracker one
Thanks for the quick answer
but it doesn't wake up when it starts moving
Sorry, I misunderstood that part. That's an IMU wake issue, not a wake settings issue.
Which version of Tracker Edge are you using?
And is the device stationary when going to sleep, or is there are possibility that it could move during the several seconds it takes to go to sleep?
I had my tracker in developpement mode so the update for the v18 didn't went through... Seems like I had no version on it as there was no version showing into the console. I have the device inside a truck trailer so, yes there is a lot of movement in there. Do I need to do some coding to be sure the IMU issue won't happen or just by having my device updated I will be fine?
I'm not sure what the problem is yet, just trying to get an idea of where it might be.
I will give it another try with the updated version of tracker edge ! It might be the cause of all my problems !
Hi, its me again ! I am still testing some stuff and I found that when I put the device in normal mode instead of developper mode, my code that I flashed to the tracker one is overwrite and if I flash my code the console says that I have no firmware version :
Is this normal behavior because I have customize some code in the main.cpp file of the v18 version or this is why I had IMU issues?
Edit : When I update by returning into normal mode the IMU issue seems to disappear but when I have my code flashed on the device and no firmware is showing up, I am actually able to reproduce the problem. My device will now not wake up since I moved it while it was falling asleep. Is it possible to have the v18 showing up and my code in it as well?
Here is my code if it matters :
#include "Particle.h"
#include "tracker_config.h"
#include "tracker.h"
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC);
#ifndef SYSTEM_VERSION_v400ALPHA1
PRODUCT_ID(PLATFORM_ID);
#endif
unsigned long previousMillis = 0;
const long interval = 120*1000;
FuelGauge fuel;
void setup()
{
Tracker::instance().init();
Particle.connect();
}
void loop()
{
unsigned long currentMillis = millis();
if (currentMillis < previousMillis) {
//Watching for timer rollback
previousMillis = currentMillis;
}
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
float battery = fuel.getSoC();
if (battery < 17) {
Particle.publish("loc", String(battery));
}
}
Tracker::instance().loop();
}
It just publish an event when the battery level is under a certain value
Hi @mlavigne,
I guess you're familiar with marking a device as a Development Device and why your code is overwritten when it isn't marked as such (read more here Development devices | Getting Started | Particle).
Aside from that, I can see that the you have surrounded the important bit that sets the firmware version a define
:
#ifndef SYSTEM_VERSION_v400ALPHA1
PRODUCT_ID(PLATFORM_ID);
#endif
The argument of PRODUCT_ID
is what tells the Particle Cloud which version your firmware has. So make sure that your define ifndef SYSTEM_VERSION_v400ALPHA1
evaluates to false or lose it entirely.
Hope that helps.
Thanks a lot @johannes.nuwiel ! You helped me resolve my issue. I think I was just missing this :
#ifndef SYSTEM_VERSION_v400ALPHA1
PRODUCT_ID(1);
#endif
PRODUCT_VERSION(18);
Now, I have the v18 version showed on the console and my IMU problem is gone !
Thanks for putting me on the right way
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.