2009-05-08 12:49:36 +00:00
|
|
|
ifdef CONTIKI_HOME
|
|
|
|
CONTIKI = $(CONTIKI_HOME)
|
|
|
|
else
|
|
|
|
ifndef CONTIKI
|
2010-02-06 18:23:04 +00:00
|
|
|
CONTIKI=../../..
|
2009-05-08 12:49:36 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
DEFINES=WITH_UIP6=1,WITH_SLIP=1,PROJECT_CONF_H=\"bridge-conf.h\"
|
|
|
|
UIP_CONF_IPV6=1
|
|
|
|
|
|
|
|
ifndef TARGET
|
|
|
|
TARGET=sky
|
|
|
|
endif
|
|
|
|
|
|
|
|
PROJECTDIRS = dev
|
|
|
|
PROJECT_SOURCEFILES = fakeuip.c sicslow_ethernet.c
|
|
|
|
|
|
|
|
all: uip6-bridge-tap.sky
|
|
|
|
|
2009-10-26 13:20:31 +00:00
|
|
|
upload: uip6-bridge-tap.ihex
|
|
|
|
cp $< $(IHEXFILE)
|
2009-11-02 11:46:49 +00:00
|
|
|
$(MAKE) sky-u.$(subst /,-,$(word $(MOTE), $(MOTES)))
|
2009-10-26 13:20:31 +00:00
|
|
|
|
2009-05-08 12:49:36 +00:00
|
|
|
include $(CONTIKI)/Makefile.include
|
2009-10-26 13:20:31 +00:00
|
|
|
|
|
|
|
../../tapslip6: ../../tapslip6.c
|
|
|
|
(cd ../../; $(MAKE) tapslip6)
|
|
|
|
|
|
|
|
ifndef MOTE
|
|
|
|
MOTE=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
connect: ../../tapslip6
|
|
|
|
sudo ../../tapslip6 -t tap0 -s $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES)) 127.0.0.1 255.0.0.0
|
|
|
|
|
|
|
|
bridge:
|
2010-02-06 18:23:04 +00:00
|
|
|
@sudo service radvd restart || echo radvd could not be restarted
|
2009-10-26 13:20:31 +00:00
|
|
|
sudo route add -6 aaaa::/64 tap0
|
|
|
|
sudo ip -6 address add aaaa::1/64 dev tap0
|