Jumping Jack Flash weblog

Appunti su invio SMS con l’a1000 tramite comandi AT

Posted in Motorola a1000, Symbian, Symbian UIQ by jumpjack on 23 febbraio 2007

Da http://www.multitech.com/DOCUMENTS/Collateral/manuals/S000371B.pdf (ottima guida generale):
Abbreviazioni:
ME = Mobile Equipment
MS = Mobile Station
TA = Terminal Adapter (equivalent to Mobile Equipment (ME) which stands for the GSM module described here. It uses GSM default alphabet as its character set.)
DCE = Data Communication Equipment
TE = Terminal Equipment (TE is the device connected to the TA via serial interface. In most cases TE is an ANSI/ASCII terminal thatdoes not fully support the GSM default alphabet, for example MS Hyperterminal)
DTE = Data Terminal Equipment

Terminal Equipment - Terminal Adaptor - Mobile Equipment

CAUTION: ASCII alphabet (TE) is not GSM alphabet (TA/ME)

Several problems resulting from the use of GSM alphabet with ASCII terminal equipment:
• “@” character with GSM alphabet value 0 is not printable by an ASCII terminal program (e.g., Microsoft©
Hyperterminal®).
• “@” character with GSM alphabet value 0 will terminate any C string! This is because the 0 is defined as C
string end tag. Therefore, the GSM Null character may cause problems on application level when using a
‘C’- function as “strlen()”. This can be avoided if it is represented by an escape sequence as shown in the
table below.
By the way, this may be the reason why even network providers often replace “@”with “@=*” in their SIM
application.
• Other characters of the GSM alphabet are misinterpreted by an ASCII terminal program. For example, GSM
“ö” (as in “Börse”) is assumed to be “|” in ASCII, thus resulting in “B|rse”. This is because both alphabets
mean different characters with values hex. 7C or 00 and so on.
• In addition, decimal 17 and 19 which are used as XON/XOFF control characters when software flow control
is activated, are interpreted as normal characters in the GSM alphabet.
—>non usare XON/XOFF per comunicare col cellulare!!!

Table 1.5: Examples for character definitions depending on alphabet
GSM 03.38 character, GSM character hex. value, Corresponding ASCII character, ASCII Esc sequence, Hex Esc sequence
Ö, 5C, \ \5C, 5C ,35 ,43
“ ,22, “ ,\22 ,5C, 32 ,32
ò, 08, BSP, 8, 5C, 30, 38
@, 00, NULL, 0, 5C, 30, 30
CAUTION: Often, the editors of terminal programs do not recognize escape sequences. In this case, an escape
sequence will be handled as normal characters. The most common workaround to this problem is to write a
script which includes a decimal code instead of an escape sequence. This way you can write, for example, short
messages which may contain differently coded characters.

———- INIZIO PROVE ————

Sembra che i Motorola adottino un sistema proprietario (“manufacturer specific”) per inviare messaggi tramite comandi AT (AT+CSMS –> 128,1,1,1) .
Sembra anche che si debba per forza PRIMA scriverli in memoria (AT+CMGW) e che si debba usare numeri con notazione internazionale (+39…)

Ho fatto questi test usando Hyperterminal dopo aver sbloccato la porta da Mrouter, e configurando hyperterminal cosi’:
porta:
com23 (ma varia a seconda di quando/come si connette il cell…)
921600 bps
8,n,1
senza controllo di flusso

Emulazione terminale: TTY (senza nessuna configurazione particolare)

Risultati:
–>AT+CSMS
+CSMS: 128,1,1,1 (MODO PROPRIETARIO, Mobile Terminated, Mobile Originated, Broadcast type)

Comando AT+CPMS (memoria preferita):
–>AT+CPMS=mem1[,mem2[,mem3]]
mem1 = memoria da cui i messaggi sono LETTI e CANCELLATI
mem2 = memoria in cui SCRIVERE e da cui INVIARE
mem3 = memoria in cui RICEVERE i messaggi

Risultato:
–>AT+CPMS=?
+CPMS: (“MT”,”IM”,”OM”,”BM”,”DM”),(“OM”,”DM”),(“IM”)
MT = totale
IM = INBOX
OM = OUTBOX
BM = BROADCAST
DM = DRAFT
OK

–>AT+CMGW=”+393331234567″
> prova
> pippo
> [CTRL+Z]
+CMGW: 6

at+cpms=”OM”
+CPMS: 2,88
at+cmgl=”STO UNSENT”
OK

at+cpms=”OM”,”DM”
+CPMS: 2,88,3,88
at+cmgd=6
+CMS ERROR: invalid preferred memory storage
at+cpms=”DM”
+CPMS: 3,88

OK
at+cmgd=6
OK
(cioe’ posso cancellare da DM ma non da OM?)

at+cpms=”DM”,”OM”
+CPMS: 2,88,2,88

OK
at+cmgl=?
+CMGL: (“REC UNREAD”, “REC READ”, “STO UNSENT”, “STO SENT”, “ALL”)

OK
at+cmgl=”STO UNSENT”
+CMS ERROR: operation not allowed
at+cpms=”OM”
+CPMS: 2,88

OK
at+cmgl=”STO UNSENT”
OK
(cioe’ non posso elencare (CMGL) da DM, ma solo da OM?)

at+cpms=”DM”,”OM”
+CPMS: 2,88,2,88

OK
at+cmgd=1
+CMS ERROR: invalid preferred memory storage
at+cmgd=2
OK
at+cmgd=5
OK
at+cpms?
+CPMS: “DM”,0,88,”OM”,2,88,”IM”,0,88

OK
(??? BOH?? ha cancellato da DM)

Possono presemtarsi errori diversi nel tentare di cancellare… ma chissa’ da cosa dipendono?!?
at+cpms=”OM”,”DM”
+CPMS: 2,88,0,88

OK
at+cmgd=1
+CMS ERROR: memory failure
at+cmgd=2
+CMS ERROR: invalid memory index
at+cmgd=3
OK
at+cpms?
+CPMS: “OM”,1,88,”DM”,0,88,”IM”,0,88

Perche’ non viene spedito??
at+cmgw=”+393331234567″
> OM,DM,IM
>
+CMGW: 2

OK
at+cmss=2
+CMS ERROR: ME failure (=errore Mobile Equipment, ovvero del cellulare)

NOTA: su una SIM Vodafone (invece che USIM 3), con cellulare sbloccato, i comandi +CMGL e +CMGR sembrano (quasi) funzionare bene!

Una Risposta

Subscribe to comments with RSS.

  1. […] Appunti su invio SMS con l’a1000 tramite comandi AT […]


Puoi inserire un commento qui sotto; diventerà visibile dopo la moderazione dell'amministratore

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger cliccano Mi Piace per questo: