EMI / UCP (External Machine Interface (EMI), Universal Computer Protocol (UCP)) is an extension of the UCP protocol, mainly used for connecting to SMS centers (SMSCs). The protocol was developed by CMG Wireless Data Solutions, now part of Acision.
Syntax
stx <head> / <data> / <checksum> etx
The beginning of the packet is marked with ^ B (STX, hex 02) and the end is ^ C (ETX, hex 03). Fields in the package are separated by the “/” symbol. Lists are separated by commas.
Typical EMI / UCP communication looks like this:
^ B01 / 00045 / O / 30/66677789 /// 1 ////// 68656C6C6F / CE ^ C ^ B01 / 00041 / R / 30 / A // 66677789: 180594141236 / F3 ^ C
The first four fields are a required title. The first is a two-character transaction number, the second is the number of characters in the packet (between stx and etx, a 5-character value), the first two fields are padded with zeros to the desired length, the third is the type of operation (O for the operation, R for the result), the fourth - operation code (in example 30, sending a short message).
The remaining fields depend on the type of operation. In the first line of the example, '66677789' is the recipient address ( phone number ), and '68656C6C6F' the message body is the ASCII string “hello”. In the second line, the response with the corresponding transaction number, where 'A' indicates that the message was successfully received by SMSC, the time added to the phone number indicates the delivery time.
Other SMS Protocols
- SMPP