On Fri, Dec 27, 2013 at 12:44 AM, valent.turko...@gmail.com
<valent.turko...@gmail.com> wrote:
> On Mon, Dec 23, 2013 at 11:48 AM, Yousong Zhou <yszhou4t...@gmail.com> wrote:
>> On 23 December 2013 04:26, valent.turko...@gmail.com
>> <valent.turko...@gmail.com> wrote:
>>> Hi,
>>> I see that procd is being used by OpenWrt but wiki documentation is
>>> lacking some basic examples how could it be used further by advanced
>>> users (not developers).
>>>
>>> One use case would be to trigger some action when some usb device is
>>> being connected or disconnected... how could procd be used in such use
>>> case?
>>
>> Functionality of hotplug2 was included in procd. User interface is
>> almost the same.  Only the file `/etc/hotplug2.rules' was replaced
>> with `/etc/hotplug.json'.  See wiki page [1].
>>
>> Please correct me if I was wrong.
>>
>> [1] http://wiki.openwrt.org/doc/techref/hotplug
>>
>>
>>                 yousong
>
> Thanks a lot for this info, it has helped a lot!
>
> After poking around for a bit I got the basics of it. Hotplug scripts
> try to decide what type of device has been connected (usb serial port,
> button, 3g stick, wifi dongle, etc...) and then they runs some
> specific scripts for each different type of device and event
> (up/down), right?
>
> But how can I make hotplug/procd recognise bluetooth dongle device? It
> lookls like current /etc/hotplug.json script doesn't handle bluetooth
> dongles, right? So how to add support so that bluetooth dongles get
> recognised correctly ?

After adding hotplug troubleshooting on wiki [1] and creating hotplug
debug script I saw this for two different bluetooth dongles:


action='add' product='a12/1/1915' type='224/1/1' interface=''
action='add' product='a12/1/1915' type='224/1/1' interface='224/1/1'
action='add' product='a12/1/1915' type='224/1/1' interface='224/1/1'
action='add' product='a12/1/1915' type='224/1/1' interface='254/1/0'
action='remove' product='a12/1/1915' type='224/1/1' interface='224/1/1'
action='remove' product='a12/1/1915' type='224/1/1' interface='224/1/1'
action='remove' product='a12/1/1915' type='224/1/1' interface='254/1/0'
action='remove' product='a12/1/1915' type='224/1/1' interface=''
action='add' product='a12/1/134' type='224/1/1' interface=''
action='add' product='a12/1/134' type='224/1/1' interface='224/1/1'
action='add' product='a12/1/134' type='224/1/1' interface='224/1/1'

I was expecting to see "hci0" as interface because this is what
hcitool and hciconfig report as bluetooth interface. Is interface 224
bluetooth specific interface? Is there anything here I could make
hotplug detect bluetooth dongle from other types of usb devices?
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to