* Re: udev and bluetooth devices
@ 2004-11-08 15:44 derek.philip
2004-11-09 7:20 ` Marcel Holtmann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: derek.philip @ 2004-11-08 15:44 UTC (permalink / raw)
To: linux-hotplug
Hi Marcel
Thanks for your reply.
I would just like to make my situation a little clearer.
My reason for creating a persistent link is that I have at
least 8 USB Bluetooth dongles under test. the scripts I
use may restart them in a random order and I run the
chance of reconnecting to the wrong deive if I use say
hci0.
I'm not sure what you mean by use the BD_ADDR!
I currently use CSrs btcli hci tool for communicating to
the device.
I read in one of the udev howtos that it is possible to
rename the Ethernet interfaces, eth0, with a rule in udev.
Is it possible to do the same with hci0, Bluetooth
interfaces.
Thanks
Derek
>
> Hi Derek,
>
> > I was trying to write a rule to provide a persistent
naming for multiple
> > USB Bluetoot dongles. I need this for testing
purposes, as the devices
> > may be restarted at random times and I need to ensure
I'm speaking to
> > the same device.
> >
> > My attempts so far have failed!
> >
> > I have the following output from udevinfo -a
-p /sys/class/bluetooth/hci0
> >
> > looking at the device chain at
> > '/sys/devices/pci0000:00/0000:00:1d.2/usb2/2-1':
> > BUS="usb"
> > ID="2-1"
> > SYSFS{bConfigurationValue}="1"
> > SYSFS{bDeviceClass}="e0"
> > SYSFS{bDeviceProtocol}="01"
> > SYSFS{bDeviceSubClass}="01"
> > SYSFS{bMaxPower}="200mA"
> > SYSFS{bNumConfigurations}="1"
> > SYSFS{bNumInterfaces}=" 3"
> > SYSFS{bcdDevice}="1393"
> > SYSFS{bmAttributes}="80"
> > SYSFS{detach_state}="0"
> > SYSFS{devnum}="4"
> > SYSFS{idProduct}="0001"
> > SYSFS{idVendor}="0a12"
> > SYSFS{manufacturer}="Cambridge Silicon Radio"
> > SYSFS{maxchild}="0"
> > SYSFS{product}="CSR NanoSira"
> > SYSFS{serial}="012C5A-5B-0002"
> > SYSFS{speed}="12"
> > SYSFS{version}=" 2.00"
> >
> >
> > I was thinking that my rule would be
> >
> > BUS="usb", SYSFS{serial}="012C5A-5B-0002", name=%k
SYMLINK="Nano%n"
> >
> > This has no affect!
>
> Bluetooth devices don't use any device nodes. You can
identify them by
> their BD_ADDR.
>
> Regards
>
> Marcel
>
>
>
>
>
> --__--__--
>
> _______________________________________________
> Linux-hotplug-devel mailing list
> Linux-hotplug-devel@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
>
>
> End of Linux-hotplug-devel Digest
>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: udev and bluetooth devices
2004-11-08 15:44 udev and bluetooth devices derek.philip
@ 2004-11-09 7:20 ` Marcel Holtmann
2004-11-10 2:29 ` Marcel Holtmann
2004-11-12 1:55 ` Marcel Holtmann
2 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2004-11-09 7:20 UTC (permalink / raw)
To: linux-hotplug
Hi Derek,
> I would just like to make my situation a little clearer.
>
> My reason for creating a persistent link is that I have at
> least 8 USB Bluetooth dongles under test. the scripts I
> use may restart them in a random order and I run the
> chance of reconnecting to the wrong deive if I use say
> hci0.
>
> I'm not sure what you mean by use the BD_ADDR!
the BD_ADDR is the Bluetooth device address and since it is an IEEE
address like the Ethernet MAC address it is unique. You must use this
one to indentify your device.
> I currently use CSrs btcli hci tool for communicating to
> the device.
I heard rumors about a Linux version of btcli, but actually this is not
an open source tool as far as I know and so I can't help here.
> I read in one of the udev howtos that it is possible to
> rename the Ethernet interfaces, eth0, with a rule in udev.
>
> Is it possible to do the same with hci0, Bluetooth
> interfaces.
We don't support renaming of the hciX interface names and it is not
really needed, because when it comes to higher layers like L2CAP and
RFCOMM you simply fill in the BD_ADDR of your local device as the source
address.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev and bluetooth devices
2004-11-08 15:44 udev and bluetooth devices derek.philip
2004-11-09 7:20 ` Marcel Holtmann
@ 2004-11-10 2:29 ` Marcel Holtmann
2004-11-12 1:55 ` Marcel Holtmann
2 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2004-11-10 2:29 UTC (permalink / raw)
To: linux-hotplug
Hi Derek,
> So basicly I can't get a persistent name for a Bluetooth device on USB
> using udev!
the simple answer is no.
> I suppose I could do a script level tool that looked at the BD_ADDR and
> created an alias for which hciX it is on.
You haven't read my previous email? Did you? The Bluetooth HCI device
don't have any device nodes in /dev.
> This would have to monitor for a restart and use hciconfig to get the
> bluetooth address from that, then create the alias or environment variable.
Wrong way. Change the program to work with BD_ADDRs instead of hci0 etc.
The Bluetooth library makes it possible to do this.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev and bluetooth devices
2004-11-08 15:44 udev and bluetooth devices derek.philip
2004-11-09 7:20 ` Marcel Holtmann
2004-11-10 2:29 ` Marcel Holtmann
@ 2004-11-12 1:55 ` Marcel Holtmann
2 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2004-11-12 1:55 UTC (permalink / raw)
To: linux-hotplug
Hi Derek,
> > > I suppose I could do a script level tool that looked at the BD_ADDR and
> > > created an alias for which hciX it is on.
> >
> > You haven't read my previous email? Did you? The Bluetooth HCI device
>
> Yes I did,I was thinking more along the lines that at the script level a script would look at a variable of some description, which is constant, and use its contents to determine which hciX to use. This variable would be populated by another process that monitored the coming and going of Bluetooth devices.
maybe possible, but it looks messy to me.
> > don't have any device nodes in /dev.
> >
> > > This would have to monitor for a restart and use hciconfig to get the
> > > bluetooth address from that, then create the alias or environment variable.
> >
> > Wrong way. Change the program to work with BD_ADDRs instead of hci0 etc.
> > The Bluetooth library makes it possible to do this.
> >
> Do you have any pointers for this maybe I can persuade te btcli authors to produce a variant!
The btcli is CSR specific and actually I never saw the Linux version of
it. You got it, so you may ask your CSR contact for this extension.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-12 1:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-08 15:44 udev and bluetooth devices derek.philip
2004-11-09 7:20 ` Marcel Holtmann
2004-11-10 2:29 ` Marcel Holtmann
2004-11-12 1:55 ` 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).