gnokii-users
[Top][All Lists]
Advanced

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

RE: smsd fix


From: Edward Finlayson
Subject: RE: smsd fix
Date: Sat, 3 Aug 2002 15:21:55 +0100

Hi All!
        Just tested smsd with Markus' patch, and the results were .....

Close, very close. Haven't vet got the prise for quickest patch writer though 
Markus ;-)

gnokii was compiled with --enable-debug and without-xgnokii
smsd was then made as was libmysql.so ( incidentally, this didn't update so the 
code here must have been ok )

smsd was started using :-

smsd -u sms -p _p45sW0rD_ -d sms -c localhost -m mysql -l /usr/local/share/smsd

and MySQL table definition as per the attached file:

smsd started well with the following output:

CFG_ReadFile - open /root/.gnokiirc: No such file or directory
Opened configuration file /etc/gnokiirc
Added new section global
Adding key/value port//dev/ttyS0
Adding key/value model/6210
Adding key/value initlength/default
Adding key/value connection/dlr3p
Adding key/value bindir//usr/local/sbin/
Adding key/value use_locking/yes
Adding key/value serial_baudrate/19200
Adding key/value handshake/software
Connecting
Serial device: opening device /dev/ttyS0
Serial device: setting speed to 115200
Serial device: setting RTS to low and DTR to low
Getting model...
Message sent: 0x1b / 0x0006
00 01 00 03 01 32                               |      2
[Received Ack of type 1b, seq: 80]
[Sending Ack of type 1b, seq: 4]
Message received: 0x1b / 0x0037
01 1c 00 04 00 56 20 30 35 2e 32 37 0a 30 31 2d |      V 05.27 01-
30 38 2d 30 31 0a 4e 50 45 2d 33 0a 28 63 29 20 | 08-01 NPE-3 (c)
4e 4d 50 2e 00 54 00 00 00 00 00 00 00 01 00 10 | NMP. T
84 18 00 10 2d 94 00                            |     -
Received message type 1b
Received model NPE-3
Getting model...
Message sent: 0x1b / 0x0006
00 01 00 03 01 32                               |      2
[Received Ack of type 1b, seq:  1]
[Sending Ack of type 1b, seq: 5]
Message received: 0x1b / 0x0037
01 1c 00 04 00 56 20 30 35 2e 32 37 0a 30 31 2d |      V 05.27 01-
30 38 2d 30 31 0a 4e 50 45 2d 33 0a 28 63 29 20 | 08-01 NPE-3 (c)
4e 4d 50 2e 00 4d 50 2e 00 54 00 00 00 00 00 00 | NMP. MP. T
00 01 00 10 84 18 00                            |
Received message type 1b
Received model NPE-3
Received revision 05.27
comparing "NPE-3" and ""
comparing "NPE-3" and "?????"
comparing "NPE-3" and "?????"
comparing "NPE-3" and "NHE-5"
comparing "NPE-3" and "NHE-4"
comparing "NPE-3" and "NHK-4"
comparing "NPE-3" and "0310"
comparing "NPE-3" and "NSE-8"
comparing "NPE-3" and "NSE-9"
comparing "NPE-3" and "NHM-5"
comparing "NPE-3" and "NHM-6"
comparing "NPE-3" and "NPW-6"
comparing "NPE-3" and "0305"
comparing "NPE-3" and "NSE-1"
comparing "NPE-3" and "NSC-1"
comparing "NPE-3" and "NSK-1"
comparing "NPE-3" and "NSW-1"
comparing "NPE-3" and "NSB-1"
comparing "NPE-3" and "NSE-3"
comparing "NPE-3" and "NSC-3"
comparing "NPE-3" and "NSK-3"
comparing "NPE-3" and "NSM-1"
comparing "NPE-3" and "NSW-3"
comparing "NPE-3" and "NSD-3"
comparing "NPE-3" and "NSB-3"
Found model "NPE-3"
comparing "NPE-3" and ""
comparing "NPE-3" and "?????"
comparing "NPE-3" and "?????"
comparing "NPE-3" and "NHE-5"
comparing "NPE-3" and "NHE-4"
comparing "NPE-3" and "NHK-4"
comparing "NPE-3" and "0310"
comparing "NPE-3" and "NSE-8"
comparing "NPE-3" and "NSE-9"
comparing "NPE-3" and "NHM-5"
comparing "NPE-3" and "NHM-6"
comparing "NPE-3" and "NPW-6"
comparing "NPE-3" and "0305"
comparing "NPE-3" and "NSE-1"
comparing "NPE-3" and "NSC-1"
comparing "NPE-3" and "NSK-1"
comparing "NPE-3" and "NSW-1"
comparing "NPE-3" and "NSB-1"
comparing "NPE-3" and "NSE-3"
comparing "NPE-3" and "NSC-3"
comparing "NPE-3" and "NSK-3"
comparing "NPE-3" and "NSM-1"
comparing "NPE-3" and "NSW-3"
comparing "NPE-3" and "NSD-3"
comparing "NPE-3" and "NSB-3"
Found model "NPE-3"
Getting SMS Folder Status...
Message sent: 0x14 / 0x0007                                                     
<
00 01 00 6b 08 0f 01                            |    k           |
[Received Ack of type 14, seq:  2]                                              
 |
[Sending Ack of type 14, seq: 6]                                                
 |
Message received: 0x14 / 0x0006                                          |
01 25 00 6c 00 00                               |  % l            > This 
section repeats every few seconds.
Received message type 14                                                        
 |
Message: SMS Folder status received                                             
 |
Message: Number of Entries: 0                                                   
 |
Message: IDs of Entries :                                                       
 |
Getting SMS Folder Status...                                                    
<
Message sent: 0x14 / 0x0007
...

The daemon then seems to repeat the  above loop as it check for incoming mail, 
even when one does
come in. sorry Markus it doesn't see the new mail on the 6210.

However as soon as you  read the mail on the 6210 the following output appears 
from smsd:

[Sending Ack of type 14, seq: 7]
Message received: 0x14 / 0x0008
01 25 00 6c 00 01 00 02                         |  % l
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 1
Message: IDs of Entries : 2,
Getting SMS (validating)...
Getting SMS Folders...
Message sent: 0x14 / 0x0006
00 01 00 7a 00 00                               |    z
[Received Ack of type 14, seq:  4]
[Sending Ack of type 14, seq: 0]
Message received: 0x14 / 0x0047
01 25 00 7b 04 08 00 49 00 6e 00 62 00 6f 00 78 |  % {   I n b o x
00 00 10 00 4f 00 75 00 74 00 62 00 6f 00 78 00 |     O u t b o x
00 18 00 41 00 72 00 63 00 68 00 69 00 76 00 65 |    A r c h i v e
00 00 20 00 54 00 65 00 6d 00 70 00 6c 00 61 00 |     T e m p l a
74 00 65 00 73 00 00                            | t e s
Received message type 14
Message: 4 SMS Folders received:
Folder Index: 8 Folder name: Inbox
Folder Index: 16        Folder name: Outbox
Folder Index: 24        Folder name: Archive
Folder Index: 32        Folder name: Templates
Getting SMS Folder Status...
Message sent: 0x14 / 0x0007
00 01 00 6b 08 0f 01                            |    k
[Received Ack of type 14, seq:  5]
[Sending Ack of type 14, seq: 1]
Message received: 0x14 / 0x0008
01 25 00 6c 00 01 00 02                         |  % l
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 1
Message: IDs of Entries : 2,
Message sent: 0x14 / 0x000a
00 01 00 07 08 00 02 01 65 01                   |         e
[Received Ack of type 14, seq:  6]
[Sending Ack of type 14, seq: 2]
Message received: 0x14 / 0x004a
01 25 00 08 01 08 00 02 00 07 91 44 87 20 90 02 |  %         D
53 87 20 90 02 84 00 00 1e 0c 91 44 77 91 97 32 | S          Dw  2
61 20 80 30 41 20 80 30 41 83 31 40 f4 32 9b 0d | a  0A  0A 1@ 2
a2 cb d3 73 74 18 44 47 87 e9 a0 fc bb 0e 62 bf |    st DG      b
ed 65 10 ba 2c 77 01 ff ff ff                   |  e  ,w
Received message type 14
Trying to get message # 2 from the folder # 8
UDHIndicator: 84
Mobile Terminated message:
        Date: 2002-08-03 14:38:13+0100
        Remote number (recipient or sender): +447719792316
        SMS center number: +447802092035
Default Alphabet
tell trisha that you love her.
Getting SMS Folder Status...
Message sent: 0x14 / 0x0007
00 01 00 6b 08 0f 01                            |    k
[Received Ack of type 14, seq:  7]
[Sending Ack of type 14, seq: 3]
Message received: 0x14 / 0x0008
01 25 00 6c 00 01 00 02                         |  % l
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 1
Message: IDs of Entries : 2,
Delete SMS message!
Removing SMS 1
Getting SMS Folders...
Message sent: 0x14 / 0x0006
00 01 00 7a 00 00                               |    z
[Received Ack of type 14, seq:  0]
[Sending Ack of type 14, seq: 4]
Message received: 0x14 / 0x0047
01 25 00 7b 04 08 00 49 00 6e 00 62 00 6f 00 78 |  % {   I n b o x
00 00 10 00 4f 00 75 00 74 00 62 00 6f 00 78 00 |     O u t b o x
00 18 00 41 00 72 00 63 00 68 00 69 00 76 00 65 |    A r c h i v e
00 00 20 00 54 00 65 00 6d 00 70 00 6c 00 61 00 |     T e m p l a
74 00 65 00 73 00 00                            | t e s
Received message type 14
Message: 4 SMS Folders received:
Folder Index: 8 Folder name: Inbox
Folder Index: 16        Folder name: Outbox
Folder Index: 24        Folder name: Archive
Folder Index: 32        Folder name: Templates
Getting SMS Folder Status...
Message sent: 0x14 / 0x0007
00 01 00 6b 08 0f 01                            |    k
[Received Ack of type 14, seq:  1]
[Sending Ack of type 14, seq: 5]
Message received: 0x14 / 0x0008
01 25 00 6c 00 01 00 02                         |  % l
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 1
Message: IDs of Entries : 2,
Message sent: 0x14 / 0x0008
00 01 00 0a 08 00 02 01                         |
[Received Ack of type 14, seq:  2]
[Sending Ack of type 14, seq: 6]
Message received: 0x14 / 0x0004
01 25 00 0b                                     |  %
Received message type 14
SMS deleted
Getting SMS Folder Status...
Message sent: 0x14 / 0x0007
00 01 00 6b 08 0f 01                            |    k
[Received Ack of type 14, seq:  3]
[Sending Ack of type 14, seq: 7]
Message received: 0x14 / 0x0006
01 25 00 6c 00 00                               |  % l
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 0
Message: IDs of Entries :
Getting SMS (validating)...
Getting SMS Folders...
Message sent: 0x14 / 0x0006
00 01 00 7a 00 00                               |    z
[Received Ack of type 14, seq:  4]


Note: 2 things,
        1) messages not seen until viewd on 6210.
        2)Trisha is my partner (live-in lover / common law wife, whatever)

all the connection for inbound smsd - MySQL are working.

test two, placing a message into the MySQL table outbox to see if smsd can pick 
it up
and send it.

smsd was started as above and once in the loop shown the following command was 
run on MySQL:

mysql> INSERT INTO outbox SET number='+447719792316', text='Test from smsd';
Query OK, 1 row affected (0.00 sec)

mysql> select * from outbox;
+----+---------------+----------------+----------------+----------------+-----------+-------+---------------------+-----------
  
+----------+
| id | number        | processed_date | insertdate     | text           | 
processed | error | invoicedate         | invoiceid | 
invoiced |
+----+---------------+----------------+----------------+----------------+-----------+-------+---------------------+-----------
  
+----------+
|  1 | +447719792316 | 20020803150607 | 00000000000000 | Test from smsd |       
  0 |    -1 | 0000-00-00 00:00:00 |         0 | 
       0 |
+----+---------------+----------------+----------------+----------------+-----------+-------+---------------------+-----------
  
+----------+
1 row in set (0.00 sec)

mysql>

The select query is only there to demonstrate the existence of the message in 
the outbox table.

smsd fails to read / find the new message at all. perhaps there is a problem 
with my table, but I doubt it( see definition file 
attached).

As far as I can tell. the current state of play is:-

        Marcus (1)  v  Janus (0)

however its not over yet for Janus. Even though Markus has taken an early lead, 
he has yet to make smsd capture NEW incoming 
messages
without having to open them on the phone.

I will leave the message as above in MySQL in anticipation of the time when it 
can be seen as a new message. i.e. processed 
column is 0 and error column is false (-1).


B.T.W   

RedHat 7.2
GNOKII 0.4.2a
MySQL 3.23.41


Thanks for all your hard work. I'm very impressed by the speed and quality of 
the assistance.

Fin.


-----Original Message-----
From:   Markus Plail [SMTP:address@hidden
Sent:   Friday, August 02, 2002 2:16 PM
To:     address@hidden
Subject:        smsd fix

Hi all!

Attached is my version of lowlevel.c. The patch wouldn't have been
smaller, so I thought I'd just attach the whole thing. I have tested it
with my 6110, 6210 and 6510.

regards
Markus

 << File: lowlevel.c; charset = iso-8859-15 >> 

begin 600 sms_controldb.sql
M0U)%051%($1!5$%"05-%($E&($Y/5"!%6$E35%,@<VUS.PI'4D%.5"!!3$P@
M4%))5DE,14=%4R!/3B!S;7,N*B!43R!S;7- ;&]C86QH;W-T($E$14Y4249)
address@hidden@)U]P-#5S5S!R1%\G.PI54T4@<VUS.PH*0U)%051%(%1!0DQ%($E&
M($Y/5"!%6$E35%,@:6YB;W@@* H):60@:6YT*#$P*2!U;G-I9VYE9"!.3U0@
M3E5,3"!A=71O7VEN8W)E;65N="P*"6YU;6)E<B!V87)C:&%R*#(P*2!.3U0@
M3E5,3"!D969A=6QT("<G+ H)<VUS9&%T92!D871E=&address@hidden,3"!D
M969A=6QT("<P,# P+3 P+3 P(# P.C P.C P)RP*"6EN<V5R=&1A=&address@hidden&EM
address@hidden,3"P*"71E>'address@hidden<address@hidden I(&1E9F%U
M;'address@hidden,3"P*"7!R;V-E<W-E9"!T:6YY:6YT*#0I($Y/5"!.54Q,(&1E9F%U
M;'0@)S G+ H)4%))address@hidden&ED*0HI(%194$4]37E)4T%-.PH*0U)%
M051%(%1!0DQ%($E&($Y/5"!%6$E35%,@;W5T8F]X("@*"6ED(&EN="@Q,"D@
M=6YS:address@hidden(address@hidden;U]I;F-R96UE;G0L"@EN=6UB97(@=F%R
M8VAA<address@hidden,"address@hidden(address@hidden&5F875L=" 
G)RP*"7!R;V-E<W-E9%]D871E
M('1I;65S=&%M<"@Q-"address@hidden($Y53$PL"@EI;G-E<G1D871E('1I;65S=&%M
M<"@Q-"address@hidden($Y53$PL"@ET97AT('9A<F-H87(H,38P*2!D969A=6QT($Y5
M3$PL"@EP<address@hidden&EN>6EN="@address@hidden,3"!D969A=6QT("<P
M)RP*"65R<F]R('1I;GEI;G0H-"address@hidden(address@hidden&5F875L="<M,2<L"@EI
M;G9O:6-E9&%T92!D871E=&address@hidden,3"!D969A=6QT("<P,# P+3 P
M+3 P(# P.C P.C P)RP*"6EN=F]I8V5I9"!I;G0H,3 I($Y/5"!.54Q,(&1E
M9F%U;'0@)S G+ H):6YV;address@hidden&EN>6EN="@address@hidden,3"!D969A
M=6QT("<P)RP*"address@hidden("AI9"D**2!465!%/4UY25-!33L*"D-2
M14%412!404),12!)address@hidden)4U13(&QI<W1S("@*"6ED(&EN="@Q,"D@
M=6YS:address@hidden(address@hidden;U]I;F-R96UE;G0L"@EN86UE('9A<F-H
M87(H-# I($Y/5"!.54Q,(&1E9F%U;'0@)R<L"@EM;V1E<F%T;W(@=F%R8VAA
M<address@hidden,"address@hidden(address@hidden&5F875L=" 
G)RP*"65M86EL('9A<F-H87(H-C I
M($Y/5"!.54Q,(&1E9F%U;'0@)R<L"@ES;7,@=F%R8VAA<address@hidden,"address@hidden($Y5
address@hidden&5F875L=" G)RP*"65N86)address@hidden&EN>6EN="@address@hidden,3"!D
M969A=6QT("<Q)RP*"address@hidden&address@hidden,3"P*
M"address@hidden("AI9"D**2!465!%/4UY25-!33L*"D-214%412!404),
M12!)address@hidden)4U13(&UE;6)E<G,@* H):60@:6YT*#$P*2!U;G-I9VYE
M9"address@hidden,3"!A=71O7VEN8W)E;65N="P*"6QI<W1I9"!I;G0H,3 I('5N
M<VEG;F5D($Y/5"!.54Q,(&1E9F%U;'0@)S G+ H);F%M92!V87)C:&%R*#0P
address@hidden,3"!D969A=6QT("<G+ H)<F]L92!V87)C:&%R*#0P*2!.3U0@
M3E5,3"!D969A=6QT("<G+ 
H)96UA:address@hidden<address@hidden,"address@hidden($Y53$P@
M9&5F875L=" G)RP*"7-M<R!V87)C:&%R*#(address@hidden,3"!D969A=6QT
M("<G+ H)96YA8FQE9"!T:6YY:6YT*#0I($Y/5"!.54Q,(&1E9F%U;'0@)S$G
M+ H):F]I;F5D('1I;65S=&%M<"@Q-"address@hidden($Y53$PL"@E04DE-05)9($M%
M62 H:60I"address@hidden>4E304T["@address@hidden"address@hidden@3D]4($58
M25-44R!I;G9O:6-E<R H"@EI9"!I;G0H,3 I('5N<VEG;F5D($Y/5"!.54Q,
M(&%U=&]?:6YC<F5M96YT+ H)9&%T92!T:6UE<W1A;7 H,30I($Y/5"!.54Q,
M+ H)8VQI96YT:60@:6YT*#$P*2!U;G-I9VYE9"address@hidden,3"!D969A=6QT
M("<P)RP*"6YA;address@hidden<address@hidden,"address@hidden(address@hidden&5F875L="
 G)RP*
M"6%D9')E<W,@=&5X="address@hidden,3"!D969A=6QT("<G+ H);F]T97,@=&5X
M="address@hidden,3"!D969A=6QT("<G+ H)4%))address@hidden&ED*0HI(%19
M4$4]37E)4T%-.PH*0U)%051%(%1!0DQ%($E&($Y/5"!%6$E35%,@:6YV;VEC
M96QI;F5S("@*"6ED(&EN="@Q*2!U;G-I9VYE9"address@hidden,3"!A=71O7VEN
M8W)E;65N="P*"6EN=F]I8V5I9"!I;G0H,3 I('5N<VEG;F5D($Y/5"!.54Q,
M(&1E9F%U;'0@)S G+ H)9&%T92!T:6UE<W1A;7 H,30I($Y/5"!.54Q,+ H)
M<')O8V5S<V5D7V1A=&address@hidden&%T971I;address@hidden(address@hidden&5F875L=" 
G,# P
M,"TP,"TP," P,#HP,#HP,"<L"@ET97AT('9A<F-H87(H,address@hidden,
M3"!D969A=6QT("<G+ H);65M8F5R:60@:6YT*#$P*2!U;G-I9VYE9"!.3U0@
M3E5,3"!D969A=6QT("<P)RP*"6UE;6)E<FYA;address@hidden<address@hidden,"address@hidden
M(address@hidden&5F875L=" G)RP*"6UE;6)E<G-M<R!V87)C:&%R*#(P*2!.3U0@
M3E5,3"!D969A=6QT("<G+ 
H);65M8F5R96UA:address@hidden<address@hidden,"address@hidden
M(address@hidden&5F875L=" G)RP*"address@hidden("AI9"D**2!465!%/4UY
M25-!33L*"D-214%412!404),12!)address@hidden)4U13(&-L:65N=',@* H)
M:60@:6YT*#$P*2!U;G-I9VYE9"address@hidden,3"!A=71O7VEN8W)E;65N="P*
M"6IO:6YE9"!T:6UE<W1A;7 H,30I($Y/5"!.54Q,+ H);F%M92!V87)C:&%R
address@hidden,3"!D969A=6QT("<G+ H)<W1R965T,2!V87)C:&%R*#$P
M,"address@hidden(address@hidden&5F875L=" 
G)RP*"7-T<F5E=#(@=F%R8VAA<address@hidden,# I
M($Y/5"!.54Q,(&1E9F%U;'0@)R<L"@EA<F5A('9A<F-H87(H,3 P*2!.3U0@
M3E5,3"!D969A=6QT("<G+ H)=&]W;B!V87)C:&address@hidden,3"!D
M969A=6QT("<G+ H)8V]U;G1Y('9A<F-H87(H-3 I($Y/5"!.54Q,(&1E9F%U
M;'0@)R<L"@EC;W5N=')Y('9A<F-H87(H-3 I($Y/5"!.54Q,(&1E9F%U;'0@
M)R<L"@EP;W-T8V]D92!V87)C:&address@hidden,3"!D969A=6QT("<G
M+ H);F]T97,@5$585"address@hidden,3"!D969A=6QT("<G+ H)8G5S:6YE<W-?
M87)E82!V87)C:&address@hidden,3"!D969A=6QT("<G+ H)=&5L('9A
M<F-H87(H,C4I($Y/5"!.54Q,(&1E9F%U;'0@)R<L"@EF87@@=F%R8VAA<address@hidden
address@hidden(address@hidden&5F875L=" G)RP*"65M86EL('9A<F-H87(H-C I($Y/
M5"!.54Q,(&1E9F%U;'0@)R<L"@E04DE-05)9($M%62 H:60I"address@hidden
'>4E304T["F1E
`
end





reply via email to

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