This is software for a low power cellular asset tracker. The tracker monitors for movement, and if movement has been detected it will report daily, otherwise the device will report once a week sending GPS location, battery status, and movement status.
impC001 cellular module impC001 breakout board u-blox M8N GPS module 3.7V 2000mAh battery from Adafruit
This project uses u-blox AssistNow services, and requires and account and authorization token from u-blox. To apply for an account register here.
This project has been written using VS code plug-in. All configuration settings and pre-processed files have been excluded. Follow the instructions here to install the plug-in and create a project.
Replace the src folder in your newly created project with the src folder found in this repository
Update settings/imp.config "device_code", "agent_code", and "builderSettings" to the following (updating the UBLOX_ASSISTNOW_TOKEN with your u-blox Assist Now authorization token):
"device_code": "src/device/Main.device.nut"
"agent_code": "src/agent/Main.agent.nut"
"builderSettings": {
"variable_definitions": {
"UBLOX_ASSISTNOW_TOKEN" : "<YOUR-UBLOX-ASSIST-NOW-TOKEN-HERE>"
}
}
For development purposes uart logging is recommended to see offline device logs. Current code uses hardware.uartDCAB (A: RTS, B: CTS, C: RX, D: TX) for logging.
Settings are all stored as constants. Modify to customize the application.
Rough wake timings base on code committed on 3/1/18 under good cellular conditions and in a location that can get a GPS fix.
- Wake with no connections ~650-655 ms
- Wake and connection ~40s
- Cold boot (connection established before code starts) ~20-30s
Code licensed under the MIT License.