Main Page

From M2CC
Jump to: navigation, search

Revision history

Date/Author Revision Changes
2012-01-26/JLA 1 First release
2012-03-03/HD 2 Unsolicited response added
2012-05-18/HD 3 New causes added
2012-05-20/HD 4 Fixed call redirect example


Frame formats

Sending frame format:

$ + FUNC + [DATA] + \r

$ → Start character.

FUNC → Function code of 3 digits (manufacturer specific).

DATA → Parameters (if required). 1

\r → End of frame character chr(13).


Solicited response:

$ + FUNC + [DATA] + \r

$ → Start character.

FUNC → Function code of 3 digits (manufacturer specific).

DATA → Parameters (if required). 1

\r → End of frame character chr(13).


Unsolicited response:

! + FUNC + [DATA] + \r

! → Start character.

FUNC → Function code of 3 digits (manufacturer specific).

DATA → Parameters (if required). 1

\r → End of frame character chr(13).


1 Mandatory escape chr(13) to chr(92)+chr(114) and chr(92) to chr(92)+chr(92).

Start transmission

  1. Call center does a missed call to track with the specific CID.
  2. The track connect to server and port to start the transmission and sends 'HELLO\r'.
  3. When the call center server's receives an incoming connection, it must send 'HELLO\r' in order to confirm the connection or 'REDIRECT:HOST:PORT\r' to send connection to another server.
  4. If the server sends 'HELLO\r', the track responds the next information (info text in red):
Protocol version
PROTOVER: HighVer,LowVer\r
Firmware version
FIRMVER: [DATA]\r
Track ID
TAG: [DATA]\r
Track IMEI
IMEI: [DATA]\r
Sim IMSI
IMSI: [DATA]\r
SIM ICC
ICC: [DATA]\r
Cause
CAUSE: 16bit_mask\r
Bit CAUSES
0 Started by HARDWARE (IO, Battery or AC).
1 Started by timer's timeout ("Heartbeat").
2 Started by telealarm voice call.
3 Started by telealarm EOA.
4 Started by Low battery.
5 Started by period event.
6 Started by the remote control center (SMS or Missed call)
7 Started by control panel (UART).

The header sequence ends when sends a void string: "\r"

Mandatory commands and parameters

To perform a M2M track, it must implement the following features:

  • Generate ring on SLIC
  • Send and receive DTMF tone to SLIC.
  • Send and receive data to UART.
  • Detect on/off hook.
  • Voice call redirect.
  • UART parameters (speed, parity, stopbit...).
  • M2M server configure (IP, port).
  • M2M missed call parameters ( CID from missed calls for wakeup the track).

Command examples

  • Commands
Function Origin Commands Parameters
DISABLE DEVICE Server 904 Id device
ENABLE DEVICE Server 905 Id device
RING OUT Server 921 1 – Start ring / 0 – Stop ring
SLIC STATUS Track 922 1 – On hook / 0 – Off hook
SEND UART Server 901 Send / Receive data
SEND DTMF Server 902 Send / Receive data
CONNECTION ACK Server 911 --
CALL REDIRECT Server 912 Phone number
DIALED NUMBER Server/Track 913 -- / Phone number
OFF HOOK VOICE CALL Server 914 --
ON HOOK VOICE CALL Server 915 --
CONTINUE VOICE CALL Server 916 --
END SESSION Server 917 --
  • Responses
Function Commands Parameters
OK 998 --
ERROR 999 --
  • Parameter "Id device"
Description Value
UART 1
DTMF 2

Connection example

Heartbeat connection

Origin Msg Hexdump Comment
Track HELLO\r 48 45 4c 4c 4f 0d
Server HELLO\r 48 45 4c 4c 4f 0d
Track PROTOVER: 2,1\r 50 52 4f 54 4f 56 45 52 3a 20 32 2c 31 0d
Track FIRMVER: 1.32.002\r 46 49 52 4d 56 45 52 3a 31 2e 33 32 2e 30 30 32 0d
Track TAG: ESSETI GSM400\r 54 41 47 3a 20 45 53 53 45 54 49 20 47 53 4d 34 30 30 0d
Track IMEI: 356614000000000\r 49 4d 45 49 3a 20 33 35 36 36 31 34 30 30 … 30 30 0d
Track IMSI: 2140152952503786\r 49 4d 53 49 3a 20 32 31 34 30 31 35 32 39 … 38 36 0d
Track ICC: 8934076100000000000\r 49 43 43 3a 20 38 39 33 34 30 37 36 31 30 … 30 30 0d
Track CAUSE: 0002\r 43 41 55 53 45 3a 20 30 30 30 32 0d
Track \r 0d
Server $994\r 24 39 39 34 0d (Non-existent command)
Track $999\r 24 39 39 39 0d (ERROR)
Server $921\r 24 39 32 31 0d Starts ring)
Track $998\r 24 39 39 38 0d (OK)
Track  !9221\r  21 39 32 32 31 0d (On-hook)
Server $9052\r 24 39 30 35 32 0d Activates DTMF device)
Track $998\r 24 39 39 38 0d (OK)
Server $90212\r 24 39 30 32 31 32 0d (Sends DTMFs 12)
Track $998\r 24 39 39 38 0d (OK)
Server $902ABC\r 24 39 30 32 41 42 43 0d (Sends DTMFs ABC)
Track $998\r 24 39 39 38 0d (OK)
Track  !9021\r 21 39 30 32 31 0d (Receives DTMF 1)
Track  !9025\r 21 39 30 32 35 0d (Receives DTMF 5)
Track  !9024\r 21 39 30 32 34 0d (Receives DTMF 4)
Track  !9029\r 21 39 30 32 39 0d (Receives DTMF 9)
Track 9220\r 21 39 32 32 30 0d (Off-hook)
Server $9042\r 24 39 30 34 32 0d (Deactivates DTMF device)
Track $998\r 24 39 39 38 0d (OK)
Server $9051\r 24 39 30 35 31 0d (Activates UART device)
Track $998\r 24 39 39 38 0d (OK)
Server $901da4n\r 24 39 30 31 64 61 34 6e 0d (Sends UART da4n)
Track $998\r 24 39 39 38 0d (OK)
Server $901cxzc\r 24 39 30 31 63 78 7a 63 0d (Sends UART cxzc)
Track $998\r 24 39 39 38 0d (OK)
Server $9010\\rc\r 24 39 30 31 30 5c 72 63 0d (Sends UART 0\rc)
Track $998\r 24 39 39 38 0d (OK)
Track  !901cdsq1\r 21 39 30 31 63 64 73 71 31 0d (Receives UART cdsq1)
Track  !901\\\\rad\r 21 39 30 31 5c 5c 72 61 64 0d (Receives UART \\rad)
Server $9051\r 24 39 30 35 31 0d (Deactivates UART device)

Call redirect connection

Origin Msg Hexdump Comment
Track HELLO\r 48 45 4c 4c 4f 0d
Server HELLO\r 48 45 4c 4c 4f 0d
Track PROTOVER: 2,1\r 50 52 4f 54 4f 56 45 52 3a 20 32 2c 31 0d
Track FIRMVER: 1.32.002\r 46 49 52 4d 56 45 52 3a 31 2e 33 32 2e 30 30 32 0d
Track TAG: ESSETI GSM400\r 54 41 47 3a 20 45 53 53 45 54 49 20 47 53 4d 34 30 30 0d
Track IMEI: 356614000000000\r 49 4d 45 49 3a 20 33 35 36 36 31 34 30 30 … 30 30 0d
Track IMSI: 2140152952503786\r 49 4d 53 49 3a 20 32 31 34 30 31 35 32 39 … 38 36 0d
Track ICC: 8934076100000000000\r 49 43 43 3a 20 38 39 33 34 30 37 36 31 30 … 30 30 0d
Track CAUSE: 0004\r 43 41 55 53 45 3a 20 30 30 30 34 0d
Track \r 0d
Server $913\r 24 39 31 33 0d (Dialed number)
Track $913911000001\r 24 39 31 33 39 31 31 30 30 30 30 30 31 0d (Dialed number 911000001)
Server $912911000002\r 24 39 31 32 39 31 31 30 30 30 30 30 32 0d (Call redirect 911000002)
Track $998\r 24 39 39 38 0d (OK)