---
name: "getsms"
section: "1"
platform: "linux"
package: "smstools"
version: "1.14.8-1sarge0"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/getsms"
---

# getsms(1)

gets SMS using a GSM compatible modem

## NAME

getsms - gets SMS using a GSM compatible modem

## DESCRIPTION

getsms gets the first available SMS from an GSM 07.05 compatible modem. Usage:

-

  getsms \[options\]

## OPTIONS

- **-ax**

  set alarm handler to x (default none)

- **-Ax**

  set alarm level to x (default 4)

- **-bx**

  set baudrate to x (default 19200)

- **-c**

  use character set conversion

- **-dx**

  set modem device to x (default /dev/ttyS0)

- **-ex**

  wait x seconds before retry (default 10)

- **-h**

  this help

- **-H**

  disable hardware handshake RTS/CTS

- **-ix**

  modem init string x

- **-k**

  keep all SMS in the SIM memory

- **-lx**

  use logfile x (filename or handle) (default syslog)

- **-Lx**

  use loglevel x (default 9)

- **-mx**

  set PDU mode to x (default new) x can be old, new or ascii

- **-nx**

  set modem name to x

- **-ox**

  file result to write (default stdout)

- **-px**

  set pin to x (only needed if modem not initialized)

- **-q**

  quick initialization

- **-Q**

  quicker (check only the first SIM memory)

- **-sx**

  generate a Subject: line with value x

- **-tx**

  generate a To: line with value x

- **-V**

  print version info and copyright

All options may be omitted. Output is written do stdout. After getting the SMS it will be deleted from the SIM card.

### Example:

-

  getsms **-d**/dev/ttyS0 **-p1234** **-s**"This is a test"

### Return codes:

- 0

  received one SMS

- 1

  cannot open device

- 2

  cannot verify PIN or modem not ready.

- 3

  modem not registered to the network

- 4

  no SMS available

- 5

  received SMS Status Report

### Usage:

-

  getsms \[options\]

- **-ax**

  set alarm handler to x (default none)

- **-Ax**

  set alarm level to x (default 4)

- **-bx**

  set baudrate to x (default 19200)

- **-c**

  use character set conversion

- **-dx**

  set modem device to x (default /dev/ttyS0)

- **-ex**

  wait x seconds before retry (default 10)

- **-h**

  this help

- **-H**

  disable hardware handshake RTS/CTS

- **-ix**

  modem init string x

- **-k**

  keep all SMS in the SIM memory

- **-lx**

  use logfile x (filename or handle) (default syslog)

- **-Lx**

  use loglevel x (default 9)

- **-mx**

  set PDU mode to x (default new) x can be old, new or ascii

- **-nx**

  set modem name to x

- **-ox**

  file result to write (default stdout)

- **-px**

  set pin to x (only needed if modem not initialized)

- **-q**

  quick initialization

- **-Q**

  quicker (check only the first SIM memory)

- **-sx**

  generate a Subject: line with value x

- **-tx**

  generate a To: line with value x

- **-V**

  print version info and copyright

All options may be omitted. Output is written do stdout. After getting the SMS it will be deleted from the SIM card.

### Example:

-

  getsms **-d**/dev/ttyS0 **-p1234** **-s**"This is a test"

### Return codes:

- 0

  received one SMS

- 1

  cannot open device

- 2

  cannot verify PIN or modem not ready.

- 3

  modem not registered to the network

- 4

  no SMS available

- 5

  received SMS Status Report
