Re: Renaming hci interfaces with udev

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

 



On Tue, Jul 28, 2009 at 12:34:38PM +0100, Bastien Nocera wrote:
> On Tue, 2009-07-28 at 10:37 +0200, Andrej Rosano wrote:
> > Hi,
> > I would like to change the default name of bluetooth interfaces (hci0, hci1, ...)
> > using udev rules.
> 
> Could I ask why you want to do that?

I have more than one bt dongle connected to the box and I would like to assign always
the same bluetooth name (the one set with hciconfig hciX name ...), ex:

the one with BD_ADDR=xx:yy:zz:00:00:01  ->  foo
the one with BD_ADDR=xx:yy:zz:00:00:02  ->  bar
...


If one could use the udev persistent rules like with ethernet interfaces:

ACTION=="add", KERNEL=="hci*", ATTR{address}=="xx:yy:zz:00:00:01", NAME="hci0"
ACTION=="add", KERNEL=="hci*", ATTR{address}=="xx:yy:zz:00:00:02", NAME="hci1"
...

and then set the appropriate bluetooth name:

hciconfig hci0 name foo
hciconfig hci1 name bar
...

Currently I am using a script to do that.

Regards,
Andrej

-- 
Andrej Rosano                                               <andrejro@xxxxxxxxx>
0x7B470744                    E5DF 7810 AD63 A215 2D0E  AF56 53C7 A2CB 7B47 0744
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux