LilyGo T-A7670SA LTE GPS Tracker

October 20, 2025
1633
Views

Introduction

This is a continuation of the LilyGo T-Call GPS Tracker project that leverages the LTE network.

Highly customizable and feature-rich GPS tracker and alarm for cars or boats. The LilyGo T-A7670SA uses the LTE network and SMS commands.

Below is a list of available features.

Feature Description
✨ Features
πŸ“ž Central Phone Number Management Program up to three authorized phone numbers that can control the device. All alert notifications are sent to phone_number_1.
πŸ›‘οΈ Unauthorized Command Protection The system only accepts commands from authorized numbers. Messages from unknown numbers are rejected.
πŸ”’ Optional PIN Command Security Optional PIN mode requires a PIN appended to SMS commands, adding an additional layer of protection.
β›½ Fuel Shutoff Relay (Safety Gated) Remote immobilization relay. The relay will not activate if the ignition is currently ON for safety.
πŸ“Š Status Reporting Displays system information including GPS fix, satellite count, LTE signal strength, ignition state, battery voltage, and alarm status.
πŸ›‘οΈ Alarm Mode When armed, the system monitors doors, ignition state, movement, and speed. Alarm events trigger alerts and optional horn output.
🏎️ Speed Alarm (Tow Detection) Triggers an alert if the vehicle exceeds a configured speed while the alarm is armed.
πŸš— Remote Central Locking Lock or unlock vehicle doors remotely using SMS commands.
πŸ” Lock Double Pulse Compatibility Optional double lock/unlock pulse improves compatibility with vehicles requiring two lock signals.
πŸ”” Lock Confirmation Output Optional lock confirmation output can trigger an external confirmation signal when the vehicle locks.
πŸ”’ Automatic Speed-Based Door Lock Doors automatically lock when the vehicle exceeds a configurable GPS speed threshold.
πŸ“£ Find Your Car Activates the horn in a pulse pattern to help locate the vehicle.
🎺 Horn Feedback Optional audible confirmation for commands. One beep for lock/arm and two beeps for unlock/disarm.
⏱ Adjustable Horn Pulse Timing The horn pulse duration can be dynamically adjusted to suit different vehicles.
πŸ”” Door Open Notifications Sends an alert when doors are opened, even when the alarm is not armed.
πŸšͺ Door Open Alarm If a door is opened while the alarm is armed, the alarm triggers and sends an alert.
🧨 Ignition Alarm If ignition turns on while the alarm is armed, the alarm triggers and sends an alert.
🚨 Alarm Horn Output Horn pulses during alarm events until the system is disarmed.
πŸ’¬ Command Confirmation Control SMS confirmations for commands such as lock, unlock, arm, and disarm can be enabled or disabled.
πŸ€– Auto-Arm Automatically arms the alarm after ignition turns off with a configurable delay.
πŸ“… Scheduled Arming / Disarming Supports up to three programmable schedules for automatic arming and disarming.
πŸ‘€ Configurable Profiles Supports multiple configuration profiles with different system settings that can be switched via SMS.
πŸ“Ά LTE Signal Monitoring Displays LTE signal strength for connectivity diagnostics.
πŸ•’ LTE Network Time Sync The system clock automatically synchronizes with the cellular network.
πŸ“ GPS Tracking Provides GPS coordinates, speed, satellite count, and a Google Maps link via SMS.
πŸ—ΊοΈ Geofencing Create a configurable geographic boundary. Alerts trigger if the vehicle exits the defined area.
πŸ”‹ Battery Voltage Monitoring Monitors vehicle battery voltage using both ADC and INA219 sensors with configurable alert thresholds.
πŸ“‘ MQTT Telemetry Optional MQTT publishing for remote monitoring platforms such as Home Assistant.
🧭 IMU Motion Monitoring Uses a triple-axis accelerometer and gyro to detect motion, tilt, and abnormal vehicle angles.
πŸ’₯ Crash Detection Impact detection using the onboard accelerometer with adjustable sensitivity.
πŸ’€ Deep Sleep Power Saving Optional deep sleep scheduling reduces power consumption while the vehicle is parked.
πŸ”Œ Backup Battery Support Device can continue operating if vehicle power is disconnected.
πŸ§ͺ AT Command Passthrough Send raw modem AT commands via SMS for diagnostics and troubleshooting.
πŸ“‘ Wi-Fi Access Point Control Enable or disable the onboard Wi-Fi access point for local configuration.
πŸ–₯ Web UI Control Panel Monitor sensors and control relays through the built-in web interface.

Recommended Hardware

When purchasing the LilyGo T-A7670, it is recommended to choose the SA version with GPS. This has Band 28 support which is used by many countries for rural and widespread areas.

Also, make sure you choose the model with GPS built-in. As per the below table, the chosen model would be the A7670SA-FASE.

Model GPS Phone Call SMS Frequency band
A7670E-FASEβœ…βœ…βœ… LTE-FDD:B1/B3/B5/B7/B8/B20 GSM:900/1800
A7670SA-FASEβœ…βœ…βœ… LTE-FDD:B1/B2/B3/B4/B5/B7/B8/B28/B66 GSM:850/900/1800/1900
A7670E-LNXY-UBL❌❌❌ LTE-FDD:B1/B3/B5/B7/B8/B20
A7670SA-LASEβŒβœ…βœ… LTE-FDD:B1/B2/B3/B4/B5/B7/B8/B28/B66 GSM:850/900/1800/1900
A7670SA-LASCβŒβœ…βœ… LTE-FDD:B1/B2/B3/B4/B5/B7/B8/B28/B66 GSM:850/900/1800/1900
A7670G-LLSEβŒβœ…βœ… LTE-FDD:B1/B2/B3/B4/B5/B7/B8/B20/B28/B66 LTE-TDD:B34/B38/B39/B40/B41 GSM:850/900/1800/1900
A7670G-LABEβŒβœ…βœ… LTE-FDD:B1/B2/B3/B4/B5/B7/B8/B12/B13/B18/B19/B20/B25/B26/B28/B66 LTE-TDD:B34/B38/B39/B40/B41 GSM:850/900/1800/1900
A7670E-LASEβŒβœ…βœ… LTE-FDD:B1/B3/B5/B7/B8/B20 GSM:900/1800

Commands

The following commands will be accepted, and replies will be sent accordingly.

Command Description
πŸ” Alarm & Security
armArms the alarm
disarmDisarms the alarm
auto_armQuery auto-arm status and delay time
auto_arm_onEnable automatic arming when ignition turns off
auto_arm_offDisable automatic arming
auto_arm_time <minutes>Set delay before auto-arming
speed_alarmQuery speed alarm state and threshold
speed_alarm_onEnable speed alarm
speed_alarm_offDisable speed alarm
speed_alarm_speed <kmh>Set speed alarm threshold
siren_onEnable siren output during alarm events
siren_offDisable siren output
crash_detectionQuery crash detection status and sensitivity
crash_detection_onEnable crash detection
crash_detection_offDisable crash detection
πŸš— Doors & Locking
lockLocks vehicle doors
unlockUnlocks vehicle doors
lock_confirmationQuery lock confirmation output state
lock_confirmation_onEnable lock confirmation output
lock_confirmation_offDisable lock confirmation output
lock_double_pulseQuery double-pulse locking mode
lock_double_pulse_onEnable double-pulse lock/unlock
lock_double_pulse_offDisable double-pulse lock/unlock
auto_lockQuery auto-lock state and speed threshold
auto_lock_onEnable automatic door locking
auto_lock_offDisable automatic door locking
auto_lock_speed <kmh>Set speed threshold for auto-lock
findTrigger horn to locate the vehicle
β›½ Relay
relay_onEnable fuel shutoff relay
relay_offDisable fuel shutoff relay
πŸ“ GPS & Location
whereSend GPS location, speed, and Google Maps link
timeDisplay LTE network time and system time
gps_resetRestart the GNSS receiver
πŸ—ΊοΈ Geofencing
geofenceQuery geofence status and configuration
geofence_onEnable geofence monitoring
geofence_offDisable geofence monitoring
geofence_radius <meters>Set geofence radius
geofence_set <longitude> <latitude>Set geofence center manually
geofence_hereSet geofence center to current GPS position
πŸ“Š Status & Sensors
statusDisplay system, GPS, signal, and alarm status
battery_alarmQuery battery alarm threshold and voltage
battery_voltage <volts>Set battery alarm voltage threshold
imu_statusDisplay IMU orientation and raw values
calibrate_levelCalibrate IMU level reference
πŸ”” Notifications
notificationsQuery command notification status
notifications_onEnable SMS notifications for commands
notifications_offDisable SMS notifications for commands
horn_feedbackQuery horn feedback status
horn_feedback_onEnable horn confirmation feedback
horn_feedback_offDisable horn confirmation feedback
horn_pulsetimeQuery horn pulse duration
horn_pulsetime <ms>Set horn pulse duration
door_alertsQuery door alert status
door_alerts_onEnable SMS alerts when doors open
door_alerts_offDisable door open alerts
πŸ“ž Phone Numbers
phone_number_1Query phone number slot 1
phone_number_2Query phone number slot 2
phone_number_3Query phone number slot 3
phone_numbersList all stored phone numbers
new_number_1 <number>Set phone number slot 1
new_number_2 <number>Set phone number slot 2
new_number_3 <number>Set phone number slot 3
remove_number_1Remove phone number slot 1
remove_number_2Remove phone number slot 2
remove_number_3Remove phone number slot 3
πŸ“… Schedules
schedulesList all schedules
schedule_1Query schedule slot 1
schedule_2Query schedule slot 2
schedule_3Query schedule slot 3
schedule_1 <days>|<arm>|<disarm>Set schedule 1
schedule_2 <days>|<arm>|<disarm>Set schedule 2
schedule_3 <days>|<arm>|<disarm>Set schedule 3
remove_schedule_1Delete schedule 1
remove_schedule_2Delete schedule 2
remove_schedule_3Delete schedule 3
πŸ“‘ MQTT
mqtt_enabledEnable MQTT publishing
mqtt_disabledDisable MQTT publishing
mqtt_server <host>Set MQTT server address
mqtt_port <port>Set MQTT server port
mqtt_username <username>Set MQTT username
mqtt_password <password>Set MQTT password
mqtt_interval <seconds>Set MQTT publish interval
βš™οΈ System
apQuery Wi-Fi access point status
ap_onEnable Wi-Fi access point
ap_offDisable Wi-Fi access point
otaShow OTA update password
rebootReboot the device
at+<command>Send raw AT command to modem

Wiring Diagrams

Initial Setup

Before flashing, you must configure the substitutions. Here you can set all the phone numbers, enable functions and set variables prior to installation. With every flash, all saved data such as schedules, relay pulse times etc will be lost and restored to the values set in the substitutions. It is recommended to set the substitutions below as close to the final values as possible. All set values that differ from the substitutions will persist reboots but not re-flashing.

substitutions:
  firmware_version: "2.1"
  phone1: "+61234567890"
  phone2: "+61234567890"
  phone3: "+61234567890"
  wifi_ap_ssid: "ap-ssid"
  wifi_ap_password: "ap-password"
  ap_enable: "true"
  horn_feedback_enabled_default: "false"
  notifications_enabled_default: "true"
  door_alerts_enabled_default: "false"
  siren_enabled_default: "true"
  siren_runtime_default: "30"
  horn_pulse_time_ms_default: "250"
  lock_pulse_default_ms: "300"
  watchdog_enabled_default: "true"
  watchdog_days_default: "1"
  watchdog_hour_default: "18"
  watchdog_minute_default: "0"
  adc_offset_default: "0.00"
  ina219_offset_default: "0.00"
  tilt_alarm_threshold_default: "3.0"
  auto_arm_enabled_default: 'true'
  auto_arm_delay_minutes_default: '10'
  deep_sleep_enabled_default: 'false'
  sleep_time_default: "00:15"
  wake_time_default: "00:20"
  mqtt_enabled_default: 'false'
  mqtt_topic_default: "owntracks/dean/car-gps2"
  mqtt_cmd_topic_default: "car-gps/command"
  mqtt_server: "your.mqtt.server"
  mqtt_port: "1883"
  mqtt_username: "your-mqtt-username"
  mqtt_password: "your-mqtt-password"
  mqtt_interval_seconds: "60"
  geofence_enabled_default: "true"
  geofence_center_lat_default: "0.0"
  geofence_center_lon_default: "0.0"
  geofence_radius_m_default: "250.0"
  geofence_hysteresis_m_default: "25.0"
  ota_password: "your-ota-password"
  lock_double_pulse_default: "false"
  pin_mode_enabled: "true"
  pin: "1234"
  auto_lock_enabled: "true"
  auto_lock_speed: "20"
  speed_alarm_enabled: "true"
  speed_alarm_speed: "20.0"
  door_lock_confirmation_default: "true"
  crash_detection_enabled_default: "false"
  crash_delta_default_ms2: "20.0"
  crash_cooldown_s: "120"
  bump_detection_enabled_default: "false"
  bump_delta_default_ms2: "0.5"
  bump_cooldown_s: "45"
  speed_unit: "kmh"
  speed_offset: "0"

Resources

Resources
car-gps.yaml
LilyGo T-A7670SA GPS PCB Download v1.0
PCB Schematic
Mounting Brackets for Enclosure
Documentation
FunctionGPIO
Door Input (Deep Sleep Wake)GPIO32
Door Lock Confirmation InputGPIO23
Ignition InputGPIO19
Door Lock State InputGPIO23
Horn OutputGPIO18
Lock OutputGPIO14
Unlock OutputGPIO13
Fuel Shutoff OutputGPIO15
Spare Output 1GPIO25
Spare Output 2GPIO33
SCLGPIO21
SDAGPIO22

Troubleshooting

First Steps

Before uploading the code, edit the substitutions to meet your requirements.

substitutions:
  tz: “”
  phone1: “+61234567890”
  phone2: “+61234567890”
  phone3: “+61234567890”
  wifi_ap_ssid: “car-gps”
  wifi_ap_password: “”
  horn_feedback_enabled_default: “true”
  notifications_enabled_default: “true”
  door_alerts_enabled_default: “false”
  siren_runtime_default: “30”
  horn_pulse_time_ms_default: “250”
  watchdog_days_default: “1”
  watchdog_hour_default: “18”
  watchdog_minute_default: “0”
  adc_offset_default: “0.00”
  ina219_offset_default: “0.00”
  tilt_alarm_threshold_default: “3.0”
  auto_arm_enabled_default: ‘true’
  auto_arm_delay_minutes_default: ’10’
  sleep_time_default: “00:25”
  wake_time_default: “00:30”
  deep_sleep_enabled_default: ‘true’
  mqtt_server_sub: “mqtt.example.com”
  mqtt_port_sub: “1883”
  mqtt_username_sub: “”
  mqtt_password_sub: “”
  mqtt_interval_seconds_sub: “60”

If you have trouble adding schedules initially after first install, remove all the schedules before adding new ones.

remove_schedule_1
remove_schedule_2
remove_schedule_2

now add the new schedules

new_schedule_1 monday,tuesday,friday arm 23:00 disarm 07:00
Phone number added but still getting β€œUnauthorized”

Connect to your access point and login to the Web UI at http://192.168.4.1. Check the “sms_sender” to check the exact format that the phone number was received as and update your phone_number_x accordingly. The number will usually include your country code, e.g., +611234567

Can I have just 1 phone number?

Yes, just leave the phone_number_2 and phone_number_3 values blank (initial_value: ‘””‘). You can also use the remove_number_2 and remove_number_3, this will blank out the values for phone numbers 2 and 3.

How to confirm that the Speed alarm is working

Arm the alarm (arm) and then turn the Fuel Shutoff relay off (relay_off) and drive the car over 5km/h. The Speed alarm should now activate and send a notification to phone_number_1, phone_number_2, and phone_number_3.

The device is constantly rebooting

Constant reboots can be caused by multiple issues, mostly due to esphome failing to connect to the API server or Wi-Fi failing to connect to the network. If you are using the Wi-Fi component in esphome (not the access point), ensure you have added the reboot_timeout: 0s to your config. This is especially important for the api: section.

api:
  encryption:
    key: ""
  reboot_timeout: 0s

Sometimes, the SIM800L can continue to process the same SMS upon boot. This is coded to prevent this, but if for some reason the SIM800L keeps processing the reboot SMS on every boot, try to force it out of the reboot cycle by sending another message, any message will do.

You could also quickly connect to the device webpage and turn off the SIM800L using the SIM800L_PWR switch in the web interface, this will allow you to reflash via OTA as the SIM800L will not process any SMS message when powered down.

How to test and confirm the functions are working

To test the fuel relay, you can login to the Web UI using the access point at http://192.168.4.1 and arm the alarm (arm), you should see the Fuel Shutoff switch turn on in the Web UI.

To test your ignition, again login to the Web UI and turn on your ignition, you should see the Ignition sensor state change to “on”.

Further test to check for GPS lock can be done using the Web UI, or using the status command (status) to confirm if there is a GPS lock and how many satellites.

To test the Speed alarm, arm the alarm (arm) and turn off the fuel shutoff relay (relay_off) and drive the car over 5km/s. All phone numbers should now receive a notification Car speed alarm activated. Car is travelling more than 5km/h.

When adding schedules, does it matter how the days are formatted.

It should not. I have made it so that it will try to interpret abbreviated days of the week, such as mon, tue, tues, wed thu, thurs etc.

However, it is best to just use the full name, monday,tuesday,wednesday etc.

Speed alarm activates when the vehicle is not moving.

This may be as a result of GPS drift. If this is an issue, increase the speed in the interval: section for the speed alarm.

10.0 && !id(speed_alarm_triggered))
Doors lock automatically after sending unlock or disarm.

This is factory set for most vehicles. The default behavior is to relock the doors if unlocked and a door is not opened. To get around this, you can wire the door circuit through another relay and take it to GND. This will trick the car into thinking the door has been opened, and the doors will not lock automatically.

Set the code on unlock to trigger both the UNLOCK relay and another relay, the relay used for sending a door open signal.

Wire the door open NEGATIVE through a NC contact of the relay. When the unlock relay activates, this will also activate the door open relay, removing the GROUND and sending an open signal to the car.

This will result in the car staying unlocked until re locked.

Schedules are not running correctly.

Ensure the schedule cycles through the start and end time correctly. For example, if you set a schedule for

new_schedule_1 monday arm 14:00 disarm 16:00

make sure you add this schedule BEFORE 14:00, not after, otherwise the disarm command will not run as it has not passed the arm cycle of the schedule.

Using without Door Open and Ignition Alarm inputs.

If you want to use without the door open and/or ignition sensors, you have 2 options.

  1. Short GPIO21 and GPIO13 to GND with a short piece of wire. This will keep the inputs closed and prevent them from ever opening.
  2. Change the binary_sensor to be inverted. This way it will always see the input as “Closed”.
binary_sensor:
  - platform: gpio
    id: doors
    pin:
      number: 21
      mode: INPUT_PULLUP
      inverted: true
    name: "Doors"
Relay Wiring General Questions
  • One thing I thought of was how to wire the Fuel Shutoff Relay. I my case I went for Normally Closed as the relay I had only had a Normally Closed contact, thus when the relay is powered down, the relay is closed circuit allowing the fuel pump to operate. If the device is removed or powered down, this relay will de-energize and allow the fuel pump to operate again. You could wire the relay as Normally Open, this way power is required to energize the relay for the car to be able to start. This is a more secure option.
  • For the remainder of the relay wiring, it is up to you if you want to switch positive or negative, for me I am switching negative for everything as per my wiring diagrams.
I want to be able to turn the Fuel Shutoff relay on when the ignition is ON.

For safety reasons, the fuel shutoff relay will not activate when the ignition is ON. This is because all ARM commands are blocked by a gate attached to the IGNITION binary_sensor, thus the alarm will fail to ARM when the ignition is ON.

You can however manually activate the full shutoff relay ANYTIME with the relay_on command.

Changing the horn timings

You can change the horn alarm activation time and the number of times the horn activates for the “find” command below. The default values are 2.5 minutes for alarm activation and 3 fast pulses at 200ms for the find horn highlighted in bold below.

  - interval: 1s
    id: alarm_pulse
    then:
      - lambda: |-
          if (id(alarm_siren_switch).state) {
            if (id(gps_time).now().is_valid()) {
              int elapsed = id(gps_time).now().timestamp - id(alarm_start_time);
              if (elapsed >= 150) {
                ESP_LOGD("alarm", "Alarm siren timed out after 2.5 minutes.");
                id(alarm_siren_switch).turn_off();
                id(alarm_triggered) = false;
                return;
              }
            }
            id(horn_output).turn_on();
            delay(500);
            id(horn_output).turn_off();
          }

  - interval: 200ms
    id: find_pulse
    then:
      - lambda: |-
          static int find_count = 0;

          if (id(find_switch).state) {
            if (find_count < 3) {
              id(horn_output).turn_on();
              delay(200);
              id(horn_output).turn_off();
              find_count++;
            } else {
              id(find_switch).turn_off();
              find_count = 0;
            }
          } else {
            find_count = 0;
          }
Changing default values on boot

You can change the default values of functions such as horn_feedback and door_alerts to be enabled on boot or firmware updates. This value should be persistent across reboots and therefor will stay in the last state set (horn_feedback_on or door_alerts_on) but if you want to set it statically, change the following in your globals section:

substitutions:
  tz: “”
  phone1: “+61234567890”
  phone2: “+61234567890”
  phone3: “+61234567890”
  wifi_ap_ssid: “car-gps”
  wifi_ap_password: “”
  horn_feedback_enabled_default: “true”
  notifications_enabled_default: “true”
  door_alerts_enabled_default: “false”
  siren_runtime_default: “30”
  horn_pulse_time_ms_default: “250”
  watchdog_days_default: “1”
  watchdog_hour_default: “18”
  watchdog_minute_default: “0”
  adc_offset_default: “0.00”
  ina219_offset_default: “0.00”
  tilt_alarm_threshold_default: “3.0”
  auto_arm_enabled_default: ‘true’
  auto_arm_delay_minutes_default: ’10’
  sleep_time_default: “00:25”
  wake_time_default: “00:30”
  deep_sleep_enabled_default: ‘true’
  mqtt_server_sub: “mqtt.example.com”
  mqtt_port_sub: “1883”
  mqtt_username_sub: “”
  mqtt_password_sub: “”
  mqtt_interval_seconds_sub: “60”
Testing
  • GPS Speed Alarm
    Arm the alarm (arm), disable the fuel shutoff relay (relay_off) and drive the car over 10km/h. You should receive a notification Car speed alarm activated. Car is travelling more than 10km/h.
  • Phone Number and Schedule Persistency
    Add a new phone number (new_number_1) and add a new schedule (new_schedule_1), flash the firmware again and then query the stored values (phone_number_1 and schedule_1) they should now return the previous set values.
  • Fuel Shutoff Safety
    Turn on the ignition, attempt to arm the alarm (arm). You can also arm the alarm manually in the web UI. The alarm should not turn the fuel shutoff relay ON when the ignition state if ON. Also add a schedule and have it cycle the arm time when the ignition is ON (new_schedule_x). It is important to note that the fuel shutoff relay can be activated at any time including with the ignition ON sending relay on.
  • GY521 Level Alarm
    Set your desired tilt angle in the Web UI. Park the car on a slope and arm the alarm. Release the handbrake and roll the car down the slow to a level angle or a angle that exceeds your set tilt angle. The alarm should activate.
How can I see detailed logging?

By default, logging is disabled for most components due to the massive amounts of noise and increased CPU load. It is recommended to leave logging disabled and only enable logging for troubleshooting.

Logging options for each component can be set as per below. The available values are INFO, WARN, DEBUG, VERY_VERBOSE. Do not change the top level logger level from VERY_VERBOSE, just change the individual components below.

logger:
  level: VERY_VERBOSE
  logs:
    modem: NONE
    sms: NONE
    signal: NONE
    watchdog: NONE
    imu: NONE
    battery: NONE
    sensor: NONE
    mpu6050: NONE
    template: NONE
    i2c: NONE
    sensor.filter: NONE
    i2c.arduino: NONE
    adc.common: NONE
    api.service: NONE
    api.connection: NONE
    api: NONE
    i2c.idf: NONE
    component: DEBUG
    app: DEBUG
    template.sensor: INFO
Regulator, MPU5060 and INA219 Installation

The I2C devices are installed on the board in the following order. They can be soldered hard up to the PCB or stepped off using header pins.

GPS / GPS Time / GPS Speed not working

Ensure that GPS is powered on with AT+CGNSSPWR=1.
Query the GPS location using AT+CGPSINFO, you should receive a response like

AT+CGPSINFO +CGPSINFO: xxxx.xxxxx7,S,1xxx.xxxxxx,E,201025,194828.00,xx4,0.000,6.08 OK

If there is no valid GPS out, try using a different Antennas as the stock antenna can be known to be bad.

Sometimes, a toggle of the GPS power can also resolve GPS issues,
AT+CGNSSPWR=0
AT+CGNSSPWR=1
Then check again with AT+CGNSSINFO

As of the latest release, time is not queried using GPS anymore, the time source is the Network Operator, using the SNTP platform. Time can be queried using AT+CCLK. See the section below.

Long SMS Messages are Truncated

If longer messages are cut off, try the following. This enables features like concatenated SMS / UDHI handling allowing for multiple messages to be queued and sent by the modem.

AT+CMGF=1
AT+CSCS=”GSM”
AT+CSMS=1
AT+CSMP=17,167,0,0
AT+CMMS=2
AT&W

Time not showing a valid time

Time is synced directly over LTE from the network. Time will only sync when the device shows as Registered on the network. AT+CCLK? queries the network time and updates the system clock. This is only required on a full power loss.

AT+CTZU=1 – enables automatic time and time-zone update from the network
AT+CTZR=1 – turns on unsolicited time-zone change reporting
AT+CCLK? – Queries the network for the current time. Returns “yy/MM/dd,hh:mm:ss”

You can also manually set the time using the following command and format. Note that this will not persist across reboots.

AT+CCLK=”yy/MM/dd,hh:mm:ssΒ±zz”

This will update the global system time: with ID gps_time, which is the main time provider for all functions in the code.

Cannot send or receive SMS messages

If you can receive SMS but cannot send, check you have enough DATA to send the SMS.

This is almost always a BAUD mismatch. Try change your BAUD rate in UART: block until SMS messages start working. You should see outputs in the LOG like [modem:2094] AT Response: OK. If there are no [modem:2094] messages, communication with the A7670 is failing.

uart:
  - id: modem_uart
    baud_rate: 115200 <<------ Switch to 9600
    tx_pin: 26
    rx_pin: 27
    rx_buffer_size: 2048

You can manually set and save the BAUD rate on the A7670 with the following AT commands

AT
AT+IPR=115200 <<------ New BAUD rate
AT&W <<------ Save to NVRAM
AT+CFUN=1,1 <<------ Check the current BAUD rate

Known Issues

  • Battery functionality does not yet work.
  • Device reboots continuously when MQTT server becomes unreachable.

Changelog

Version 1.0 – September 2025

  • Initial Release

Version 1.1 – September 2025

  • Added MQTT support

Version 1.2 – October 2025

  • Added ap_on, ap_off and ap commands. See documentation
  • Added support for RAW AT commands via SMS
  • Implemented Query commands for all functions. ap, schedules, phone_numbers etc.

Version 1.3 – November 2025

  • Added arming gates to disable alarm arming when doors are OPEN or ignition is ON – Sends SMS notification.
  • Added the gps_reset command to reset GPS, sends AT+CGNSSPWR=0 and AT+CGNSSPWR=1

Version 1.4 – December 2025

  • Alarm state restores on reboot – Manual reboot or wake from deep_sleep

Version 1.5 – December 2025

  • Replaced battery_voltage command with battery_alarm

Version 1.6 – January 2026

Version 1.7 – January 2026

  • Added PIN mode – When enables, requires a PIN number for sending commands to the device. See documentation.
  • Added speed alarm
  • Added double pulse locking and unlocking – Can be useful for vehicles that ender a deep sleep mode, sometimes the initial lock or unlock signals are missed. See documentation.

Version 1.8 – February 2026

  • Added door lock confirmation – Physically monitors the lock position. See documentation.
  • Fixed the GPS speed showing in Knotts not KM/h

Version 1.9 – February 2026

  • Added Crash Detection – Sends a SMS message to all phone numbers when heavy impact is detected. See documentation
  • Added Bump Detection – Sends a SMS message to phone_number_1 when the alarm is armed and light impact is detected. See documentation.
  • Added Auto Lock – Doors lock automatically at specified speed. See documentation.

Version 2.0 – March 2026

  • Major update to MQTT publishing. See documentation
  • Added Speed Units – Set the speed unit to either Kph or Mph.
  • Added Speed Offset – Set the Speed Offset. See documentation

Version 2.1 – March 2026

  • Improvements to MQTT Publishing.
  • Control Arm, Disarm, Lock and Unlock from MQTT with car-gps/command topic and payload. See documentation
  • Changes to the time structure. Time now syncs time zone from network using MCC detection.

All Comments

Leave a Reply