2006-06-20 21:50:08

by Götz Issel

[permalink] [raw]
Subject: Re: [Bluez-devel] blueZ and SAP

Hi Mayank,

>
>First of all, please do not reply on individual ids.


sorry for PM, will post here in list again.

I do get a message back from the mobile phone, of course after first
sending a message to it..
The response of a 'connect-req' from the phone is:
header: 1100, the response message header is correct, since
it has the correct MsgID that corresponds to 'connect-resp'

parameter #1: 10010000 , meaning that it is the parameterID
'ConnectionStatus', with parameter value length 1 and the value is 0 (=
OK, server can fulfill the requirements)

This message is received from a Nokia 6810 and the MaxMsgSize requested
in the 'connection-req' was 0x0118. It looks promising so far. I will
try to get a few more things done now.
When I request an initial MaxMsgSize of 0xff ff the mobile phone
responds with
header: 1200 , so now 2 parameters in the 'connect-resp' message coming up
parameter #1: 10012000 , connectionStatus now gives 'Error, Server does
not support maximum message size'
parameter #2: 00028000 , the server now suggests MaxMsgSize to be 0x800

And... when I request a small MaxMsgSize (ie 0x0001) the SIM server
returns the expected 'Error, maximum message size by Client is too small'

In case you decide to work on this subject as well I am interested in a
bit of team work.

> > first of all I am happy to hear that there is somebody out there working
> > on this too. I thought I was on my own since I never got any helpful
> > response on the list so far.
> >
> > I have been checking the returned values in 2 ways.
> >
> > First I tried to use "read()" on the socket on which I did the "write()"
> > before. I got no response at all. By the way, I am using Nokia 6810 and
> > a Siemens S65 for testing.
>
>Hang on, if you do a read() before write(), won't the read block your
>thread? and your control will never reach the write()?
>Or are you using different threads for the read and write?

> > problem. I need to implement the whole sap profile. Panic!
> >
> > If you have any decend code I can use... please help. If you want I can
> > send you the code I have so far.
>
>No, I did not have any code actually, I just made the RFCOMM connection, and
>I was sending the connect_req etc on this rfcomm device (/dev/rfcomm0). So I
>wrote the connect_req in hex form in a file and then simply did cat file >
>/dev/rfcomm0

>Regards,
>Mayank

Greetings,
Goetz



_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2006-06-23 04:52:43

by Mayank Batra

[permalink] [raw]
Subject: Re: [Bluez-devel] blueZ and SAP

Hi Goetz,


On 6/21/06, Mayank Batra <[email protected]> wrote:
>
>
> *But tell me one thing: After you receive a connect_resp from the phone,
> do you receive a status_ind as well?*
> *This is important, because if you do not receive this, the connection is
> not really up. See page 22 of the spec.*
>

So, I mean that after you've read the connect_resp, you should perform
another read for the status_ind which will be something like:

0x11 0x01 0x00 0x00 0x08 0x00 0x00 0x01 0x04 0x00 0x00 0x00

0x11 is msg_id for status_ind.
0x08 is parameter_id for StatusChange
0x04 is the value of StatusChange which says "Card Inserted"


Please let me know in case you want any further information.

Regards,
Mayank


Attachments:
(No filename) (715.00 B)
(No filename) (1.23 kB)
(No filename) (299.00 B)
(No filename) (164.00 B)
Download all attachments

2006-06-21 05:48:16

by Mayank Batra

[permalink] [raw]
Subject: Re: [Bluez-devel] blueZ and SAP

Hi Goetz,


On 6/21/06, Goetz Issel <[email protected]> wrote:
>
> Hi Mayank,
>
> I do get a message back from the mobile phone, of course after first
> sending a message to it..
> The response of a 'connect-req' from the phone is:
> header: 1100, the response message header is correct, since
> it has the correct MsgID that corresponds to 'connect-resp'
>
> parameter #1: 10010000 , meaning that it is the parameterID
> 'ConnectionStatus', with parameter value length 1 and the value is 0 (=
> OK, server can fulfill the requirements)


This is good news. So you get a perfect response from the phone:
0x01 0x01 0x00 0x00 0x01 0x00 0x00 0x01 0x00 0x00 0x00 0x00
This is absolutely perfect connect_resp.

This message is received from a Nokia 6810 and the MaxMsgSize requested
> in the 'connection-req' was 0x0118. It looks promising so far. I will
> try to get a few more things done now.
> When I request an initial MaxMsgSize of 0xff ff the mobile phone
> responds with
> header: 1200 , so now 2 parameters in the 'connect-resp' message coming up
> parameter #1: 10012000 , connectionStatus now gives 'Error, Server does
> not support maximum message size'
> parameter #2: 00028000 , the server now suggests MaxMsgSize to be 0x800
>
> And... when I request a small MaxMsgSize (ie 0x0001) the SIM server
> returns the expected 'Error, maximum message size by Client is too small'


Thats OK, but why do you want to try this? 0x118 is good enough.

*But tell me one thing: After you receive a connect_resp from the phone, do
you receive a status_ind as well?*
*This is important, because if you do not receive this, the connection is
not really up. See page 22 of the spec.*

In case you decide to work on this subject as well I am interested in a
> bit of team work.


Of course, I will help you as much as I can.

Regards,
Mayank


Attachments:
(No filename) (1.82 kB)
(No filename) (2.66 kB)
(No filename) (0.00 B)
(No filename) (164.00 B)
Download all attachments