ME interface
A standard data connector was used to connect the PIC to the ME.

The link is 9600 bps, 8 data bits, 1 stop bit, no parity. This is implemented in the PIC by simple toggling of
the data lines in a similar way to the IR emulator. An example of the byte 0x30 (00110000) which represents the
character '0' is given below.

The use of a TTL-RS232 level converter is not required as both the PIC and the ME use TTL levels. The Ericsson
T28 supports most of the AT command set as described in GSM specification 07.05 (freely available from www.etsi.org)
which allows the reception and transmission of SMS messages from external equipment (TE). This page explains the message formats very nicely.
A typical exchange between ME and TE is given below. The '<' and '>' characters show direction of data (> = from TE to ME, < = ME to TE), # denotes a comment.
# AT commands from ETSI TS 100 585 V7.0.1 (1999-07) # GSM 07.05 version 7.0.1 # This session with an Ericsson T28 World # Software version 010314 0130 prgCXC125206 #Setup: >AT # ping the ME <OK >AT+CNMI=3,1,2,0 # setup message format/incoming SMS notification <OK >AT+CPMS="ME","ME","ME" # store all messages on ME <+CPMS: 10,15,10,15,10,15 # messages/max messages in each location specified above < <OK #Incoming SMS: #Message: 'REC4': <+CMTI: "ME",11 # message stored on ME at index 11 >AT+CMGR=11 # request read from index 11 <+CMGR: 0,,23 <0791448720003023040C9144773081631500002060521115954004D2E29006 <OK #Delete message from ME: >AT+CMGD=11 # request delete from index 11 <OK |
The format of the received SMS message string is as follows:
SMSC address Originating number TP-PID/TP-DCS Date Time Message length 7-bit encoded message 'REC4'
07914 48720003023 040C91 447730816315 0000 206052 11159540 04 D2E29006
You can see that it is a simple matter to check the originating number corresponds to your phone so no one else can seize control of your VCR! In my implementation it also provides a convienient point to synchronise to when looking for the start of the message. The parser on the PIC is quite unintelligent so any deviation from the format described above will result in failure.
Code was developed in the PIC to configure the ME and listen for incoming messages. Two SMS commands were implemented, record and stop. The command formats are as follows:
RECn - start recording on channel 'n'
STOP - stop recording

In addition, the PIC echoes the message back to the sender to confirm reception using the send message (+CMGS) command.
The ME uses a Vodafone Pay As You Talk SIM which has the advantage of no line rental. Even if it runs out of calling credit it can still receive messages okay, but will no longer be able to acknowledge received commands. If you have an old mobile phone lying around then this system will just cost you the price of a PIC (about £2.50).