EMI (protocol)
|
External Machine Interface (EMI), also known as the Universal Computer Protocol (UCP), is a protocol primarily used to connect to short message service centres for mobile telephones. The protocol was developed by LogicaCMG, the current SMSC market leader.
Syntax
A typical EMI/UCP exchange looks like this:
^B01/00045/O/30/66677789///1//////68656C6C6F/CE^C ^B01/00041/R/30/A//66677789:180594141236/F3^C
The start of the packet is signaled by ^B (STX, hex 02) and the end with ^C (ETX, hex 03). Fields within the packet are separated by / characters.
The first four fields form the mandatory header. The first field is the transaction reference number (01), the second is the length of the packet, the third is the operation type (O for operation, R for result), and the fourth is the operation (here 30, "short message transfer").
The subsequent fields are dependent on the operation. In the first line above, '66677789' is the recipient's address (telephone number) and '68656C6C6F' is the content of the message, in this case the ASCII string "hello". The second line is the response with a matching transaction reference number, where 'A' indicates that the message was successfully acknowledged by the SMSC, and a timestamp is suffixed to the phone number to show time of delivery.
The final field is the checksum, calculated simply by summing all bytes in the packet (including slashes) and taking the 8 least significant bits from the result.
The full specification is available on the LogicaCMG website developers' forum, but registration is required.
External link
- LogicaCMG: Downloads for developers (http://www.logicacmg.com/telecoms/developer_downloads.asp)