Closed g-oikonomou closed 10 years ago
Hi George,
The driver USB controller of the BeagleBone black has some issues with usb device hot plugin, usually leading to kernel freeze or panic :( (It seems to be more stable with kernel 3.12 and 3.14 though)
We have to set the mac address to all zeros when 6LBR is stopped or the slip-radio will continue to ack incoming packets. When you are in a multi-br configuration, this prevent the nodes to switch over to an other BR as the link quality won't be degraded.
Now setting the mac to all zeros is more of a workaround than a good solution, but we choose that in order to not deviate too much from the vanilla slip-radio. But it seems this introduce more problems than we expected. We should have instead a start radio and a stop radio commands, which would store the original mac address and properly shutdown the radio instead of using a bogus mac to stop acking incoming packets.
Btw, someone has written a detailed guide on how to setup 6lbr on beaglebone black on the TI wiki : http://processors.wiki.ti.com/index.php/Contiki-6LOWPAN-BBB
Hi Laurent, thanks for the reply
The driver USB controller of the BeagleBone black has some issues with usb device hot plugin, usually leading to kernel freeze or panic :( (It seems to be more stable with kernel 3.12 and 3.14 though)
Hmm not sure what kernel mine is running, but that will be it. I also had a kernel oops when I plugged the debug cable on the dongle while it was running. I'll have a look at upgrading the kernel, thanks.
We have to set the mac address to all zeros when 6LBR is stopped or the slip-radio will continue to ack incoming packets.
That is a very good reason!
Now setting the mac to all zeros is more of a workaround than a good solution, but we choose that in order to not deviate too much from the vanilla slip-radio.
... which needs a bit of love and attention IMHO. Parts of it should be re-written to support the new RF API rather than platform-specific calls. But this of course is a Contiki discussion
We should have instead a start radio and a stop radio commands, which would store the original mac address and properly shutdown the radio
Which can be as simple as a 'cross-platform' NETSTACK_RADIO.set_value(RADIO_PARAM_POWER_MODE, RADIO_POWER_MODE_OFF)
and _ON
.
How about something like this on the 6lbr side:
Btw, someone has written a detailed guide on how to setup 6lbr on beaglebone black on the TI wiki : http://processors.wiki.ti.com/index.php/Contiki-6LOWPAN-BBB
Yes, familiar with it. Particularly interesting section on Jool / NAT64
Now setting the mac to all zeros is more of a workaround than a good solution, but we choose that in order to not deviate too much from the vanilla slip-radio.
... which needs a bit of love and attention IMHO. Parts of it should be re-written to support the new RF API rather than platform-specific calls. But this of course is a Contiki discussion
This is on my todo-list, I don't want to write another platform specific slip-radio module :)
How about something like this on the 6lbr side:
Send RF off cmd
If command returns "unknown"
fall back to MAC workaround
Else
query RF state
If still on, fall back to MAC workaround
That should do the trick. Maybe I'll move the check at startup so we know if e have a legacy slip-radio or a "new api" aware slip-radio.
I'll get back with more news when I have them. I'm also pondering a !p
command to change PAN ID for outgoing frames, but all in due course.
Thanks for the support here.
Hello, I am new to this forum,
Could you please explain the workaround to restrain 6LBR from "FATAL: SLIP: slip_flushbuf::write()".
Where shall I make changes for the following
" Save h/w MAC in a variable at slip-radio startup Implement slip_set_mac For slip_reboot, we don't really reboot, we just re-set RF registers and data structures to the h/w MAC. "
I've been looking at implementing missing features (getting / setting RF channel and MAC address) in Contiki's slip-radio. It's relatively straightforward with the new RF API (assuming the radio implements it).
For 6lbr's
slip_set_mac
we can start with something as simple as this on the firmware:I see that, when shutting down, 6lbr emits a
slip_set_mac(&linkaddr_null);
When starting it emits aslip_reboot()
. This would normally be enough to restore the slip radio to the original MAC. But...Use case:
Problem: If we actually reboot upon reception of a
slip_reboot
,/dev/ttyACMx
will disappear while 6lbr is trying to use it. This crashes my BeagleBone pretty badly (hard reset required). Ubuntu on a normal PC doesn't crash, but 6lbr enters a state whereby it blocks waiting for the device to re-appear, until it eventually gets restarted by the 6lbr watchdog. Upon restarting, 6lbr reboots the radio again, rinse-repeat like so:The error log has the respective watchdog-related entries:
We can't really ignore the reset command, because we end up with a MAC of all zeros, so it's really either both or neither.
My current workaround:
slip_set_mac
slip_reboot
, we don't really reboot, we just re-set RF registers and data structures to the h/w MAC.But this isn't really ideal:
Thanks
(and yes @sdawans , there will be docs! :smile: )