PDA

View Full Version : MBUS commands



mrbig4545
05-10-2002, 08:18 PM
I am trying to write a simple prog to read the imei and sec code etc from a nokia using MBUS

but i cant find any information on the protocol, ecept at this site; http://www.flosys.com/gsm/, but it doesn't quite explain how the header should be constructed, eg whether it should be sent as integers, text eg "0x1F 0x00 0x1D" or just the character representations of these values. :confused:

If i could get hold of some source which communicates with the phone via MBUS, then it would be sweet, no matter what language its written in, but i cant seem to get hold of any source.

Any help appreciated.

Mark

phonedudes
05-10-2002, 10:58 PM
The "0x1F 0x00 0x1D" designates hexadecimal 1f 00 1d etc....

Packets should be sent just like that in there hexadecimal format..

Phone initialization command is:
1f 00 1d d0 00 01 04 sq cs..... where sq = sequence # and cs = xor checksum

Since the Mbus protocol is NOT full duplex so you send a command and the phone should send a (ack)nowledgement response, then depending on the command used the information you requested, you should then send a (ack)nowledgement back to the phone to confirm receipt.

Delay the commands a few milliseconds... If you dont receive the (ack) within a 1/2 second or so retransmit the command.

Hope that helps...

Phonedudes

mrbig4545
06-10-2002, 12:06 AM
Does this sq # matter? can i just make it up? i got the ack command and the checksum generator all ready done, but i not sure on the sq, ill just make it up and see what happends.

Thank you very much

mark

mrbig4545
06-10-2002, 12:26 AM
:confused: :confused: :confused:

im really sorry, but i couldnt get it to work... :(

:confused: :confused: :confused:

Im trying to do it in vb at the mo, but if you could possibly post the way it should look in vb style or even c or c++ style,

On another note, the reason i say i couldnt get it to work is because i get nothing returned, its like me phone is a sponge!!!
:p

Any help?



Mark

phonedudes
06-10-2002, 08:41 AM
What is the command sequence you sent?? If you just sent the 'init' command then your not going to see anything..

Be sure your software sets the COM port up properly for Communication with the phone.

Mbus 9600 Baud, 8bits , odd parity , 1stop bit

IN answer to your 'Does the SQ (Sequence number) matter' question... thats a good question...
In our experience the # you start with does NOT seem to matter. We usually start with 1 or 2 because thats what the various oem software appeared to do and we had no problem. For sure during a single session of commands' you MUST increase the sequence #.

PHONEDUDES

mrbig4545
06-10-2002, 01:18 PM
Get_SMS = &H0 & &H7 & &H2 & Text1 & &H1 & &H64

CRC = Calc_CRC(Get_SMS)

header = &H1F & &H0 & &H1D & &H2 & &H0 & &H99 & Get_SMS & 1 & CRC

is the data

i then send header to the com port, the port is setup the way you said, but thats how i always had it.

the &H is the vb way of saying that something is hex, not decimal.

text1 is equal to 1

I dont know what im doing wrong, unless each command has to be sent seperate, eg send &H1F then send &H0 etc.

Also the get_sms, crc and header functions are strings.

Any ideas?

Mark

:: sunny ::
06-10-2002, 10:28 PM
dont know ..may be this will help you ..
http://3ton.com/besik/busik.html

regards:
haf

Kontact
07-10-2002, 02:00 AM
try reading the mbus responds. i mean if u sent mbus command it should return a respond. if u use debugger u will see if the respond is valid. if respond is invalid. it means ur mbus command has some wrong bytes in it.