User Tools

Site Tools


hexabusdemosetup

This is an old revision of the document!


Issuing MAC addresses

These MAC addresses have been assigned to the devices:

The MAC addresses are stored in the EEPROM storage, see also http://www.sics.se/contiki/tutorials/tutorial-running-contiki-with-uipv6-and-sicslowpan-support-on-the-atmel-raven.html . They can be modified by re-writing the EEPROM. First, extract the EEP file from the ELF:

avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
  --change-section-lma .eeprom=0 -O ihex $NAME.elf $NAME.eep

The file looks like this:

$ cat ravenusbstick.eep 
:08000000021213FFFE14151695
:00000001FF

Flashing the devices

I use the AVR JTAG2 adapter with avrdude. The build system generates ELF files, so it is necessary to extract fuses, EEP and flash images. The “contiki-tools” folder contains scripts for this. The general idea for this is:

echo "Extracting memory sections from ELF"
avr-objcopy -R .eeprom -R .fuse -R .signature -O ihex $NAME.elf $NAME.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
  --change-section-lma .eeprom=0 -O ihex $NAME.elf $NAME.eep
echo "Make sure the fuses are set to:"
avr-objdump -d -S -j .fuse $NAME.elf

The USB Dongle

WARNING: I never managed to program the USB dongle using Mac OS. I used a WinXP machine and AVR Studio to upload the ELF file.

Fuses must be set to: Extended 0xFB, High 0x99, Low 0xDE.

In theory (see the caveat above):
cd oktobus/contiki-2.4/examples/ravenusbstick
make all
avrdude -c jtag2 -P usb -p at90usb1287 -U lfuse:w:0xDE:m -U hfuse:w:0x99:m -U efuse:w:0xFB:m
hexabusdemosetup.1305206312.txt.gz · Last modified: 2012/10/30 10:41 (external edit)