List Info

Thread: HCI - HID proxy




HCI - HID proxy
country flaguser name
Portugal
2007-07-11 21:37:38
Hi,
For my SoC project I developed a userland utility that
switches an
ubt(4) controller from HID to HCI and vice versa.

I have some design issues still being worked out, namely:
1) What's the best way to integrate this into the existing
bluetooth
utilities ? Create a new utility called, for example,
ubthid2hci ? Name
suggestions are welcome.

2) According to the hid2hci Linux utility, there are several
dongles out
there that need this tweak in order to work. I was thinking
we could
create a text file with the vendors/products and their
bootup mode (HCI
or HID); use ubthid2hci to read that file and then switch
the device to
HCI mode (or HID mode if the user requested it).
This is mostly what the Linux hid2hci utility does, except
that the
vendor/product table is inside the program.

3) Fix libusb and use hid2hci on FreeBSD.


Comments?

Regards.
-- 
Rui Paulo
_______________________________________________
freebsd-bluetoothfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-blu
etooth
To unsubscribe, send any mail to
"freebsd-bluetooth-unsubscribefreebsd.org"

Re: HCI - HID proxy
country flaguser name
Portugal
2007-07-12 12:21:05
Anish Mistry wrote:
> On Wednesday 11 July 2007, Rui Paulo wrote:
>> Hi,
>> For my SoC project I developed a userland utility
that switches an
>> ubt(4) controller from HID to HCI and vice versa.
>>
>> I have some design issues still being worked out,
namely:
>> 1) What's the best way to integrate this into the
existing
>> bluetooth utilities ? Create a new utility called,
for example,
>> ubthid2hci ? Name suggestions are welcome.
> If you haven't seen it, I created a utility just for
logitech devices 
> a while back.
> http://lists.freebsd.org/pipermail
/freebsd-bluetooth/2006-December/000824.html

Cool, that's something we also need. 

> 
>> 2) According to the hid2hci Linux utility, there
are several
>> dongles out there that need this tweak in order to
work. I was
>> thinking we could create a text file with the
vendors/products and
>> their bootup mode (HCI or HID); use ubthid2hci to
read that file
>> and then switch the device to HCI mode (or HID mode
if the user
>> requested it).
>> This is mostly what the Linux hid2hci utility does,
except that the
>> vendor/product table is inside the program.
>
> Couldn't we create something that is run through devd
and the checks 
> options from rc.conf?  So we'd have that table file you
mention, and 
> we could put the enable/disable options in the rc.conf
file. eg.
> ubthid2hci_enable="YES"
> ubthid2hci_flags="list of vendor/product id pairs
here that we want to 
> be used as HCI devices"

I would prefer if this list was a file and not a command
line. Maybe
/usr/share/misc/usb_hidhci_map.
Anyway, if you want to use devd it would be something like:

attach 100 {
        match "vendor"  "0x05ac";
        match "product" "0x1000";
        action "/usr/bin/ubthid2hci -m 0
$device-name";
};

And then repeat this for every device that needs to be
switched to HCI mode.
This has the problem of not being able to switch the device
to HID mode
because when you try to do that, devd will automatically
switch it back
to HCI mode if this attach rule is present. I don't think
this is a
serious issue because the HID mode is normally only needed
before the
operating system has booted.

>> 3) Fix libusb and use hid2hci on FreeBSD.
> Isn't hid2hci GPL'd?  We'd want a BSD licensed utility
since it'd be 
> in the base.

Yes, when I suggested this it had the implication of using
hid2hci from
ports.


-- 
Rui Paulo
_______________________________________________
freebsd-bluetoothfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-blu
etooth
To unsubscribe, send any mail to
"freebsd-bluetooth-unsubscribefreebsd.org"

Re: HCI - HID proxy
country flaguser name
United States
2007-07-12 12:07:28
On Wednesday 11 July 2007, Rui Paulo wrote:
> Hi,
> For my SoC project I developed a userland utility that
switches an
> ubt(4) controller from HID to HCI and vice versa.
>
> I have some design issues still being worked out,
namely:
> 1) What's the best way to integrate this into the
existing
> bluetooth utilities ? Create a new utility called, for
example,
> ubthid2hci ? Name suggestions are welcome.
If you haven't seen it, I created a utility just for
logitech devices 
a while back.
http://lists.freebsd.org/pipermail
/freebsd-bluetooth/2006-December/000824.html

> 2) According to the hid2hci Linux utility, there are
several
> dongles out there that need this tweak in order to
work. I was
> thinking we could create a text file with the
vendors/products and
> their bootup mode (HCI or HID); use ubthid2hci to read
that file
> and then switch the device to HCI mode (or HID mode if
the user
> requested it).
> This is mostly what the Linux hid2hci utility does,
except that the
> vendor/product table is inside the program.
Couldn't we create something that is run through devd and
the checks 
options from rc.conf?  So we'd have that table file you
mention, and 
we could put the enable/disable options in the rc.conf file.
eg.
ubthid2hci_enable="YES"
ubthid2hci_flags="list of vendor/product id pairs here
that we want to 
be used as HCI devices"

> 3) Fix libusb and use hid2hci on FreeBSD.
Isn't hid2hci GPL'd?  We'd want a BSD licensed utility since
it'd be 
in the base.

> Comments?
Looking forward to your results, as it will make life with
these 
devices much easier. 

-- 
Anish Mistry
amistryam-productions.biz
AM Productions http://am-productions.biz/

Re: HCI - HID proxy
country flaguser name
United States
2007-07-12 12:47:20
On Thursday 12 July 2007, you wrote:
> Anish Mistry wrote:
> > On Wednesday 11 July 2007, Rui Paulo wrote:
> >> Hi,
> >> For my SoC project I developed a userland
utility that switches
> >> an ubt(4) controller from HID to HCI and vice
versa.
> >>
> >> I have some design issues still being worked
out, namely:
> >> 1) What's the best way to integrate this into
the existing
> >> bluetooth utilities ? Create a new utility
called, for example,
> >> ubthid2hci ? Name suggestions are welcome.
> >
> > If you haven't seen it, I created a utility just
for logitech
> > devices a while back.
> > http://lists.freebsd.org/pipermail/freebsd-blue
tooth/2006-Decembe
> >r/000824.html
>
> Cool, that's something we also need. 
>
> >> 2) According to the hid2hci Linux utility,
there are several
> >> dongles out there that need this tweak in
order to work. I was
> >> thinking we could create a text file with the
vendors/products
> >> and their bootup mode (HCI or HID); use
ubthid2hci to read that
> >> file and then switch the device to HCI mode
(or HID mode if the
> >> user requested it).
> >> This is mostly what the Linux hid2hci utility
does, except that
> >> the vendor/product table is inside the
program.
> >
> > Couldn't we create something that is run through
devd and the
> > checks options from rc.conf?  So we'd have that
table file you
> > mention, and we could put the enable/disable
options in the
> > rc.conf file. eg.
ubthid2hci_enable="YES"
> > ubthid2hci_flags="list of vendor/product id
pairs here that we
> > want to be used as HCI devices"
>
> I would prefer if this list was a file and not a
command line.
> Maybe /usr/share/misc/usb_hidhci_map.
We could actually just make this make a devd includeable
config file 
using the "directory" directive for devd.conf.  So
this way if 
someone wanted an override they'd just created a custom
entry in 
devd.conf with a higher priority.

> Anyway, if you want to use devd it would be something
like:
>
> attach 100 {
>         match "vendor"  "0x05ac";
>         match "product" "0x1000";
>         action "/usr/bin/ubthid2hci -m 0
$device-name";
> };
>
> And then repeat this for every device that needs to be
switched to
> HCI mode. This has the problem of not being able to
switch the
> device to HID mode because when you try to do that,
devd will
> automatically switch it back to HCI mode if this attach
rule is
> present. I don't think this is a serious issue because
the HID mode
> is normally only needed before the operating system has
booted.
Right.  Actually that brings up a good point.  Is there a
way (API) 
that allows us to enable/disable certain devd entries at
runtime?  If 
not I think that this might be a useful feature.  If this
was 
available we'd then be able to programmatically disable an
entry when 
we want to switch back to HID mode without having to change
the 
devd.conf file.

> >> 3) Fix libusb and use hid2hci on FreeBSD.
> >
> > Isn't hid2hci GPL'd?  We'd want a BSD licensed
utility since it'd
> > be in the base.
>
> Yes, when I suggested this it had the implication of
using hid2hci
> from ports.
Ok.

-- 
Anish Mistry
amistryam-productions.biz
AM Productions http://am-productions.biz/

Re: HCI - HID proxy
country flaguser name
Portugal
2007-07-12 13:30:39
Anish Mistry wrote:
>> Anyway, if you want to use devd it would be
something like:
>>
>> attach 100 {
>>         match "vendor" 
"0x05ac";
>>         match "product"
"0x1000";
>>         action "/usr/bin/ubthid2hci -m 0
$device-name";
>> };
>>
>> And then repeat this for every device that needs to
be switched to
>> HCI mode. This has the problem of not being able to
switch the
>> device to HID mode because when you try to do that,
devd will
>> automatically switch it back to HCI mode if this
attach rule is
>> present. I don't think this is a serious issue
because the HID mode
>> is normally only needed before the operating system
has booted.
>
> Right.  Actually that brings up a good point.  Is there
a way (API) 
> that allows us to enable/disable certain devd entries
at runtime?  If 
> not I think that this might be a useful feature.  If
this was 
> available we'd then be able to programmatically disable
an entry when 
> we want to switch back to HID mode without having to
change the 
> devd.conf file.

AFAIK, no.

-- 
Rui Paulo
_______________________________________________
freebsd-bluetoothfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-blu
etooth
To unsubscribe, send any mail to
"freebsd-bluetooth-unsubscribefreebsd.org"

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )