PDA

View Full Version : Read SMS from phone/SIM



jc_armor
17-09-2003, 11:52 AM
Hi... I already have an SMS sending application. My problem is how to read an sms from the phone/SIM. Can someone help me on how to read an sms message from inbox. I'm using 3310 connected to a MBUS/FBUS cable. Any help will be appreciated.

Thanks

Joel

Bungle
18-09-2003, 05:47 PM
Send this:
1E000C14000C00010107yy00xx01650101427A5C

Were yy is the message store (08 = inbox) and xx is the index of the message you're trying to read. (starts at 01)

If you read a location with no message you get this:
1E0C00140007012501090701410058
Instead of 01250108 at the start of the block data its 01250109. This is useful for telling the difference between messages and not messages.

Reply from phone looks like this:

1E0C0014003301250108030800050007914487200030230011C352040000050C914477354726220000000030908151911240C8329BFD060140003A

You need to check that this is the last message in the series when reading sms, since some messages (esp pictures) go over the one byte frame length limit.

Anyway this is the important bit:

01250108030800050007914487200030230011C352040000050C914477354726220000000030908151911240C8329BFD06

Where (Sorry this is a bit of a mess, i didnt want to break up the original response. These are in the order in which they appear):

07: Centre number length, number of bytes, 7bytes = 14 characters
91448720003023: Sms centre with nibbles swapped (447802000332) - 91 is the number type identifier (91 = international format)

05: Fairly sure this is the number of sepets in the message itself (bytes if its not in 7bit format)

0C: Sender number length, note this is in characters NOT bytes (14)
91447735452622: Sender number again with nibbles swapped (447753546222) - 91 is the number type again.

309081: Date again nibble swapped (18/09/03)
519112: Time nibble swapped (15:19:12)

C8329BFD06: Message "Hello", cant rember what the "40" before it is, think that its the message encoding type (7bit)


Again hope this helps.

jc_armor
10-10-2003, 03:36 PM
I couldn't read the whole message when it's too long. How do i read the 2nd frame?

Bungle
10-10-2003, 04:18 PM
I couldn't read the whole message when it's too long. How do i read the 2nd frame?

If you're getting the second (and any more if they're there) frame from the phone ok then all you have to do is strip the data out of it and stick it on the end of the stuff taken from the first frame. Once you've got every frame's data together in one big string then process it.

If all you're getting is the first frame 3 times in your input buffer then you aren't sending your ack's right or not fast enough. The phone will retransmit if it doesnt get its ack in something like 200ms and will give up after three retransmits. Also you need to get the right seq. number on the ack or the phone will ignore it.

Actually just out of interest did any of that other code above work/need modified slightly? I just realised that i gave you the commands for a 6310 which probably wont have worked on a 3310.

jc_armor
13-10-2003, 09:56 AM
If you're getting the second (and any more if they're there) frame from the phone ok then all you have to do is strip the data out of it and stick it on the end of the stuff taken from the first frame. Once you've got every frame's data together in one big string then process it.

If all you're getting is the first frame 3 times in your input buffer then you aren't sending your ack's right or not fast enough. The phone will retransmit if it doesnt get its ack in something like 200ms and will give up after three retransmits. Also you need to get the right seq. number on the ack or the phone will ignore it.

Actually just out of interest did any of that other code above work/need modified slightly? I just realised that i gave you the commands for a 6310 which probably wont have worked on a 3310.

I actually used 00x07 for reading the message. How do i send the proper ACK? Correct if i'm wrong, if I would receive a 41 SEQNo, I should send and ACK frameset with a 41 SEQNo.?

Bungle
14-10-2003, 07:04 PM
I actually used 00x07 for reading the message. How do i send the proper ACK? Correct if i'm wrong, if I would receive a 41 SEQNo, I should send and ACK frameset with a 41 SEQNo.?


Yeah, whatever the sequence number is you need to send it back, if you've got ack sending in your program then check its not too slow! Use the gettickcount api call to measure the time between the first byte of data recieved and the time just after the ack is sent. Should be made as fast as possible. The ack for a sequence number xx should look like this:

1E000C7F000214xxYYYY
(YYYY = checksums as in any other fbus frame)

I cant remember the specifics of what everything after the message type means, I read a rough description somewhere on the net, may even have been here somewhere but I cant remember it.

jc_armor
15-10-2003, 10:16 AM
I can get the 2nd frame now...thanks.

Another question? i'm having problems reading long messages in my inbox? Based from what i have observed, long messages where treated as 2 (or more) separate message. My problem is that I couldn't decode the data properly. Here's a sample frame:

1E 0C 00 14 00 7A 01 08 00 08 05 02 16 02 02 81 F0 08 00 08 05 02 16 02 02 81 41 00 00 00 A0 00 81 01 00 74 41 00 00 00 A0 00 81 FF FF FF FF FF FF FF 05 00 03 C7 02 01 A8 E8 F4 1C 94 9E 83 D4 F5 39 1D 14 06 D1 CB 73 BA 0B 74 3D 83 DA E1 79 3E 4C 7E 83 C2 EC 30 3B 0C 5A 8F 41 F4 F2 9C 9E 76 9F 41 6C F7 19 E4 3E 87 41 69 FA 1B 54 76 81 A6 61 77 18 D4 3E DF DF F2 35 08 2E 0F 83 02 47 05 E7

Hope you could help out on this one...

Bungle
16-10-2003, 03:30 PM
I haven't done any work on linked messages (I take it thats what you're talking about?) I always just assumed that they were two totally seperate text messages, with the "linked 1/2" etc stuff put on the top of both of them by the phone. I've not seen any phone which puts these back together as one message hence the assumption. Also they'd need to be readable by other phones so they couldn't have any nokia specific codes at the start.

Right, had a quick look at that message and I have no idea where or what anything is. Theres a few fields near the start that look like sender number and smsc number though there doesnt seem to be any information on how long they are, I also cant find any date/time.

E8F41C949E83D4F5391D1406D1CB73BA0B743D83DAE1793E4C7E83C2EC303B0C5A8F41F4F29C9E769F416CF719E43E874169FA1B547681A6617718D43EDFDFF235082E0F830247

= his is just a test. Wg masyado alala kc testing lng nga ito e. Sana mgw

Thats the best I could get out of it, just by trial and error, again there doesnt seem to be any length byte, though the message is 47 sepets long and there's a 74 further up the message so that might be it, nibble swapped.

Sorry I cant be more help here, ive never seen a message come back from the phone anything like this, my only suggestion is if the message was sent from some online message service, they seem to send really weird messages back, again I havent looked at them yet.
Take a look at http://www.dreamfabric.com/sms/ , thats where I got a lot of information.

ASalma
04-11-2003, 02:28 PM
Hi everybody,
I have been trying to connect to a Nokia 3350 via MBUS data cable.
the code is as follows

.
.
.
Private Sub reset_Click()
strRx = ""
Delay
infotext.Text = ""
infotext.Text = strRx
Launch11 ("1F 00 10 40 00 04 00 01 64 03 11 3C")
end sub
.
.
.
in module launch
Sub Launch11(H As String)
'Dimension the variables for this rutine
Dim strHexList() As String
Dim loop1 As Long
Dim bytSend As Byte
strHexList = Split(H, " ")
For loop1 = 0 To UBound(strHexList)
bytSend = CByte("&H" & strHexList(loop1))
Next
End Sub

The above code restarts the mobile. But if i use
Launch11 ("1F 00 0C 14 00 0C 00 01 01 07 08 00 01 01 65 01 01 42 7A 5C"). which is supposed to read the message in the inbox i get reply as

in ascii: ???Œ?? ?(??
in hex : 3F3F3F8C3F3FC3F283F3F03F3F3F3F3F3F3F3F3F3F3FFF

Can somebody help me as to what is this reply or whether my code itself is wrong. if possible plz some one could send me a sample code for sending a SMS.
My email id is [email protected]

Thanks and regards
Salma

natnat
05-11-2003, 08:01 AM
guyzzz please post it here coz i need it too and please avoid sending PM when its useful for everybody.

fiddler_808
22-01-2004, 07:30 PM
hi..m wondering if u can help me out. m interfacing a nokia 3310 to a z8 encore dev board. i know m supposed to set DTR and clear RTS for FBUS operation and to power the data cable. how do i do this? is the configuration DTE(z8) to DCE(phone)? The RTS and DTR of the data cable connect to the what pins of the serial port of my microcontroller? hope u can help..thnx!

fiddler_808
22-01-2004, 07:31 PM
hi..m wondering if u can help me out. m interfacing a nokia 3310 to a z8 encore dev board. i know m supposed to set DTR and clear RTS for FBUS operation and to power the data cable. how do i do this? is the configuration DTE(z8) to DCE(phone)? The RTS and DTR of the data cable connect to the what pins of the serial port of my microcontroller? hope u can help..thnx!

gian
01-04-2004, 08:15 PM
HI MY PROBLEM ABOUT I CANT MAKE A VOICE CALL I DONT KNOW THAT FRAME SEND TO PHONE I HAVE A 3310 I CAN TO SEND MESSAGE BUT I CANT MADE A VOICE CALL .
PEASE COULD YOU SEND SOMEONE EXAMPLES OF FRAME MI EMAIL IS
[email protected]
thanks

sandipsurale
29-12-2004, 06:03 AM
Hi this is SANDIP.
new in this field wants vb program for sending/receiving SMS from/to nokia 3310 either with FBUS or MBUS will u please send it PPPLLLEEEAAASSEE.

[email protected]

sandipsurale
29-12-2004, 06:37 AM
wants a vb program or hints for sending receiving SMS from 3310 .
please send it to me.
thanks.
[email protected]