All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] hotplug USB dongle problem
@ 2004-02-28 13:24 Pavel Ruzicka
  2004-02-28 13:52 ` Marcel Holtmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pavel Ruzicka @ 2004-02-28 13:24 UTC (permalink / raw)
  To: bluez-users

Hello,

I have configured Mandrake9.2 desktop with USB dongle.
I have kernel 2.6.2
When system is started, script /etc/rc.d/init.d/bluetooth
is executed and runs "hcid" and "sdpd". It's probably OK

When I plug in USB dongle, I want to run "pand --listen --role NAP".
I made /etc/hotplug/bluetooth.agent script, which is executed by hotplug 
mechanism after inserting bluetooth dongle.
bluetooth.agent:
------------------------------------------------------------------
#!/bin/bash
cd /etc/hotplug
. hotplug.functions

case $ACTION in
        add|register)
                pand --listen --role NAP
        ;;
        unregister)
                pand -K
        ;;
        *)
        debug_mesg Bluetooth \$ACTION event not supported
exit 1 ;;
esac
------------------------------------------------------------------

When I made connection from other side now, that connection is NOT 
established, and I found in log this message:
-----------------------
Feb 28 13:53:25 home pand[4470]: Connection failed. Inappropriate ioctl for 
device(25)
-----------------------

But, when I remove bluetooth.agent and run "pand --listen --role NAP" manually 
from shell, everything works fine.
I have /etc/sysconfig/network-scripts/ifcfg-bnep0:
----------------------------------
DEVICE=bnep0
BOOTPROTO=static
IPADDR=192.168.130.1
NETMASK=255.255.255.0
ONBOOT=no
----------------------------------
In this situation, when I click "Connect" on my Zaurus, that on my Mandrake 
desktop Interface bnep0 goes up due to hotplug.
Kernel runs /sbin/hotplug.
This script runs /etc/hotplug/net.agent, which makes "ifup bnep0".
I replaced this script with new from last hotplug package, because in Mandrake 
is old script without 2.6 kernel support ("add" on place "register").

When somebody experiments with hotplug, it's very useful uncomment this line 
in /sbin/hotplug:
-----------------------------------
DEBUG=yes export DEBUG
-----------------------------------

This is log from /var/log/messages, when I insert USB dongle and I have 
/etc/hotplug/bluetooth.agent on place:
-------------------------------------------------------------------------------------
Feb 28 14:15:21 home kernel: usb 2-1: new full speed USB device using address 
14
Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1 
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
DEBUG=yes SEQNUM=254 _=/bin/env)
Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1:1.0 
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
DEVICE=/proc/bus/usb/002/014 PRODUCT=db0/6970/525 TYPE=224/1/1 DEBUG=yes 
SEQNUM=255 _=/bin/env)
Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Feb 28 14:15:21 home /sbin/hotplug: arguments (bluetooth) env (OLDPWD=/ 
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=register PWD=/etc/hotplug SHLVL=1 
HOME=/ DEVICE=hci0 DEBUG=yes _=/bin/env)
Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/bluetooth.agent ()
Feb 28 14:15:21 home pand[4814]: PAN daemon ver 1.1
Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1:1.1 
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
DEVICE=/proc/bus/usb/002/014 PRODUCT=db0/6970/525 TYPE=224/1/1 DEBUG=yes 
SEQNUM=256 _=/bin/env)
Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Feb 28 14:15:21 home /etc/hotplug/usb.agent: Setup hci_usb for USB product 
db0/6970/525
Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1:1.2 
PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
DEVICE=/proc/bus/usb/002/014 PRODUCT=db0/6970/525 TYPE=224/1/1 DEBUG=yes 
SEQNUM=257 _=/bin/env)
Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Feb 28 14:15:21 home hcid[2190]: HCI dev 0 registered
Feb 28 14:15:21 home /etc/hotplug/usb.agent: Setup hci_usb for USB product 
db0/6970/525
Feb 28 14:15:21 home hcid[2190]: HCI dev 0 up
Feb 28 14:15:21 home hcid[2190]: Starting security manager 0
Feb 28 14:15:22 home /etc/hotplug/usb.agent: Setup hci_usb for USB product 
db0/6970/525
------------------------------------------------------------------------------------------------

Can somebody help me, what can be wrong?
What is right place for starting "pand"?

Thanks,

Pavel Ruzicka



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] hotplug USB dongle problem
  2004-02-28 13:24 [Bluez-users] hotplug USB dongle problem Pavel Ruzicka
@ 2004-02-28 13:52 ` Marcel Holtmann
  2004-02-28 14:49   ` Pavel Ruzicka
  2004-02-28 14:12 ` wim delvaux
  2004-03-02 13:00 ` Stephen Crane
  2 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2004-02-28 13:52 UTC (permalink / raw)
  To: Pavel Ruzicka; +Cc: BlueZ Mailing List

Hi Pavel,

> I have configured Mandrake9.2 desktop with USB dongle.
> I have kernel 2.6.2
> When system is started, script /etc/rc.d/init.d/bluetooth
> is executed and runs "hcid" and "sdpd". It's probably OK
> 
> When I plug in USB dongle, I want to run "pand --listen --role NAP".
> I made /etc/hotplug/bluetooth.agent script, which is executed by hotplug 
> mechanism after inserting bluetooth dongle.
> bluetooth.agent:

don't start pand from bluetooth.agent script. Start it from the init
script.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] hotplug USB dongle problem
  2004-02-28 13:24 [Bluez-users] hotplug USB dongle problem Pavel Ruzicka
  2004-02-28 13:52 ` Marcel Holtmann
@ 2004-02-28 14:12 ` wim delvaux
  2004-03-02 13:00 ` Stephen Crane
  2 siblings, 0 replies; 7+ messages in thread
From: wim delvaux @ 2004-02-28 14:12 UTC (permalink / raw)
  To: Pavel Ruzicka, bluez-users

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

i 'think' that it is because hcid and sdpd are started too soon.  I have moved 
the startup of these daemons to the bluetooth.agent script too (attached)

W


[-- Attachment #2: bluetooth.agent --]
[-- Type: application/x-shellscript, Size: 737 bytes --]

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

* Re: [Bluez-users] hotplug USB dongle problem
  2004-02-28 13:52 ` Marcel Holtmann
@ 2004-02-28 14:49   ` Pavel Ruzicka
  2004-02-28 15:19     ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Ruzicka @ 2004-02-28 14:49 UTC (permalink / raw)
  To: BlueZ Mailing List

Hello,

> > I have configured Mandrake9.2 desktop with USB dongle.
> > I have kernel 2.6.2
>
> don't start pand from bluetooth.agent script. Start it from the init
> script.

Thanks for help, it works now.
I start hcid, sdpd, pand from init script.

What is the right sequence for killing these daemons?
Original script kills hcid and sdpd.
I'am killing in reverse sequence:
pand, sdpd, hcid.

Best regards,

Pavel Ruzicka



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] hotplug USB dongle problem
  2004-02-28 14:49   ` Pavel Ruzicka
@ 2004-02-28 15:19     ` Marcel Holtmann
  0 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2004-02-28 15:19 UTC (permalink / raw)
  To: Pavel Ruzicka; +Cc: BlueZ Mailing List

Hi Pavel,

> I start hcid, sdpd, pand from init script.
> 
> What is the right sequence for killing these daemons?
> Original script kills hcid and sdpd.
> I'am killing in reverse sequence:
> pand, sdpd, hcid.

it don't really matters, but in general using a reverse sequence is the
best way.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] hotplug USB dongle problem
  2004-02-28 13:24 [Bluez-users] hotplug USB dongle problem Pavel Ruzicka
  2004-02-28 13:52 ` Marcel Holtmann
  2004-02-28 14:12 ` wim delvaux
@ 2004-03-02 13:00 ` Stephen Crane
  2004-03-02 21:42   ` Pavel Ruzicka
  2 siblings, 1 reply; 7+ messages in thread
From: Stephen Crane @ 2004-03-02 13:00 UTC (permalink / raw)
  To: Pavel Ruzicka; +Cc: bluez-users

Hi Pavel,
Did you update hotplug? The invocation syntax changed with kernel 2.6.

Cheers,
Steve

On Sat, 2004-02-28 at 13:24, Pavel Ruzicka wrote:
> Hello,
> 
> I have configured Mandrake9.2 desktop with USB dongle.
> I have kernel 2.6.2
> When system is started, script /etc/rc.d/init.d/bluetooth
> is executed and runs "hcid" and "sdpd". It's probably OK
> 
> When I plug in USB dongle, I want to run "pand --listen --role NAP".
> I made /etc/hotplug/bluetooth.agent script, which is executed by hotplug 
> mechanism after inserting bluetooth dongle.
> bluetooth.agent:
> ------------------------------------------------------------------
> #!/bin/bash
> cd /etc/hotplug
> . hotplug.functions
> 
> case $ACTION in
>         add|register)
>                 pand --listen --role NAP
>         ;;
>         unregister)
>                 pand -K
>         ;;
>         *)
>         debug_mesg Bluetooth \$ACTION event not supported
> exit 1 ;;
> esac
> ------------------------------------------------------------------
> 
> When I made connection from other side now, that connection is NOT 
> established, and I found in log this message:
> -----------------------
> Feb 28 13:53:25 home pand[4470]: Connection failed. Inappropriate ioctl for 
> device(25)
> -----------------------
> 
> But, when I remove bluetooth.agent and run "pand --listen --role NAP" manually 
> from shell, everything works fine.
> I have /etc/sysconfig/network-scripts/ifcfg-bnep0:
> ----------------------------------
> DEVICE=bnep0
> BOOTPROTO=static
> IPADDR=192.168.130.1
> NETMASK=255.255.255.0
> ONBOOT=no
> ----------------------------------
> In this situation, when I click "Connect" on my Zaurus, that on my Mandrake 
> desktop Interface bnep0 goes up due to hotplug.
> Kernel runs /sbin/hotplug.
> This script runs /etc/hotplug/net.agent, which makes "ifup bnep0".
> I replaced this script with new from last hotplug package, because in Mandrake 
> is old script without 2.6 kernel support ("add" on place "register").
> 
> When somebody experiments with hotplug, it's very useful uncomment this line 
> in /sbin/hotplug:
> -----------------------------------
> DEBUG=yes export DEBUG
> -----------------------------------
> 
> This is log from /var/log/messages, when I insert USB dongle and I have 
> /etc/hotplug/bluetooth.agent on place:
> -------------------------------------------------------------------------------------
> Feb 28 14:15:21 home kernel: usb 2-1: new full speed USB device using address 
> 14
> Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
> DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1 
> PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
> DEBUG=yes SEQNUM=254 _=/bin/env)
> Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
> Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
> DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1:1.0 
> PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
> DEVICE=/proc/bus/usb/002/014 PRODUCT=db0/6970/525 TYPE=224/1/1 DEBUG=yes 
> SEQNUM=255 _=/bin/env)
> Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
> Feb 28 14:15:21 home /sbin/hotplug: arguments (bluetooth) env (OLDPWD=/ 
> PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=register PWD=/etc/hotplug SHLVL=1 
> HOME=/ DEVICE=hci0 DEBUG=yes _=/bin/env)
> Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/bluetooth.agent ()
> Feb 28 14:15:21 home pand[4814]: PAN daemon ver 1.1
> Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
> DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1:1.1 
> PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
> DEVICE=/proc/bus/usb/002/014 PRODUCT=db0/6970/525 TYPE=224/1/1 DEBUG=yes 
> SEQNUM=256 _=/bin/env)
> Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
> Feb 28 14:15:21 home /etc/hotplug/usb.agent: Setup hci_usb for USB product 
> db0/6970/525
> Feb 28 14:15:21 home /sbin/hotplug: arguments (usb) env (OLDPWD=/ 
> DEVPATH=/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1:1.2 
> PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ 
> DEVICE=/proc/bus/usb/002/014 PRODUCT=db0/6970/525 TYPE=224/1/1 DEBUG=yes 
> SEQNUM=257 _=/bin/env)
> Feb 28 14:15:21 home /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
> Feb 28 14:15:21 home hcid[2190]: HCI dev 0 registered
> Feb 28 14:15:21 home /etc/hotplug/usb.agent: Setup hci_usb for USB product 
> db0/6970/525
> Feb 28 14:15:21 home hcid[2190]: HCI dev 0 up
> Feb 28 14:15:21 home hcid[2190]: Starting security manager 0
> Feb 28 14:15:22 home /etc/hotplug/usb.agent: Setup hci_usb for USB product 
> db0/6970/525
> ------------------------------------------------------------------------------------------------
> 
> Can somebody help me, what can be wrong?
> What is right place for starting "pand"?
> 
> Thanks,
> 
> Pavel Ruzicka
> 
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
-- 
Stephen Crane, Rococo Software Ltd. http://www.rococosoft.com
steve.crane@rococosoft.com +353-1-6601315 (ext 209)



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] hotplug USB dongle problem
  2004-03-02 13:00 ` Stephen Crane
@ 2004-03-02 21:42   ` Pavel Ruzicka
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Ruzicka @ 2004-03-02 21:42 UTC (permalink / raw)
  To: bluez-users

Hello,

> Did you update hotplug? The invocation syntax changed with kernel 2.6.

Yes I update hotplug. There are "add" on place of "register".
Problem was probably in starting order. I am starting hcid, sdpd and pand
from rc script now. With hotplug only bnep0 device is initialized from
net.agent in /etc/hotplug.

Best regards,

Pavouk



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

end of thread, other threads:[~2004-03-02 21:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-28 13:24 [Bluez-users] hotplug USB dongle problem Pavel Ruzicka
2004-02-28 13:52 ` Marcel Holtmann
2004-02-28 14:49   ` Pavel Ruzicka
2004-02-28 15:19     ` Marcel Holtmann
2004-02-28 14:12 ` wim delvaux
2004-03-02 13:00 ` Stephen Crane
2004-03-02 21:42   ` Pavel Ruzicka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.