Volt Docs

Reference

SIM7000Lite

SIMCom SIM7000 modem, lean API: SMS send/receive, HTTP POST over GPRS, USSD, and self-recovery via maintain().

Connects over
UART (serial)
Made by
SIMCom
Datasheet
simcom.com

Use it

main.volt
hardware {
    device sim7000lite: SIM7000Lite
}

every 1s {
    let value: bool = sim7000lite.maintain()
    log("sim7000lite", "maintain={value}")
}

The SIM7000Lite talks over a UART. On its own the declaration gets a free serial port; to choose the pins, declare uart modem(tx: 17, rx: 16, baud: 9600) and write device sim7000lite: SIM7000Lite on modem.

Methods

  • sim7000lite.http_post(url: string, body: string) -> int

    POST a form body over GPRS; up to 3 attempts on failure or 5xx; returns the HTTP status or -1

  • sim7000lite.maintain() -> bool

    Call periodically: recovers a silent or off-network modem; returns true when registered

  • sim7000lite.next_sms() -> bool

    Read the oldest received SMS (then deleted from the SIM); false if none

  • sim7000lite.ready() -> bool

    true if the modem answers AT

  • sim7000lite.registered() -> bool

    true when registered on the home or a roaming network

  • sim7000lite.send_sms(number: string, text: string) -> bool

    Send an SMS (max 160 chars); retries twice only if refused before sending

  • sim7000lite.set_apn(apn: string)

    Operator APN used for GPRS (http_post)

  • sim7000lite.set_pwrkey(pin: int, active_high: bool)

    GPIO driving PWRKEY and its polarity; enables power-cycling in maintain()

  • sim7000lite.signal() -> int

    Signal quality 0-31 (99 = unknown); 10+ is usable

  • sim7000lite.sms_from() -> string

    Sender of the SMS read by next_sms()

  • sim7000lite.sms_text() -> string

    Text of the SMS read by next_sms()

  • sim7000lite.ussd(code: string) -> string

    Send a USSD code (e.g. *125#) and return the reply text, "" on failure

Wiring

PinConnect to
VBATLi-ion cell or 4V supply that can deliver 2 A peaks
GNDCommon with the ESP32
TXModem TX -> ESP32 RX
RXModem RX <- ESP32 TX
PWRKEYOptional: lets maintain() power-cycle a hung modem (set_pwrkey)

Specifications

Bands
LTE-M / NB-IoT / GSM (driver uses GSM)
Uart
115200 baud default, 3.3V logic on most boards
Voltage
3.0V - 4.3V (Li-ion); peaks up to 2 A during GSM transmit

Tips

  • Call maintain() every 30-60 s: it soft-resets a modem that stops answering or stays off the network for 3 minutes, and power-cycles it through PWRKEY if set_pwrkey() was called.
  • send_sms() retries only when the modem refused before sending, so a message is never sent twice.
  • Incoming SMS: loop on next_sms() and act on sms_from()/sms_text() in your program; each message is deleted from the SIM once read.
  • Call set_apn() with your operator's APN before http_post().
  • Brown-outs during transmit are the usual cause of random resets: use a proper battery or a 2 A supply with a large capacitor.

Alternatives worth knowing:

  • SIM7000: Full driver: delivery receipts, whitelist/SMS command helpers, network time, operator name.
  • SIM800L: 2G only, SMS basics.