* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
@ 2008-08-13 6:46 ` Aras Vaichas
2008-08-13 8:58 ` Kay Sievers
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Aras Vaichas @ 2008-08-13 6:46 UTC (permalink / raw)
To: linux-hotplug
Aras Vaichas wrote:
> Events caused by trying to connect to the USB Bluetooth dongle from
> another Bluetooth device:
I also noticed that I receive a PM log message just before the uevents
are generated.
PM: Removing info for bluetooth:acl000F3D5F7205
PM: Adding info for bluetooth:acl000F3D5F7205
PM: Adding info for No Bus:rfcomm0
PM: Adding info for No Bus:ppp0
How can I filter out the uevents triggered by the PM system?
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
2008-08-13 6:46 ` Aras Vaichas
@ 2008-08-13 8:58 ` Kay Sievers
2008-08-14 0:09 ` Aras Vaichas
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2008-08-13 8:58 UTC (permalink / raw)
To: linux-hotplug
On Wed, Aug 13, 2008 at 06:04, Aras Vaichas <arasv@magtech.com.au> wrote:
> Hi, I'm currently integrating runit and udev. I have a udev rule which
> runs my Blue-Z startup scripts when I plug in the USB BT dongle:
>
> ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
>
> This works really well, cold plugging, etc. No problems.
>
> I've found an interesting quirk though. Here is the sequence of events:
>
> Computer A: I start up my system with the BT dongle inserted, the Blue-Z
> scripts are started via udev coldplugging script
> Computer B: I set up a task which searches for BT devices and tries to
> form a PPP connection
> Computer B: Detects the BT dongle on Computer A, records the address and
> forms a PPP connection
> Computer A: I disable the Blue-Z scripts # sv down bluetooth
> Computer B: Attempts to connect to A again, and sends a BT signal to
> connect ...
> Computer A: The BT dongle sends a wireless wakeup (wake-on-lan?) signal
> which causes udev to run the Blue-Z utils startup script again ...
>
> I looked at the udev events to see what was happening when Computer B
> tried to connect to Computer A. It appears that the two series of events
> are nearly identical. Can someone suggest a way for me to start the
> Blue-Z utils *only* when the USB dongle is *inserted* (or first detected).
Match only on the the hci* creation events?
ACTION="add", KERNEL="hci[0-9]*", SUBSYSTEM="bluetooth",
RUN+="/usr/bin/sv up bluetooth"
Kay
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
2008-08-13 6:46 ` Aras Vaichas
2008-08-13 8:58 ` Kay Sievers
@ 2008-08-14 0:09 ` Aras Vaichas
2008-08-14 12:31 ` Sujit Karataparambil
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Aras Vaichas @ 2008-08-14 0:09 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
> On Wed, Aug 13, 2008 at 06:04, Aras Vaichas <arasv@magtech.com.au> wrote:
>
>> Hi, I'm currently integrating runit and udev. I have a udev rule which
>> runs my Blue-Z startup scripts when I plug in the USB BT dongle:
>>
>> ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
>>
>> This works really well, cold plugging, etc. No problems.
>>
>> I've found an interesting quirk though. Here is the sequence of events:
>>
>> Computer A: I start up my system with the BT dongle inserted, the Blue-Z
>> scripts are started via udev coldplugging script
>> Computer B: I set up a task which searches for BT devices and tries to
>> form a PPP connection
>> Computer B: Detects the BT dongle on Computer A, records the address and
>> forms a PPP connection
>> Computer A: I disable the Blue-Z scripts # sv down bluetooth
>> Computer B: Attempts to connect to A again, and sends a BT signal to
>> connect ...
>> Computer A: The BT dongle sends a wireless wakeup (wake-on-lan?) signal
>> which causes udev to run the Blue-Z utils startup script again ...
>>
>> I looked at the udev events to see what was happening when Computer B
>> tried to connect to Computer A. It appears that the two series of events
>> are nearly identical. Can someone suggest a way for me to start the
>> Blue-Z utils *only* when the USB dongle is *inserted* (or first detected).
>>
>
> Match only on the the hci* creation events?
> ACTION="add", KERNEL="hci[0-9]*", SUBSYSTEM="bluetooth",
> RUN+="/usr/bin/sv up bluetooth"
Yes, that works. USB Bluetooth device insertion will trigger the
bluetooth scripts, but bluetooth network activity will not trigger the
script. This is good.
Thank you.
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
` (2 preceding siblings ...)
2008-08-14 0:09 ` Aras Vaichas
@ 2008-08-14 12:31 ` Sujit Karataparambil
2008-08-15 0:56 ` Aras Vaichas
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sujit Karataparambil @ 2008-08-14 12:31 UTC (permalink / raw)
To: linux-hotplug
On Wed, Aug 13, 2008 at 9:34 AM, Aras Vaichas <arasv@magtech.com.au> wrote:
>
> Hi, I'm currently integrating runit and udev. I have a udev rule which
> runs my Blue-Z startup scripts when I plug in the USB BT dongle:
>
> ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
>
Which is the bluetooth connectivity that this USB device is plugging to.
>
> This works really well, cold plugging, etc. No problems.
>
> I've found an interesting quirk though. Here is the sequence of events:
Here again ?? Bluetooth ??
>
> Computer A: I start up my system with the BT dongle inserted, the Blue-Z
> scripts are started via udev coldplugging script
> Computer B: I set up a task which searches for BT devices and tries to
> form a PPP connection
> Computer B: Detects the BT dongle on Computer A, records the address and
> forms a PPP connection
PPP With Bluetooth ???
> Computer A: I disable the Blue-Z scripts # sv down bluetooth
> Computer B: Attempts to connect to A again, and sends a BT signal to
> connect ...
> Computer A: The BT dongle sends a wireless wakeup (wake-on-lan?) signal
> which causes udev to run the Blue-Z utils startup script again ...
Bluetooth ?? PPP ???
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
` (3 preceding siblings ...)
2008-08-14 12:31 ` Sujit Karataparambil
@ 2008-08-15 0:56 ` Aras Vaichas
2008-08-15 2:50 ` Sujit Karataparambil
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Aras Vaichas @ 2008-08-15 0:56 UTC (permalink / raw)
To: linux-hotplug
Sujit Karataparambil wrote:
> On Wed, Aug 13, 2008 at 9:34 AM, Aras Vaichas <arasv@magtech.com.au> wrote:
>
>> Hi, I'm currently integrating runit and udev. I have a udev rule which
>> runs my Blue-Z startup scripts when I plug in the USB BT dongle:
>>
>> ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
>>
>>
>
> Which is the bluetooth connectivity that this USB device is plugging to.
>
>
>> This works really well, cold plugging, etc. No problems.
>>
>> I've found an interesting quirk though. Here is the sequence of events:
>>
>
> Here again ?? Bluetooth ??
>
>> Computer A: I start up my system with the BT dongle inserted, the Blue-Z
>> scripts are started via udev coldplugging script
>> Computer B: I set up a task which searches for BT devices and tries to
>> form a PPP connection
>> Computer B: Detects the BT dongle on Computer A, records the address and
>> forms a PPP connection
>>
>
> PPP With Bluetooth ???
>
>
>> Computer A: I disable the Blue-Z scripts # sv down bluetooth
>> Computer B: Attempts to connect to A again, and sends a BT signal to
>> connect ...
>> Computer A: The BT dongle sends a wireless wakeup (wake-on-lan?) signal
>> which causes udev to run the Blue-Z utils startup script again ...
>>
>
> Bluetooth ?? PPP ???
Sorry, but I do not understand what you are asking here. Can you please
write in proper sentences?
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
` (4 preceding siblings ...)
2008-08-15 0:56 ` Aras Vaichas
@ 2008-08-15 2:50 ` Sujit Karataparambil
2008-08-15 3:19 ` Aras Vaichas
2008-08-17 11:43 ` Sujit Karataparambil
7 siblings, 0 replies; 9+ messages in thread
From: Sujit Karataparambil @ 2008-08-15 2:50 UTC (permalink / raw)
To: linux-hotplug
I am Very Sorry with my english.
But the whole issue is what are trying to do while
1. connecting an bluetooth device with udev(USB).
2. using PPP with bluetooth.
3. Trying to form network topologies using PPP.
Still very sorry with my english.
Sorry,
Sujit
On 8/15/08, Aras Vaichas <arasv@magtech.com.au> wrote:
> Sujit Karataparambil wrote:
> > On Wed, Aug 13, 2008 at 9:34 AM, Aras Vaichas <arasv@magtech.com.au> wrote:
> >
> >> Hi, I'm currently integrating runit and udev. I have a udev rule which
> >> runs my Blue-Z startup scripts when I plug in the USB BT dongle:
> >>
> >> ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
> >>
> >>
> >
> > Which is the bluetooth connectivity that this USB device is plugging to.
> >
> >
> >> This works really well, cold plugging, etc. No problems.
> >>
> >> I've found an interesting quirk though. Here is the sequence of events:
> >>
> >
> > Here again ?? Bluetooth ??
> >
> >> Computer A: I start up my system with the BT dongle inserted, the Blue-Z
> >> scripts are started via udev coldplugging script
> >> Computer B: I set up a task which searches for BT devices and tries to
> >> form a PPP connection
> >> Computer B: Detects the BT dongle on Computer A, records the address and
> >> forms a PPP connection
> >>
> >
> > PPP With Bluetooth ???
> >
> >
> >> Computer A: I disable the Blue-Z scripts # sv down bluetooth
> >> Computer B: Attempts to connect to A again, and sends a BT signal to
> >> connect ...
> >> Computer A: The BT dongle sends a wireless wakeup (wake-on-lan?) signal
> >> which causes udev to run the Blue-Z utils startup script again ...
> >>
> >
> > Bluetooth ?? PPP ???
> Sorry, but I do not understand what you are asking here. Can you please
> write in proper sentences?
>
> Aras
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
` (5 preceding siblings ...)
2008-08-15 2:50 ` Sujit Karataparambil
@ 2008-08-15 3:19 ` Aras Vaichas
2008-08-17 11:43 ` Sujit Karataparambil
7 siblings, 0 replies; 9+ messages in thread
From: Aras Vaichas @ 2008-08-15 3:19 UTC (permalink / raw)
To: linux-hotplug
Sujit Karataparambil wrote:
> I am Very Sorry with my english.
>
> But the whole issue is what are trying to do while
> 1. connecting an bluetooth device with udev(USB).
> 2. using PPP with bluetooth.
> 3. Trying to form network topologies using PPP.
>
> Still very sorry with my english.
>
My question was answered by Kay in the second posting for this thread.
To summarise:
This will trigger on USB bluetooth device insertion *and* network
activity/wakeup:
ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
This will trigger *only* on USB Bluetooth device insertion (which is what I needed):
ACTION="add", KERNEL="hci[0-9]*", SUBSYSTEM="bluetooth",RUN+="/usr/bin/sv up bluetooth"
That's all there is to it.
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bluetooth wireless activity triggers udev rule
2008-08-13 4:04 Bluetooth wireless activity triggers udev rule Aras Vaichas
` (6 preceding siblings ...)
2008-08-15 3:19 ` Aras Vaichas
@ 2008-08-17 11:43 ` Sujit Karataparambil
7 siblings, 0 replies; 9+ messages in thread
From: Sujit Karataparambil @ 2008-08-17 11:43 UTC (permalink / raw)
To: linux-hotplug
Seems correct but, I have a doubt about this change from moving
since 2.6.15 on.
https://lists.ubuntu.com/archives/ubuntu-devel-announce/2005-December/000028.html
Do not know whether the posting has been moved to mainstream.
Also there seems to be some misnomer regarding hot plug from this
posting as seen in this, from the discussion we are having here.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug'4297
This seems to very current on Linux mainstream (2.6.8)
Sorry for my pessimism and English.
Just out of curiosity.
Thanks for your time on this,
Sujit
On 8/15/08, Aras Vaichas <arasv@magtech.com.au> wrote:
> Sujit Karataparambil wrote:
> > I am Very Sorry with my english.
> >
> > But the whole issue is what are trying to do while
> > 1. connecting an bluetooth device with udev(USB).
> > 2. using PPP with bluetooth.
> > 3. Trying to form network topologies using PPP.
> >
> > Still very sorry with my english.
> >
> My question was answered by Kay in the second posting for this thread.
>
> To summarise:
>
> This will trigger on USB bluetooth device insertion *and* network
> activity/wakeup:
>
> ACTION="add", ENV{SUBSYSTEM}="bluetooth", RUN+="/usr/bin/sv up bluetooth"
>
>
> This will trigger *only* on USB Bluetooth device insertion (which is what I needed):
> ACTION="add", KERNEL="hci[0-9]*", SUBSYSTEM="bluetooth",RUN+="/usr/bin/sv up bluetooth"
>
>
> That's all there is to it.
>
> Aras
>
>
>
>
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
^ permalink raw reply [flat|nested] 9+ messages in thread