linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] Problems with smart phones when using a "silent" kernel
@ 2006-01-12 10:19 Victor Shchebatyuk
  2006-01-12 13:27 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Victor Shchebatyuk @ 2006-01-12 10:19 UTC (permalink / raw)
  To: BlueZ Mailing List

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

Hello Marcel,

I have a very strange problem here. When using a "silent" kernel
(CONFIG_CMDLINE="console=/dev/null quiet" instead of
CONFIG_CMDLINE="console=ttySAC0,115200") It is no longer possible to
pair with Microsoft smartphones. A phone reports "the connection failed
or pass key is incorrect". If a phone was already paired everything
works fine. Other phones work fine too. Any clue what can go wrong. All
this doesn't make much sence, but it is reality :) I've attached the
dumps for the same phone for both of the kernels (silent and not). We
use 2.6.13 with bluez 2.15 and there is no option to switch to something
more recent. Just wonder what can cause the problem.... From the log I
see that pairing actually went ok, cause it switched on encryption mode
and exchanged some AT's, might be something with our application as
well, but does not seem to be likelly...


Regards,
     Victor.

[-- Attachment #2: hcidump.bin --]
[-- Type: application/octet-stream, Size: 27171 bytes --]

[-- Attachment #3: hcidump_nocon.bin --]
[-- Type: application/octet-stream, Size: 13348 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Problems with smart phones when using a "silent" kernel
  2006-01-12 10:19 [Bluez-devel] Problems with smart phones when using a "silent" kernel Victor Shchebatyuk
@ 2006-01-12 13:27 ` Marcel Holtmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcel Holtmann @ 2006-01-12 13:27 UTC (permalink / raw)
  To: bluez-devel

Hi Victor,

> I have a very strange problem here. When using a "silent" kernel
> (CONFIG_CMDLINE="console=/dev/null quiet" instead of
> CONFIG_CMDLINE="console=ttySAC0,115200") It is no longer possible to
> pair with Microsoft smartphones. A phone reports "the connection failed
> or pass key is incorrect". If a phone was already paired everything
> works fine. Other phones work fine too. Any clue what can go wrong. All
> this doesn't make much sence, but it is reality :) I've attached the
> dumps for the same phone for both of the kernels (silent and not). We
> use 2.6.13 with bluez 2.15 and there is no option to switch to something
> more recent. Just wonder what can cause the problem.... From the log I
> see that pairing actually went ok, cause it switched on encryption mode
> and exchanged some AT's, might be something with our application as
> well, but does not seem to be likelly...

I don't see any strange inside the dump and I doubt that it really has
something to do with the console option. Maybe your application can live
if the console is /dev/null.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a "silent"kernel
@ 2006-01-12 13:35 Victor Shcherbatyuk
  0 siblings, 0 replies; 12+ messages in thread
From: Victor Shcherbatyuk @ 2006-01-12 13:35 UTC (permalink / raw)
  To: bluez-devel

Marcel,

Well, there are some PSM not supported packets in the failing dump. But
I still can not figure out what is wrong there... Thanks.

Regards,
    Victor.=20

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Marcel
Holtmann
Sent: Thursday, January 12, 2006 14:27 PM
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Problems with smart phones when using a
"silent"kernel

Hi Victor,

> I have a very strange problem here. When using a "silent" kernel=20
> (CONFIG_CMDLINE=3D"console=3D/dev/null quiet" instead of
> CONFIG_CMDLINE=3D"console=3DttySAC0,115200") It is no longer possible t=
o=20
> pair with Microsoft smartphones. A phone reports "the connection=20
> failed or pass key is incorrect". If a phone was already paired=20
> everything works fine. Other phones work fine too. Any clue what can=20
> go wrong. All this doesn't make much sence, but it is reality :) I've=20
> attached the dumps for the same phone for both of the kernels (silent=20
> and not). We use 2.6.13 with bluez 2.15 and there is no option to=20
> switch to something more recent. Just wonder what can cause the=20
> problem.... From the log I see that pairing actually went ok, cause it

> switched on encryption mode and exchanged some AT's, might be=20
> something with our application as well, but does not seem to be
likelly...

I don't see any strange inside the dump and I doubt that it really has
something to do with the console option. Maybe your application can live
if the console is /dev/null.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


This e-mail message contains information which is confidential and may be=
 privileged. It is intended for use by the addressee only. If you are not=
 the intended addressee, we request that you notify the sender immediatel=
y and delete or destroy this e-mail message and any attachment(s), withou=
t copying, saving, forwarding, disclosing or using its contents in any ot=
her way. TomTom N.V., TomTom International BV or any other company belong=
ing to the TomTom group of companies will not be liable for damage relati=
ng to the communication by e-mail of data, documents or any other informa=
tion.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a "silent"kernel
@ 2006-01-13 11:39 Victor Shcherbatyuk
  2006-01-13 12:13 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Victor Shcherbatyuk @ 2006-01-13 11:39 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 4526 bytes --]

Marcel,

Small update. I've tried to connect with rfcomm tool - the same
behaviour. With the silent kernel it does not connect to Windows Mobile
phones. The logs show attempts to connect to the phone with "normal"
kernel (connection successful) and "silent" one (fails). PSM Not
Supported is something that probably goes wrong...

Regards,
    Victor. 

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Victor
Shcherbatyuk
Sent: Thursday, January 12, 2006 14:35 PM
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] Problems with smart phones when using a
"silent"kernel

Marcel,

Well, there are some PSM not supported packets in the failing dump. But
I still can not figure out what is wrong there... Thanks.

Regards,
    Victor. 

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Marcel
Holtmann
Sent: Thursday, January 12, 2006 14:27 PM
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Problems with smart phones when using a
"silent"kernel

Hi Victor,

> I have a very strange problem here. When using a "silent" kernel 
> (CONFIG_CMDLINE="console=/dev/null quiet" instead of
> CONFIG_CMDLINE="console=ttySAC0,115200") It is no longer possible to 
> pair with Microsoft smartphones. A phone reports "the connection 
> failed or pass key is incorrect". If a phone was already paired 
> everything works fine. Other phones work fine too. Any clue what can 
> go wrong. All this doesn't make much sence, but it is reality :) I've 
> attached the dumps for the same phone for both of the kernels (silent 
> and not). We use 2.6.13 with bluez 2.15 and there is no option to 
> switch to something more recent. Just wonder what can cause the 
> problem.... From the log I see that pairing actually went ok, cause it

> switched on encryption mode and exchanged some AT's, might be 
> something with our application as well, but does not seem to be
likelly...

I don't see any strange inside the dump and I doubt that it really has
something to do with the console option. Maybe your application can live
if the console is /dev/null.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


This e-mail message contains information which is confidential and may
be privileged. It is intended for use by the addressee only. If you are
not the intended addressee, we request that you notify the sender
immediately and delete or destroy this e-mail message and any
attachment(s), without copying, saving, forwarding, disclosing or using
its contents in any other way. TomTom N.V., TomTom International BV or
any other company belonging to the TomTom group of companies will not be
liable for damage relating to the communication by e-mail of data,
documents or any other information.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=ick
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.

[-- Attachment #2: hcidump_log_silent.txt --]
[-- Type: text/plain, Size: 5952 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:09:2D:60:37:9C ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:09:2D:60:37:9C type ACL encrypt 0x00
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
  0000: 9c 37 60 2d 09 00 01                              .7`-...
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2a 00 05                                          *..
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
    handle 42 policy 0x0f
    Link policy: RSWITCH HOLD SNIFF PARK 
> HCI Event: Command Complete (0x0e) plen 6
    Write Link Policy Settings (0x02|0x000d) ncmd 1
    status 0x00 handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0040 result 0 status 0
      Connection successful
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 1024 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0041 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 14 frame_type 0 credit_flow 15 pri 7 ack_timer 0
      frame_size 667 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
      dlci 14 frame_type 0 credit_flow 14 pri 7 ack_timer 0
      frame_size 667 max_retrans 0 credits 7
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 14 pf 1 ilen 0 fcs 0x6 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: PIN Code Request (0x16) plen 6
    bdaddr 00:09:2D:60:37:9C
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
    bdaddr 00:09:2D:60:37:9C len 4 pin '0000'
> HCI Event: Command Complete (0x0e) plen 10
    PIN Code Request Reply (0x01|0x000d) ncmd 1
    status 0x00 bdaddr 00:09:2D:60:37:9C
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr 00:09:2D:60:37:9C type 0x00
    Link key: 4686e95c1adcbb41e8cdc53de49aa1c6
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 42 encrypt 0x01
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 14 pf 1 ilen 0 fcs 0xcd 
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 0 len 14
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0041 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 0 len 14
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0041 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 0 len 14
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 0 len 14
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0041 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 14 pf 1 ilen 0 fcs 0xb9 credits 33
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0042 result 2 status 0
      Connection refused - PSM not supported
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0043
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0043 result 2 status 0
      Connection refused - PSM not supported
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0044
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0044 result 2 status 0
      Connection refused - PSM not supported
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
< HCI Command: Reset (0x03|0x0003) plen 0
> HCI Event: Command Complete (0x0e) plen 4
    Reset (0x03|0x0003) ncmd 1
    status 0x00
    Features: 0x00 0x00 0x03 0x0d 0x08 0x00 0x00 0x00

[-- Attachment #3: hcidump_log.txt --]
[-- Type: text/plain, Size: 14357 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:09:2D:60:37:9C ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:09:2D:60:37:9C type ACL encrypt 0x00
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
  0000: 9c 37 60 2d 09 00 01                              .7`-...
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
    handle 42 policy 0x0f
    Link policy: RSWITCH HOLD SNIFF PARK 
> HCI Event: Max Slots Change (0x1b) plen 3
  0000: 2a 00 05                                          *..
> HCI Event: Command Complete (0x0e) plen 6
    Write Link Policy Settings (0x02|0x000d) ncmd 1
    status 0x00 handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0045 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0045 flags 0x00 clen 4
      MTU 1024 
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0045 flags 0x00 result 0 clen 0
      Success
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0045 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0045 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 14 frame_type 0 credit_flow 15 pri 7 ack_timer 0
      frame_size 667 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
      dlci 14 frame_type 0 credit_flow 14 pri 7 ack_timer 0
      frame_size 667 max_retrans 0 credits 7
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0045 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 14 pf 1 ilen 0 fcs 0x6 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: PIN Code Request (0x16) plen 6
    bdaddr 00:09:2D:60:37:9C
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
    bdaddr 00:09:2D:60:37:9C len 4 pin '0000'
> HCI Event: Command Complete (0x0e) plen 10
    PIN Code Request Reply (0x01|0x000d) ncmd 1
    status 0x00 bdaddr 00:09:2D:60:37:9C
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr 00:09:2D:60:37:9C type 0x00
    Link key: 21b3bcf753d156fb0fab96788d24423c
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 42 encrypt 0x01
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 14 pf 1 ilen 0 fcs 0xcd 
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 1 len 8
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0045 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 1 len 8
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0045 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 1 len 8
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 14 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 0 b2 1 b3 1 len 8
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0045 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 14 pf 1 ilen 0 fcs 0xb9 credits 33
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0046
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0046 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 4096 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0046 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0046 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 38
    L2CAP(d): cid 0x0041 len 34 [psm 1]
        SDP SSA Req: tid 0x0 len 0x1d
          pat uuid-128 0000111e-0000-1000-8000-00805f9b34fb
          max 4088
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 93
    L2CAP(d): cid 0x0046 len 89 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x54
          count 81
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x111e (Handsfree) uuid-16 0x1203 (Audio) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x3 > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x111e (Handsfree) uint 0x101 > >
              aid 0x0100 (SrvName)
                 str "Handsfree"
              aid 0x0311 (unknown)
                 uint 0x7
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0046
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0046
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0047
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0047 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 4096 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0047 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0047 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 38
    L2CAP(d): cid 0x0041 len 34 [psm 1]
        SDP SSA Req: tid 0x0 len 0x1d
          pat uuid-128 00001108-0000-1000-8000-00805f9b34fb
          max 4088
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(d): cid 0x0047 len 10 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x5
          count 2
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0047
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0047
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0048
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0048 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 4096 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0048 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0048 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 38
    L2CAP(d): cid 0x0041 len 34 [psm 1]
        SDP SSA Req: tid 0x0 len 0x1d
          pat uuid-128 00001101-0000-1000-8000-00805f9b34fb
          max 4088
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(d): cid 0x0048 len 10 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x5
          count 2
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0048
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0048
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0049
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0049 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 4096 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0049 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0049 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 38
    L2CAP(d): cid 0x0041 len 34 [psm 1]
        SDP SSA Req: tid 0x0 len 0x1d
          pat uuid-128 0350278f-3dca-4e62-831d-a41165ff906c
          max 4088
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(d): cid 0x0049 len 10 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x5
          count 2
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0049
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0049
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x004a
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x004a result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 4096 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x004a flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x004a flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 36
    L2CAP(d): cid 0x0041 len 32 [psm 1]
        SDP SSA Req: tid 0x0 len 0x1b
          pat uuid-128 0000111e-0000-1000-8000-00805f9b34fb
          max 4088
          aid(s) 0x0004 (ProtocolDescList)
          cont 00
< ACL data: handle 42 flags 0x02 dlen 33
    L2CAP(d): cid 0x004a len 29 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x18
          count 21
          record #0
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x3 > >
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
      dlci 7 frame_type 0 credit_flow 15 pri 32 ack_timer 0
      frame_size 127 max_retrans 0 credits 7
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x004a
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x004a
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0045 len 4 [psm 3]
      RFCOMM(s): DM: cr 0 dlci 7 pf 1 ilen 0 fcs 0x5a 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42
< HCI Command: Reset (0x03|0x0003) plen 0
> HCI Event: Command Complete (0x0e) plen 4
    Reset (0x03|0x0003) ncmd 1
    status 0x00
    Features: 0x00 0x00 0x1d 0x1f 0x01 0x5a 0x41 0x00

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a "silent"kernel
  2006-01-13 11:39 [Bluez-devel] Problems with smart phones when using a "silent"kernel Victor Shcherbatyuk
@ 2006-01-13 12:13 ` Marcel Holtmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcel Holtmann @ 2006-01-13 12:13 UTC (permalink / raw)
  To: bluez-devel

Hi Victor,

> Small update. I've tried to connect with rfcomm tool - the same
> behaviour. With the silent kernel it does not connect to Windows Mobile
> phones. The logs show attempts to connect to the phone with "normal"
> kernel (connection successful) and "silent" one (fails). PSM Not
> Supported is something that probably goes wrong...

these stupid Microsoft devices. Everytime they get a connection, they
connect back to the SDP server of that device and this fails. So it
seems to me that the SDP daemon is not running or have problems with the
console redirected to /dev/null. Check in the log files for errors from
sdpd. Or you might need to use strace to track it.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a"silent"kernel
@ 2006-01-13 13:01 Victor Shcherbatyuk
  0 siblings, 0 replies; 12+ messages in thread
From: Victor Shcherbatyuk @ 2006-01-13 13:01 UTC (permalink / raw)
  To: bluez-devel

I've checked, it is running, so the only option it has some issues with
console redirected to /dev/null... Will check the logs...

Regards,
    Victor.=20

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Marcel
Holtmann
Sent: Friday, January 13, 2006 13:13 PM
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] Problems with smart phones when using
a"silent"kernel

Hi Victor,

> Small update. I've tried to connect with rfcomm tool - the same=20
> behaviour. With the silent kernel it does not connect to Windows=20
> Mobile phones. The logs show attempts to connect to the phone with
"normal"
> kernel (connection successful) and "silent" one (fails). PSM Not=20
> Supported is something that probably goes wrong...

these stupid Microsoft devices. Everytime they get a connection, they
connect back to the SDP server of that device and this fails. So it
seems to me that the SDP daemon is not running or have problems with the
console redirected to /dev/null. Check in the log files for errors from
sdpd. Or you might need to use strace to track it.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


This e-mail message contains information which is confidential and may be=
 privileged. It is intended for use by the addressee only. If you are not=
 the intended addressee, we request that you notify the sender immediatel=
y and delete or destroy this e-mail message and any attachment(s), withou=
t copying, saving, forwarding, disclosing or using its contents in any ot=
her way. TomTom N.V., TomTom International BV or any other company belong=
ing to the TomTom group of companies will not be liable for damage relati=
ng to the communication by e-mail of data, documents or any other informa=
tion.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a"silent"kernel
@ 2006-01-16 15:13 Victor Shcherbatyuk
  2006-01-16 16:17 ` Dimitry Andric
  2006-01-16 16:21 ` Marcel Holtmann
  0 siblings, 2 replies; 12+ messages in thread
From: Victor Shcherbatyuk @ 2006-01-16 15:13 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 3832 bytes --]

Marcel,

This fixes the problem with console redirected to /dev/null.

Regards,
    Victor.

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Victor
Shcherbatyuk
Sent: Friday, January 13, 2006 14:02 PM
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] Problems with smart phones when using
a"silent"kernel

I've checked, it is running, so the only option it has some issues with
console redirected to /dev/null... Will check the logs...

Regards,
    Victor. 

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Marcel
Holtmann
Sent: Friday, January 13, 2006 13:13 PM
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] Problems with smart phones when using
a"silent"kernel

Hi Victor,

> Small update. I've tried to connect with rfcomm tool - the same 
> behaviour. With the silent kernel it does not connect to Windows 
> Mobile phones. The logs show attempts to connect to the phone with
"normal"
> kernel (connection successful) and "silent" one (fails). PSM Not 
> Supported is something that probably goes wrong...

these stupid Microsoft devices. Everytime they get a connection, they
connect back to the SDP server of that device and this fails. So it
seems to me that the SDP daemon is not running or have problems with the
console redirected to /dev/null. Check in the log files for errors from
sdpd. Or you might need to use strace to track it.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


This e-mail message contains information which is confidential and may
be privileged. It is intended for use by the addressee only. If you are
not the intended addressee, we request that you notify the sender
immediately and delete or destroy this e-mail message and any
attachment(s), without copying, saving, forwarding, disclosing or using
its contents in any other way. TomTom N.V., TomTom International BV or
any other company belonging to the TomTom group of companies will not be
liable for damage relating to the communication by e-mail of data,
documents or any other information.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=ick
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel


This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.

[-- Attachment #2: sdpd_noconsole.patch --]
[-- Type: application/octet-stream, Size: 859 bytes --]

? sdpd_noconsole.patch
Index: sdpd/main.c
===================================================================
RCS file: /cvsroot/bluez/utils/sdpd/main.c,v
retrieving revision 1.13
diff -u -r1.13 main.c
--- sdpd/main.c	3 Jan 2006 13:29:01 -0000	1.13
+++ sdpd/main.c	16 Jan 2006 15:04:44 -0000
@@ -35,9 +35,11 @@
 #include <signal.h>
 #include <syslog.h>
 #include <getopt.h>
+#include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
+#include <sys/types.h>
 
 #include <bluetooth/bluetooth.h>
 #include <bluetooth/l2cap.h>
@@ -301,8 +303,13 @@
 			return 0;
 		setsid();
 	}
-	for (fd = 0; fd < 3; fd++)
-		close(fd);
+	if ((fd = open("/dev/null", O_RDWR, 0)) != -1) {
+		dup2(fd, STDIN_FILENO);
+		dup2(fd, STDOUT_FILENO);
+		dup2(fd, STDERR_FILENO);
+		if (fd > STDERR_FILENO)
+			close(fd);
+	}
 
 	chdir("/");
 	return 1;

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Problems with smart phones when using a"silent"kernel
  2006-01-16 15:13 Victor Shcherbatyuk
@ 2006-01-16 16:17 ` Dimitry Andric
  2006-01-16 16:21 ` Marcel Holtmann
  1 sibling, 0 replies; 12+ messages in thread
From: Dimitry Andric @ 2006-01-16 16:17 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

Victor Shcherbatyuk wrote:
> This fixes the problem with console redirected to /dev/null.
---snip---
> +		dup2(fd, STDIN_FILENO);
> +		dup2(fd, STDOUT_FILENO);
> +		dup2(fd, STDERR_FILENO);

Heheh, yet another reason to always use daemon(3) instead of rolling your own!



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a"silent"kernel
  2006-01-16 15:13 Victor Shcherbatyuk
  2006-01-16 16:17 ` Dimitry Andric
@ 2006-01-16 16:21 ` Marcel Holtmann
  2006-01-16 17:27   ` Bastien Nocera
  1 sibling, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2006-01-16 16:21 UTC (permalink / raw)
  To: bluez-devel

Hi Victor,

> This fixes the problem with console redirected to /dev/null.

I applied your patch to the CVS, but is this the best way to redirect
stdin, stdout and stderr to /dev/null?

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a"silent"kernel
  2006-01-16 16:21 ` Marcel Holtmann
@ 2006-01-16 17:27   ` Bastien Nocera
  0 siblings, 0 replies; 12+ messages in thread
From: Bastien Nocera @ 2006-01-16 17:27 UTC (permalink / raw)
  To: bluez-devel

On Mon, 2006-01-16 at 17:21 +0100, Marcel Holtmann wrote:
> Hi Victor,
> 
> > This fixes the problem with console redirected to /dev/null.
> 
> I applied your patch to the CVS, but is this the best way to redirect
> stdin, stdout and stderr to /dev/null?

As Dimitry mentioned, daemon(3) should help:
       Unless  the  argument noclose is non-zero, daemon() will redirect
stan-
       dard input, standard output and standard error to /dev/null.


---
Bastien Nocera <hadess@hadess.net> 




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a"silent"kernel
@ 2006-01-17 10:07 Victor Shcherbatyuk
  2006-01-17 10:43 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Victor Shcherbatyuk @ 2006-01-17 10:07 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

Marcel,

Now using daemon(3) .

Regards,
     Victor.

-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Dimitry
Andric
Sent: Monday, January 16, 2006 17:18 PM
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Problems with smart phones when using
a"silent"kernel

Victor Shcherbatyuk wrote:
> This fixes the problem with console redirected to /dev/null.
---snip---
> +		dup2(fd, STDIN_FILENO);
> +		dup2(fd, STDOUT_FILENO);
> +		dup2(fd, STDERR_FILENO);

Heheh, yet another reason to always use daemon(3) instead of rolling
your own!




This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.

[-- Attachment #2: sdpd_daemonize.patch --]
[-- Type: application/octet-stream, Size: 1601 bytes --]

Index: sdpd/main.c
===================================================================
RCS file: /cvsroot/bluez/utils/sdpd/main.c,v
retrieving revision 1.14
diff -u -r1.14 main.c
--- sdpd/main.c	16 Jan 2006 16:19:28 -0000	1.14
+++ sdpd/main.c	17 Jan 2006 10:01:48 -0000
@@ -30,7 +30,6 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <signal.h>
@@ -290,33 +289,6 @@
 	exit(0);
 }
 
-static int become_daemon(void)
-{
-	int fd;
-
-	if (getppid() != 1) {
-		signal(SIGTTOU, SIG_IGN);
-		signal(SIGTTIN, SIG_IGN);
-		signal(SIGTSTP, SIG_IGN);
-		if (fork())
-			return 0;
-		setsid();
-	}
-
-	fd = open("/dev/null", O_RDWR);
-	if (fd != -1) {
-		dup2(fd, STDIN_FILENO);
-		dup2(fd, STDOUT_FILENO);
-		dup2(fd, STDERR_FILENO);
-
-		if (fd > STDERR_FILENO)
-			close(fd);
-	}
-
-	chdir("/");
-	return 1;
-}
-
 static inline void handle_request(int sk, uint8_t *data, int len)
 {
 	struct sockaddr_l2 sa;
@@ -411,7 +383,7 @@
 
 int main(int argc, char **argv)
 {
-	int daemon = 1;
+	int daemonize = 1;
 	int master = 0;
 	int public = 0;
 	int opt;
@@ -419,7 +391,7 @@
 	while ((opt = getopt_long(argc, argv, "nmp", main_options, NULL)) != -1)
 		switch (opt) {
 		case 'n':
-			daemon = 0;
+			daemonize = 0;
 			break;
 		case 'm':
 			master = 1;
@@ -432,9 +404,10 @@
 			exit(0);
 		}
 	openlog("sdpd", LOG_PID | LOG_NDELAY, LOG_DAEMON);
-	
-	if (daemon && !become_daemon())
-		return 0;
+	if (daemonize && daemon(0, 0)) {
+		SDPERR("Server startup failed:%s", strerror(errno));
+		return -1;
+	}
 
 	argc -= optind;
 	argv += optind;

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [Bluez-devel] Problems with smart phones when using a"silent"kernel
  2006-01-17 10:07 [Bluez-devel] Problems with smart phones when using a"silent"kernel Victor Shcherbatyuk
@ 2006-01-17 10:43 ` Marcel Holtmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcel Holtmann @ 2006-01-17 10:43 UTC (permalink / raw)
  To: bluez-devel

Hi Victor,

> Now using daemon(3) .

the patch is in the CVS now. Thanks.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-01-17 10:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-17 10:07 [Bluez-devel] Problems with smart phones when using a"silent"kernel Victor Shcherbatyuk
2006-01-17 10:43 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2006-01-16 15:13 Victor Shcherbatyuk
2006-01-16 16:17 ` Dimitry Andric
2006-01-16 16:21 ` Marcel Holtmann
2006-01-16 17:27   ` Bastien Nocera
2006-01-13 13:01 Victor Shcherbatyuk
2006-01-13 11:39 [Bluez-devel] Problems with smart phones when using a "silent"kernel Victor Shcherbatyuk
2006-01-13 12:13 ` Marcel Holtmann
2006-01-12 13:35 Victor Shcherbatyuk
2006-01-12 10:19 [Bluez-devel] Problems with smart phones when using a "silent" kernel Victor Shchebatyuk
2006-01-12 13:27 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).