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

[bluetooth-dev] Behavior changes when disconnecting from different stacks

Hi all,

I wanted to find somewhere in the code where I could be informed when a disconnection happens. And because I wanted to know the server channel, I need to be at rfcomm level.
I found sowhere where I could have this information. This worked well when I had another openBT stack on the other side, or a bluetooth phone (Nokia 7650).

I got my informations in function "rfcomm_receive_data", in the case "case DISC:". I added my code on line 1261 of actual CVS file rfcomm.c.
I notice that during a remote disconnection, it first went in ELSE of the if :

"if ((short_pkt->h.addr.server_chn) == 0) {"

and then it went in the if

"if ((short_pkt->h.addr.server_chn) == 0) {"

When it went in the ELSE, I could get the server channel number.

BUT : When I disconnect from a BlueZ stack (remote disconnection), it only went one time in the "if", and it never went in the ELSE.
Because in the "if" I haven't any server channel number (the if indicates it is 0), I can't get the information which server channel has been disconnected.

So here are my questions : How is it possible that the stack have such different behaviors depends of the stack on the other side ?
Is there a bug of BlueZ that doesn't send the server channel when disconnecting ?
Does someone have an idea how to get in every cases the server channel ?

Best regards, and thank you for any help.

Alain Paschoud                      SMARTDATA SA
alain.paschoud@xxxxxxx.ch         PSE-A
http://www.smartdata.ch             1015 Lausanne
Phone +41-21-693'84'98              
Fax   +41-27-693'84'91              
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com