Re: [Bluez-devel] [PATCH] pand/main.c, restore signals for dev-up script

James Cameron
2004-06-28T09:55:41Z

On Mon, Jun 28, 2004 at 11:05:18AM +0200, Marcel Holtmann wrote:
> > Just a quick followup question, now that I've read the net.agent script
> > and the README.Debian in the hotplug package ... doesn't this only
> > address the creation of the bnep0 interface when a Bluetooth dongle is
> > plugged in? [...]
>
> No. The bnep0 interface is only created when there is a PAN connection
> between two devices. No connection, no network interface.

What I didn't know and have now learned was that pand's creation of the
bnep0 interface is a hotplug event, despite there being no actual
physical action.

I've got it working using net.agent and not using dev-up. Now the
Debian /etc/network/interfaces file looks like this;

mapping hotplug
script echo

and I had to create a file so that it would take bnep0 down afterwards;

# touch /etc/hotplug/net.enable

But dev-up is given the peer's Bluetooth device address. net.agent is not
given this. Can it be determined from just the interface name? I could
do a "hcitool con" if I knew what the right hci device number was, but
it seems sensible to have the dev-up script provide the knowledge.

--
James Cameron