bifravst / cat-tracker-fw

Cat Tracker Firmware
https://bifravst.github.io/
3 stars 3 forks source link

FW with CONFIG_LTE_NETWORK_MODE_LTEM_GPS=y reports "NB-IoT GPS" #62

Closed coderbyheart closed 4 years ago

coderbyheart commented 4 years ago
*** Booting Zephyr OS version 2.1.0  ***
[00:00:00.201,232] <dbg> nrf9160_gps.init: MAGPIO set: AT%XMAGPIO=1,0,0,1,1,1574,1577
[00:00:00.216,308] <dbg> nrf9160_gps.init: COEX0 set: AT%XCOEX0=1,1,1570,1580
[00:00:00.224,151] <inf> cat_tracker: The cat tracker has started
[00:00:00.230,865] <inf> cat_tracker: Version: v0.66.0
[00:00:00.243,469] <inf> dfu_target: Device get binding device
[00:00:00.256,530] <inf> gps_control: GPS initialized
[00:00:00.262,176] <inf> cat_tracker: Connecting to LTE network. 
[00:00:00.268,890] <inf> cat_tracker: This may take several minutes.
[00:00:00.288,940] <dbg> lte_lc.w_lte_lc_connect: Network mode: AT%XSYSTEMMODE=0,1,1,0
[00:00:09.888,641] <inf> cat_tracker: Incoming RSRP status message, RSRP value is 77
[00:00:09.897,552] <dbg> lte_lc.parse_nw_reg_status: Network registration status: 2
[00:00:14.776,184] <dbg> lte_lc.parse_nw_reg_status: Network registration status: 5
[00:00:14.784,698] <inf> cat_tracker: Connected to LTE network
[00:00:14.791,198] <dbg> nrf9160_timestamp.nrf9160_time_handler: New date time update in: 3600 seconds
[00:00:14.801,208] <dbg> nrf9160_timestamp.update_new_date_time: Updating date time UTC...
[00:00:14.810,119] <dbg> nrf9160_timestamp.check_current_time: Date time never set
[00:00:14.818,298] <dbg> nrf9160_timestamp.update_new_date_time: Error getting current time
[00:00:14.827,301] <dbg> nrf9160_timestamp.update_new_date_time: Fallback on cellular network time
[00:00:14.838,195] <dbg> nrf9160_timestamp.get_time_cellular_network: Response from modem: +CCLK: "20/02/03,12:35:27+04
[00:00:14.849,700] <dbg> nrf9160_timestamp.update_new_date_time: Time from cellular network successfully obtained
[00:00:15.466,857] <dbg> bifravst_cloud.broker_init: IPv4 Address found 3.124.240.112
[00:00:22.322,082] <inf> aws_jobs: Subscribe: $aws/things/352656100378903/jobs/notify-next
[00:00:22.332,153] <inf> aws_jobs: Subscribe: $aws/things/352656100378903/jobs/$next/get/#
[00:00:22.342,071] <dbg> bifravst_cloud.mqtt_evt_handler: MQTT client connected!
[00:00:22.350,097] <dbg> bifravst_cloud.topic_subscribe: Subscribing to: $aws/things/352656100378903/shadow/get/rejected
[00:00:22.361,663] <dbg> bifravst_cloud.topic_subscribe: Subscribing to: $aws/things/352656100378903/shadow/get/accepted/desired/cfg
[00:00:22.374,298] <dbg> bifravst_cloud.topic_subscribe: Subscribing to: $aws/things/352656100378903/shadow/update/delta
[00:00:22.386,901] <inf> cat_tracker: CLOUD_EVT_CONNECTED
[00:00:22.392,944] <dbg> bifravst_cloud.data_publish: Publishing to topic: $aws/things/352656100378903/shadow/get
[00:00:22.548,004] <inf> aws_fota: subscribed to notify-next topic
[00:00:22.554,901] <inf> aws_jobs: Publish topic: $aws/things/352656100378903/jobs/$next/get
[00:00:22.563,964] <inf> aws_jobs: Publish payload {"clientToken": ""}
[00:00:22.763,214] <dbg> bifravst_cloud.mqtt_evt_handler: MQTT_EVT_SUBACK: id = 2114 result = 0
[00:00:22.810,974] <dbg> bifravst_cloud.mqtt_evt_handler: MQTT_EVT_SUBACK: id = 1234 result = 0
[00:00:23.032,135] <dbg> aws_fota.aws_fota_on_publish_evt: Received topic: $aws/things/352656100378903/shadow/get/accepted/desired/cfg
[00:00:23.044,952] <inf> aws_fota: received an unhandled MQTT publish event on topic: $aws/things/352656100378903/shadow/get/accepted/desired/cfg
[00:00:23.058,715] <dbg> bifravst_cloud.mqtt_evt_handler: MQTT_EVT_PUBLISH: id = 15764 len = 74 
[00:00:23.068,206] <inf> cat_tracker: CLOUD_EVT_DATA_RECEIVED
[00:00:23.076,110] <inf> cloud_codec: Decoded message: {
                                                                "cfg":  {
                                                                                        "act":  true,
                                                                                                                "mvres":        60,
                                                                                                                                                "mvt":  3590,
                                                                                                                                                                 "acct": 10,
                                                                                                                                                                              "actwt": 60,
                                                                                                                                                                                            "gpst": 600
                                                                                                                                                                                                        }
                                                                                                                                                                                                         }
[00:00:23.091,247] <inf> cloud_codec: SETTING GPST TO: 600
[00:00:23.097,320] <inf> cloud_codec: SETTING ACTIVE TO: 1
[00:00:23.103,393] <inf> cloud_codec: SETTING ACTIVE WAIT TO: 60
[00:00:23.110,015] <inf> cloud_codec: SETTING PASSIVE_WAIT TO: 60
[00:00:23.116,699] <inf> cloud_codec: SETTING MOVEMENT TIMEOUT TO: 3590
[00:00:23.123,931] <inf> cloud_codec: SETTING ACCEL THRESHOLD TIMEOUT TO: 10
[00:00:23.141,204] <dbg> bifravst_cloud.mqtt_evt_handler: MQTT_EVT_PUBACK: id = 18714 result = 0
[00:00:23.226,226] <dbg> aws_fota.aws_fota_on_publish_evt: Received topic: $aws/things/352656100378903/jobs/$next/get/acceptedsired/cfg
[00:00:23.239,105] <inf> aws_fota: Checking for an available job
[00:00:23.245,819] <dbg> aws_fota.get_job_execution: Got only one field: {"clientToken":"
[00:00:23.254,669] <inf> aws_fota: No queued jobs for this device
[00:00:27.405,487] <inf> cloud_codec: Encoded message: {
                                                                "state":        {
                                                                                                "reported":     {
                                                                                                                                        "cfg":  {
                                                                                                                                                                  "gpst": 600,
                                                                                                                                                                                  "act": true,
                                                                                                                                                                                                  "actwt": 60,
                                                                                                                                                                                                                  "mvres": 60,
                                                                                                                                                                                                                                  "mvt": 359,
                                                                                                                                                                                                                                            0
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            }
[00:00:27.425,048] <dbg> bifravst_cloud.data_publish: Publishing to topic: $aws/things/352656100378903/shadow/update
[00:00:27.472,167] <inf> cloud_codec: Encoded message: {
                                                                "state":        {
                                                                                                "reported":     {
                                                                                                                                        "dev":  {
                                                                                                                                                                  "v": {
                                                                                                                                                                             "band": 3,
                                                                                                                                                                                            "nw": "NB-IoT GPS",
                                                                                                                                                                                                                    "iccid": "89450421180216,
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            "
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            9
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            "
                                                                                                                                                                                                                                            ,
                                                                                                                                                                                                                                            9
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            }
[00:00:27.516,937] <dbg> bifravst_cloud.data_publish: Publishing to topic: $aws/things/352656100378903/shadow/update
simensrostad commented 4 years ago

Not able to reproduce this issue. Related to a63805c3be70730582a5d9c2a8b29ddb542f115d?

coderbyheart commented 4 years ago

So, what does your device report? Maybe it's a network provider specific thing?

simensrostad commented 4 years ago

My device reports "LTE-M GPS" when having CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y From the looks of the output log I can see that the device is configured to use NB-IOT and GPS.

[00:00:00.288,940] lte_lc.w_lte_lc_connect: Network mode: AT%XSYSTEMMODE=0,1,1,0

AT%XSYSTEMMODE= LTE-M, NB-IOT, GNSS, Preferred lte mode

In other words the device must have been configure with CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y which it looks like was the default for LTE build before commit a63805c3be70730582a5d9c2a8b29ddb542f115d

simensrostad commented 4 years ago

By default the config file uses CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y. For the LTE-M build the line must be replaced by CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y

In my understanding the build-and-release.yaml as of now patches the lte-m build by replacing CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y with CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y. So when it does not find this config it is never patched. Can this be the case?