[SHR] Cannot get/set IP address on bnep0

Nicola Mfb nicola.mfb at gmail.com
Wed Feb 25 20:21:16 CET 2009


I'm not able to give an ip address to bnep0 interface.
If I use a static configuration in /etc/network/interfaces that's is simply
ignored.
I fixed this by changing /etc/udev/scripts/network.sh in the following mode:
[...]
# if this interface has an entry in /etc/network/interfaces, let ifupdown
# handle it
if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then
  case $ACTION in
    add)
        if [ $INTERFACE = 'bnep0' ]
        then
                ifconfig bnep0 down
        fi
            ifconfig | grep -q "^$INTERFACE" || ifup $INTERFACE
            ;;
    remove)
            ifdown $INTERFACE
            ;;
  esac

  exit 0
fi
It seems that when the script is called bnep0 is already up (without an ip)
and so ifup is not called.
However the above all did not fixed the problem when trying to use a dynamic
ip.
udhcpc is started, but terminates with no lease, as you may see from the
strace output:

Process 4176 attached - interrupt to quit
wait4(4190, NULL, 0, NULL)              = 4190
--- SIGCHLD (Child exited) @ 0 (0) ---
write(1, "No lease, failing\n", 18)     = 18
unlink("/var/run/udhcpc.bnep0.pid")     = 0
exit_group(1)                           = ?
Process 4176 detached

I get only bnep0:ava with a fake address.
The nice thing is that if I run udhcpc -R -n -i bnep0 manually it get the ip
immediately!

Did someone experienced such problems?
Regards

      Nicola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/devel/attachments/20090225/ee24dd63/attachment.htm 


More information about the devel mailing list