* [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device
@ 2007-04-16 18:36 Volker Christian
2007-04-16 20:54 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Volker Christian @ 2007-04-16 18:36 UTC (permalink / raw)
To: bluez-devel
Hi,
the man-page of hcid.conf describes how to configure more than one bluetooth
devices installed on one machine.
It says:
----------------------
nn:nn:nn:nn:nn:nn
Parameters specified within this section will be
applied to the device with this device bluetooth
address. All other parameters are applied from the
default section.
----------------------
This is broken in the current (3.9) and previous version of the bluez-utils.
The current debian-package is also affected.
Following patch to main.c of the hcid fixis this problem:
--- main.c-orig 2007-04-16 20:23:41.000000000 +0200
+++ main.c 2007-04-16 20:22:30.000000000 +0200
@@ -124,7 +124,7 @@
struct hci_dev_info di;
/* First try to get BD_ADDR based settings ... */
- if (!hci_devinfo(hdev, &di) < 0) {
+ if (!(hci_devinfo(hdev, &di) < 0)) {
char addr[18];
ba2str(&di.bdaddr, addr);
device_opts = find_device_opts(addr);
best regards
voc
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device
2007-04-16 18:36 [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device Volker Christian
@ 2007-04-16 20:54 ` Marcel Holtmann
2007-04-16 21:26 ` Volker Christian
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2007-04-16 20:54 UTC (permalink / raw)
To: BlueZ development
Hi Volker,
> the man-page of hcid.conf describes how to configure more than one bluetooth
> devices installed on one machine.
> It says:
> ----------------------
> nn:nn:nn:nn:nn:nn
>
> Parameters specified within this section will be
> applied to the device with this device bluetooth
> address. All other parameters are applied from the
> default section.
> ----------------------
> This is broken in the current (3.9) and previous version of the bluez-utils.
> The current debian-package is also affected.
>
> Following patch to main.c of the hcid fixis this problem:
>
> --- main.c-orig 2007-04-16 20:23:41.000000000 +0200
> +++ main.c 2007-04-16 20:22:30.000000000 +0200
> @@ -124,7 +124,7 @@
> struct hci_dev_info di;
>
> /* First try to get BD_ADDR based settings ... */
> - if (!hci_devinfo(hdev, &di) < 0) {
> + if (!(hci_devinfo(hdev, &di) < 0)) {
> char addr[18];
> ba2str(&di.bdaddr, addr);
> device_opts = find_device_opts(addr);
does "if (hci_devinfo(hdev, &di) == 0) {" also work for you?
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device
2007-04-16 20:54 ` Marcel Holtmann
@ 2007-04-16 21:26 ` Volker Christian
2007-04-18 23:41 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Volker Christian @ 2007-04-16 21:26 UTC (permalink / raw)
To: bluez-devel; +Cc: Marcel Holtmann
Hi Marcel,
On Monday 16 April 2007 22:54, Marcel Holtmann wrote:
> Hi Volker,
>
> > the man-page of hcid.conf describes how to configure more than one
> > bluetooth devices installed on one machine.
> > It says:
> > ----------------------
> > nn:nn:nn:nn:nn:nn
> >
> > Parameters specified within this section will be
> > applied to the device with this device bluetooth
> > address. All other parameters are applied from the
> > default section.
> > ----------------------
> > This is broken in the current (3.9) and previous version of the
> > bluez-utils. The current debian-package is also affected.
> >
> > Following patch to main.c of the hcid fixis this problem:
> >
> > --- main.c-orig 2007-04-16 20:23:41.000000000 +0200
> > +++ main.c 2007-04-16 20:22:30.000000000 +0200
> > @@ -124,7 +124,7 @@
> > struct hci_dev_info di;
> >
> > /* First try to get BD_ADDR based settings ... */
> > - if (!hci_devinfo(hdev, &di) < 0) {
> > + if (!(hci_devinfo(hdev, &di) < 0)) {
> > char addr[18];
> > ba2str(&di.bdaddr, addr);
> > device_opts = find_device_opts(addr);
>
> does "if (hci_devinfo(hdev, &di) == 0) {" also work for you?
Yes, it also works, and it has to work. As i remember correctly, the return
value of hci_devinfo is the return value of an ioctl-call which succeeds
(return value 0). So hci_devinfo(...) == 0 does the job also.
regards
voc
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device
2007-04-16 21:26 ` Volker Christian
@ 2007-04-18 23:41 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2007-04-18 23:41 UTC (permalink / raw)
To: Volker Christian; +Cc: bluez-devel
Hi Volker,
> > > the man-page of hcid.conf describes how to configure more than one
> > > bluetooth devices installed on one machine.
> > > It says:
> > > ----------------------
> > > nn:nn:nn:nn:nn:nn
> > >
> > > Parameters specified within this section will be
> > > applied to the device with this device bluetooth
> > > address. All other parameters are applied from the
> > > default section.
> > > ----------------------
> > > This is broken in the current (3.9) and previous version of the
> > > bluez-utils. The current debian-package is also affected.
> > >
> > > Following patch to main.c of the hcid fixis this problem:
> > >
> > > --- main.c-orig 2007-04-16 20:23:41.000000000 +0200
> > > +++ main.c 2007-04-16 20:22:30.000000000 +0200
> > > @@ -124,7 +124,7 @@
> > > struct hci_dev_info di;
> > >
> > > /* First try to get BD_ADDR based settings ... */
> > > - if (!hci_devinfo(hdev, &di) < 0) {
> > > + if (!(hci_devinfo(hdev, &di) < 0)) {
> > > char addr[18];
> > > ba2str(&di.bdaddr, addr);
> > > device_opts = find_device_opts(addr);
> >
> > does "if (hci_devinfo(hdev, &di) == 0) {" also work for you?
> Yes, it also works, and it has to work. As i remember correctly, the return
> value of hci_devinfo is the return value of an ioctl-call which succeeds
> (return value 0). So hci_devinfo(...) == 0 does the job also.
this code is readable, the other version was twisting my mind. Patch is
in the CVS now.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-18 23:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-16 18:36 [Bluez-devel] Bug in hcid prevents naming of devices by means of the bluetooth-address of a device Volker Christian
2007-04-16 20:54 ` Marcel Holtmann
2007-04-16 21:26 ` Volker Christian
2007-04-18 23:41 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox