Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Report battery on boot #27

Closed
coderbyheart opened this issue Mar 18, 2020 · 2 comments
Closed

Report battery on boot #27

coderbyheart opened this issue Mar 18, 2020 · 2 comments
Labels
enhancement New feature or request released

Comments

@coderbyheart
Copy link
Member

coderbyheart commented Mar 18, 2020

Currently the tracker goes into "wait for motion" after reporting its configuration.

It should report its battery level

Log after boot:

*** Booting Zephyr OS build v2.1.99-ncs1-4-gc025ef3dd566  ***
[00:00:00.199,035] <inf> cat_tracker: The cat tracker has started
[00:00:00.205,627] <inf> cat_tracker: Version: 1.6.2
[00:00:00.211,090] <inf> watchdog: Watchdog timeout installed. Timeout: 10000
[00:00:00.218,750] <inf> watchdog: Watchdog started
[00:00:00.224,151] <inf> watchdog: Watchdog feed enabled. Timeout: 5000
[00:00:00.238,769] <inf> cat_tracker: Device IMEI: 352656100248049
[00:00:00.245,727] <inf> gps_control: GPS initialized
[00:00:00.251,312] <inf> cat_tracker: Connecting to LTE network. 
[00:00:00.257,904] <inf> cat_tracker: This may take several minutes.
[00:00:00.273,956] <inf> lte_lc: Using legacy LTE PCO mode...
[00:00:00.280,242] <dbg> lte_lc.w_lte_lc_connect: Network mode: AT%XSYSTEMMODE=0,1,1,0
[00:00:06.524,139] <inf> cat_tracker: Incoming RSRP status message, RSRP value is 57
[00:00:06.532,989] <dbg> lte_lc.parse_nw_reg_status: Network registration status: 2
[00:00:08.157,531] <dbg> lte_lc.parse_nw_reg_status: Network registration status: 5
[00:00:08.165,893] <inf> cat_tracker: Connected to LTE network
[00:00:08.172,271] <dbg> date_time.new_date_time_get: Updating date time UTC...
[00:00:08.180,084] <dbg> date_time.current_time_check: Date time never set
[00:00:08.187,469] <dbg> date_time.new_date_time_get: Current time not valid
[00:00:08.195,037] <dbg> date_time.new_date_time_get: Fallback on cellular network time
[00:00:08.204,223] <dbg> date_time.time_modem_get: Response from modem: +CCLK: "20/03/18,11:47:31+04
[00:00:08.213,928] <dbg> date_time.new_date_time_get: Time from cellular network obtained
[00:00:27.004,089] <inf> cat_tracker: Incoming RSRP status message, RSRP value is 53
[00:00:28.350,799] <dbg> aws_iot.broker_init: IPv4 Address found 18.185.229.115
[00:00:35.409,210] <inf> aws_jobs: Subscribe: $aws/things/352656100248049/jobs/notify-next
[00:00:35.419,189] <inf> aws_jobs: Subscribe: $aws/things/352656100248049/jobs/$next/get/#
[00:00:35.428,833] <dbg> aws_iot.mqtt_evt_handler: MQTT client connected!
[00:00:35.436,279] <dbg> aws_iot.topic_subscribe: Subscribing to application topic: $aws/things/352656100248049/shadow/get/accepted/desired/cfg
[00:00:35.450,744] <dbg> aws_iot.topic_subscribe: Subscribing to AWS shadow topic: $aws/things/352656100248049/shadow/update/delta
[00:00:35.463,928] <inf> cat_tracker: CLOUD_EVT_CONNECTED
[00:00:35.469,909] <dbg> aws_iot.aws_iot_send: Publishing to topic: $aws/things/352656100248049/shadow/get
[00:00:35.480,560] <inf> cat_tracker: CLOUD_EVT_READY
[00:00:35.631,134] <inf> aws_fota: subscribed to notify-next topic
[00:00:35.637,908] <inf> aws_jobs: Publish topic: $aws/things/352656100248049/jobs/$next/get
[00:00:35.647,003] <inf> aws_jobs: Publish payload {"clientToken": ""}
[00:00:35.840,332] <dbg> aws_iot.mqtt_evt_handler: MQTT_EVT_SUBACK: id = 47538 result = 0
[00:00:35.890,167] <dbg> aws_iot.mqtt_evt_handler: MQTT_EVT_SUBACK: id = 47064 result = 0
[00:00:35.920,379] <dbg> aws_iot.mqtt_evt_handler: MQTT_EVT_SUBACK: id = 2114 result = 0
[00:00:36.000,335] <dbg> aws_fota.on_publish_evt: Received topic: $aws/things/352656100248049/shadow/get/accepted/desired/cfg
[00:00:36.012,207] <dbg> aws_fota.on_publish_evt: received an unhandled MQTT publish event on topic: $aws/things/352656100248049/shadow/get/accepted/desired/cfg
[00:00:36.027,160] <dbg> aws_iot.mqtt_evt_handler: MQTT_EVT_PUBLISH: id = 15956 len = 75 
[00:00:36.035,919] <inf> cat_tracker: CLOUD_EVT_DATA_RECEIVED
Decoded message: {
        "cfg":  {
                "act":  false,
                "actwt":        300,
                "mvres":        60,
                "mvt":  3600,
                "gpst": 100,
                "acct": 5
        }
}
[00:00:36.055,450] <inf> cloud_codec: SETTING GPST TO: 100
[00:00:36.061,431] <inf> cloud_codec: SETTING ACTIVE TO: 0
[00:00:36.067,413] <inf> cloud_codec: SETTING ACTIVE WAIT TO: 300
[00:00:36.074,035] <inf> cloud_codec: SETTING PASSIVE_WAIT TO: 60
[00:00:36.080,627] <inf> cloud_codec: SETTING MOVEMENT TIMEOUT TO: 3600
[00:00:36.087,738] <inf> cloud_codec: SETTING ACCEL THRESHOLD TIMEOUT TO: 5
Encoded message: {
        "state":        {
                "reported":     {
                        "cfg":  {
                                "gpst": 100,
                                "act":  false,
                                "actwt":        300,
                                "mvres":        60,
                                "mvt":  3600,
                                "acct": 5
                        }
                }
        }
}
[00:00:36.113,067] <dbg> aws_iot.aws_iot_send: Publishing to topic: $aws/things/352656100248049/shadow/update
[00:00:36.200,347] <dbg> aws_iot.mqtt_evt_handler: MQTT_EVT_PUBACK: id = 54199 result = 0
[00:00:36.278,381] <dbg> aws_fota.on_publish_evt: Received topic: $aws/things/352656100248049/jobs/$next/get/accepted
[00:00:36.289,550] <inf> aws_fota: Checking for an available job
[00:00:36.296,203] <dbg> aws_fota.get_job_execution: Got only one field: {"clientToken":"","timestamp":1584532079}
[00:00:36.307,189] <inf> aws_fota: No queued jobs for this device
Encoded message: {
        "state":        {
                "reported":     {
                        "dev":  {
                                "v":    {
                                        "band": 20,
                                        "nw":   "NB-IoT GPS",
                                        "iccid":        "89450421180216254864",
                                        "modV": "mfw_nrf9160_1.1.1",
                                        "brdV": "nrf9160_pca20035",
                                        "appV": "1.6.2"
                                },
                                "ts":   1584532083267
                        },
                        "roam": {
                                "v":    {
                                        "rsrp": 53,
                                        "area": 3305,
                                        "mccmnc":       24202,
                                        "cell": 34247442,
                                        "ip":   "10.81.168.165"
                                },
                                "ts":   1584532083267
                        }
                }
        }
}
[00:00:40.556,274] <dbg> aws_iot.aws_iot_send: Publishing to topic: $aws/things/352656100248049/shadow/update
@coderbyheart coderbyheart added the enhancement New feature or request label Mar 18, 2020
@coderbyheart coderbyheart changed the title Report battery, check for updates on boot Report battery on boot Mar 18, 2020
@coderbyheart
Copy link
Member Author

v1.6.2 does check for updates

@github-actions
Copy link

🎉 This issue has been resolved in version 1.6.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

2 participants