Portál AbcLinuxu, 10. května 2025 09:42

Dotaz: Help with AT commands

20.5.2013 11:18 ClyssaN
Help with AT commands
Přečteno: 860×
Odpovědět | Admin
Hello everyone,

I'm "desperate" and i hope you guys can help me.

I'm trying to send SMS using telnet connection and AT comands using the hardware "2N - VoiceBlue Lite", i think i've to use following commands:

AT!G=A6 Activation of SMS control(can be activated only in one session at same time) AT^SM=ch,len,pdu,csum Request to send a message via GSM module 0..31 or via any GSM module (ch=32). Possible answers: *smserr (busy,write) or *smsout

But i simple cannot find an example to understand the correct sintax/sequence of comands.

If i want to send the message "Hello World" to the cellphone number 9112312312, what would be the correct sequence/sintax of commands?

Any help or link to more information/examples would be very appreciated.

Thanks in advance.

ps: I apologize if this is not the correct forum but i'm really desperate.
Nástroje: Začni sledovat (1) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

20.5.2013 23:01 rastos | skóre: 63 | blog: rastos
Rozbalit Rozbalit vše Re: Help with AT commands
Odpovědět | | Sbalit | Link | Blokovat | Admin
You have reached Czech web server dedicated to Linux and Open Source. While other languages are probably not strictly forbidden here, they aren't frequent either ;-)

Nevertheless brief surfing shows that you may want to look at Online PDU encoder/decoder and also this page for some code/examples how the message has to be encoded.
21.5.2013 09:47 ClyssaN
Rozbalit Rozbalit vše Re: Help with AT commands
Thank you very much
20.5.2013 23:38 NN
Rozbalit Rozbalit vše Re: Help with AT commands
Odpovědět | | Sbalit | Link | Blokovat | Admin
ch.... module number(1..31, 32=any)
len... number of PDU bytes
PDU... message in PDU format
csum.. checksum of all PDU bytes (2 hexa digits) without carry
The sequence is:
AT!G=A6 (sms mode)
AT^SR|SD|SM|SG (sms read,delete,to module,to group)
AT!G=55 (smsm mode stop)
manual (work with sms..)

The PDU format is a little bit complicated..
21.5.2013 09:57 ClyssaN
Rozbalit Rozbalit vše Re: Help with AT commands

hello, thank you for your time.

I've login by telnet to the 2N - VoiceBlue Lite. Executed the:

AT!G=A6 and received the OK msg.

But now i'm having trouble with the correct params for the AT^SR command, expecially the CSUM.

I've enconded a msg using de PDU Enconder. The param ch (module) active is number 0.

 

AT^SM=0,68,26069110090000F111000D92301569324394F50000AA0CC8F71D14969741F977FD07,??

 

ch = 0 (seen by using the commnd AT&QALL)

len = 68 Bytes, i'm using the function strlen() from PHP

 

But how do i calculate the correct csum?!

 

Thank you for you time.

24.5.2013 22:56 ClyssaN
Rozbalit Rozbalit vše Re: Help with AT commands
anybody?!
25.5.2013 11:26 NN
Rozbalit Rozbalit vše Re: Help with AT commands
The easier way, contact the '2n' company. The AT command format is proprietary and without any detailed documentatation..
21.8.2013 15:04 Martin Zaloudek
Rozbalit Rozbalit vše Re: Help with AT commands
Chsum is 2-bytes summary of bytes (summary modulo 65536), writed in HEX format.

Here is a JAVA example:

String pduString = "26069110090000F111000D92301569324394F50000AA0CC8F71D14969741F977FD07";

byte[] pduBytes = DatatypeConverter.parseHexBinary(pduString);

int chsum = 0;

for (byte b : pduBytes) {

chsum += b;

}

chsum = chsum % 65536;

String finalyChsum = Integer.toHexString(chsum);

21.8.2013 16:07 Martin
Rozbalit Rozbalit vše Re: Help with AT commands
Sorry, right is make modulo 256 only.

String pduString = "26069110090000F111000D92301569324394F50000AA0CC8F71D14969741F977FD07";

byte[] pduBytes = DatatypeConverter.parseHexBinary(pduString);

int chsum = 0;

for (byte b : pduBytes) {

chsum += (int)b;

if (b < 0) chsum += 256; //java byte is signed :-(

chsum = chsum % 256;

}

String finalyChsum = Integer.toHexString(chsum);

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.