gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with AT driver.


From: Jan Derfinak
Subject: Re: Problem with AT driver.
Date: Fri, 7 Feb 2003 10:57:40 +0100 (CET)

On Wed, 29 Jan 2003, Ladislav Michl wrote:

> > Correct, thanks for spotting. We have even the correct comment in the
> > code:
> > /* Length in AT mode is the length of the full message minus SMSC field
> > length */
> > The quick fix (pseudopatch) is:
> > +   sprintf(req, "AT+%s=%d\r", cmd, length -
> > data->RawSMS->MessageCenter[0] - 2);
> > -   sprintf(req, "AT+%s=%d\r", cmd, length - 1);
>
> that's it. i reimplemented this function a little bit to avoid buffer
> overflows. i'll commit it after some more tests.

Hi.

I tested last CVS yesterday but sending SMS with AT driver is still broken.
I've tried vanilla CVS and patch above, but they don't work.
First dump is unpatched CVS, second is with patch. The message text was
"test".
Any ideas what is wrong?

GNOKII Version 0.5.0pre6
Opened configuration file /home/ja/.gnokiirc
Added new section global
Adding key/value port//dev/ttyS1
Adding key/value model/AT
Adding key/value initlength/default
Adding key/value connection/serial
Adding key/value bindir//usr/local/sbin/
Adding key/value use_locking/no
Adding key/value serial_baudrate/38400
Adding key/value serial_write_usleep/10000
Adding key/value smsc_timeout/10
phone instance config:
model: AT
port_device: /dev/ttyS1
connection_type: 0
init_length: 0
serial_baudrate: 38400
serial_write_usleep: 10000
hardware_handshake: 0
require_dcd: 0
smsc_timeout: 100
connect_script:
disconnect_script:
Initializing AT capable mobile phone ...
Serial device: opening device /dev/ttyS1
Serial device: setting RTS to high and DTR to high
Message sent: 0x00 / 0x0004
41 54 5a 0d                                     | ATZ
Message received: 0x00 / 0x000a
02 41 54 5a 0d 0d 0a 4f 4b 0d                   |  ATZ   OK
Received message type 00
Message sent: 0x00 / 0x0005
41 54 45 31 0d                                  | ATE1
Message received: 0x00 / 0x000b
02 41 54 45 31 0d 0d 0a 4f 4b 0d                |  ATE1   OK
Received message type 00
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 4d 0d                         | AT+CGMM
Message received: 0x06 / 0x0016
02 41 54 2b 43 47 4d 4d 0d 0d 0a 4d 43 33 35 0d |  AT+CGMM   MC35
0a 0d 0a 4f 4b 0d                               |    OK
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 49 0d                         | AT+CGMI
Message received: 0x06 / 0x0019
02 41 54 2b 43 47 4d 49 0d 0d 0a 53 49 45 4d 45 |  AT+CGMI   SIEME
4e 53 0d 0a 0d 0a 4f 4b 0d                      | NS    OK
Received message type 06
Message sent: 0x52 / 0x0009
41 54 2b 43 53 43 53 3f 0d                      | AT+CSCS?
Message received: 0x52 / 0x001f
02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 |  AT+CSCS?   +CSC
53 3a 20 22 47 53 4d 22 0d 0a 0d 0a 4f 4b 0d    | S: "GSM"    OK
Received message type 52
Initialisation completed
Message sent: 0x22 / 0x0009
41 54 2b 43 53 43 41 3f 0d                      | AT+CSCA?
Message received: 0x22 / 0x002d
02 41 54 2b 43 53 43 41 3f 0d 0d 0a 2b 43 53 43 |  AT+CSCA?   +CSC
41 3a 20 22 2b 34 32 30 36 30 32 39 30 39 39 30 | A: "+42060290990
39 22 2c 31 34 35 0d 0a 0d 0a 4f 4b 0d          | 9",145    OK
Received message type 22
Please enter SMS text. End your input with <cr><control-D>:Message sent: 0x54 / 
0x000a
41 54 2b 43 4d 47 46 3d 30 0d                   | AT+CMGF=0
Message received: 0x54 / 0x0010
02 41 54 2b 43 4d 47 46 3d 30 0d 0d 0a 4f 4b 0d
Received message type 54
PDU mode set
Sending initial sequence
Message sent: 0x55 / 0x000b
41 54 2b 43 4d 47 53 3d 32 35 0d                | AT+CMGS=25
Message received: 0x55 / 0x000f
01 41 54 2b 43 4d 47 53 3d 32 35 0d 0d 0a 3e    |  AT+CMGS=25   >
Received message type 55
Got response 0
Sending frame: 079124602009999011000C912470821987610000AA04F4F29C0E
Message sent: 0x20 / 0x0035
30 37 39 31 32 34 36 30 32 30 30 39 39 39 39 30 | 0791246020099990
31 31 30 30 30 43 39 31 32 34 37 30 38 32 31 39 | 11000C9124708219
38 37 36 31 30 30 30 30 41 41 30 34 46 34 46 32 | 87610000AA04F4F2
39 43 30 45 1a                                  | 9C0E
Message received: 0x20 / 0x003e
03 30 37 39 31 32 34 36 30 32 30 30 39 39 39 39 |  079124602009999
30 31 31 30 30 30 43 39 31 32 34 37 30 38 32 31 | 011000C912470821
39 38 37 36 31 30 30 30 30 41 41 30 34 46 34 46 | 987610000AA04F4F
32 39 43 30 45 1a 0d 0a 45 52 52 4f 52 0d       | 29C0E   ERROR
Received message type 20
SMS Send failed (Command failed.)
Serial device: closing device


GNOKII Version 0.5.0pre6
Opened configuration file /home/ja/.gnokiirc
Added new section global
Adding key/value port//dev/ttyS1
Adding key/value model/AT
Adding key/value initlength/default
Adding key/value connection/serial
Adding key/value bindir//usr/local/sbin/
Adding key/value use_locking/no
Adding key/value serial_baudrate/38400
Adding key/value serial_write_usleep/10000
Adding key/value smsc_timeout/10
phone instance config:
model: AT
port_device: /dev/ttyS1
connection_type: 0
init_length: 0
serial_baudrate: 38400
serial_write_usleep: 10000
hardware_handshake: 0
require_dcd: 0
smsc_timeout: 100
connect_script:
disconnect_script:
Initializing AT capable mobile phone ...
Serial device: opening device /dev/ttyS1
Serial device: setting RTS to high and DTR to high
Message sent: 0x00 / 0x0004
41 54 5a 0d                                     | ATZ
Message received: 0x00 / 0x000a
02 41 54 5a 0d 0d 0a 4f 4b 0d                   |  ATZ   OK
Received message type 00
Message sent: 0x00 / 0x0005
41 54 45 31 0d                                  | ATE1
Message received: 0x00 / 0x000b
02 41 54 45 31 0d 0d 0a 4f 4b 0d                |  ATE1   OK
Received message type 00
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 4d 0d                         | AT+CGMM
Message received: 0x06 / 0x0016
02 41 54 2b 43 47 4d 4d 0d 0d 0a 4d 43 33 35 0d |  AT+CGMM   MC35
0a 0d 0a 4f 4b 0d                               |    OK
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 49 0d                         | AT+CGMI
Message received: 0x06 / 0x0019
02 41 54 2b 43 47 4d 49 0d 0d 0a 53 49 45 4d 45 |  AT+CGMI   SIEME
4e 53 0d 0a 0d 0a 4f 4b 0d                      | NS    OK
Received message type 06
Message sent: 0x52 / 0x0009
41 54 2b 43 53 43 53 3f 0d                      | AT+CSCS?
Message received: 0x52 / 0x001f
02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 |  AT+CSCS?   +CSC
53 3a 20 22 47 53 4d 22 0d 0a 0d 0a 4f 4b 0d    | S: "GSM"    OK
Received message type 52
Initialisation completed
Message sent: 0x22 / 0x0009
41 54 2b 43 53 43 41 3f 0d                      | AT+CSCA?
Message received: 0x22 / 0x002d
02 41 54 2b 43 53 43 41 3f 0d 0d 0a 2b 43 53 43 |  AT+CSCA?   +CSC
41 3a 20 22 2b 34 32 30 36 30 32 39 30 39 39 30 | A: "+42060290990
39 22 2c 31 34 35 0d 0a 0d 0a 4f 4b 0d          | 9",145    OK
Received message type 22
Please enter SMS text. End your input with <cr><control-D>:Message sent: 0x54 / 
0x000a
41 54 2b 43 4d 47 46 3d 30 0d                   | AT+CMGF=0
Message received: 0x54 / 0x0010
02 41 54 2b 43 4d 47 46 3d 30 0d 0d 0a 4f 4b 0d
Received message type 54
PDU mode set
Sending initial sequence
Message sent: 0x55 / 0x000b
41 54 2b 43 4d 47 53 3d 31 37 0d                | AT+CMGS=17
Message received: 0x55 / 0x000f
01 41 54 2b 43 4d 47 53 3d 31 37 0d 0d 0a 3e    |  AT+CMGS=17   >
Received message type 55
Got response 0
Sending frame: 079124602009999011000C912470821987610000AA04F4F29C0E
Message sent: 0x20 / 0x0035
30 37 39 31 32 34 36 30 32 30 30 39 39 39 39 30 | 0791246020099990
31 31 30 30 30 43 39 31 32 34 37 30 38 32 31 39 | 11000C9124708219
38 37 36 31 30 30 30 30 41 41 30 34 46 34 46 32 | 87610000AA04F4F2
39 43 30 45 1a                                  | 9C0E
Message received: 0x20 / 0x003e
03 30 37 39 31 32 34 36 30 32 30 30 39 39 39 39 |  079124602009999
30 31 31 30 30 30 43 39 31 32 34 37 30 38 32 31 | 011000C912470821
39 38 37 36 31 30 30 30 30 41 41 30 34 46 34 46 | 987610000AA04F4F
32 39 43 30 45 1a 0d 0a 45 52 52 4f 52 0d       | 29C0E   ERROR
Received message type 20
SMS Send failed (Command failed.)
Serial device: closing device



                                        jano





reply via email to

[Prev in Thread] Current Thread [Next in Thread]