From 6e42bd349611cdc7bf863c62330cc517a2332733 Mon Sep 17 00:00:00 2001 From: c_oflynn Date: Tue, 14 Oct 2008 21:29:23 +0000 Subject: [PATCH] example\webserver-ipv6-raven works! --- apps/raven-lcd-interface/raven-lcd.h | 13 ------------- ...kefile.webserver => Makefile.raven-webserver} | 4 ++-- platform/avr-raven/Makefile.avr-raven | 3 +-- platform/avr-raven/contiki-conf.h | 1 + .../contiki-raven-default-init-lowlevel.c | 4 ++-- .../avr-raven/contiki-raven-default-init-net.c | 5 +++-- platform/avr-raven/contiki-raven-main.c | 16 ++++++++++++++-- 7 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 apps/raven-lcd-interface/raven-lcd.h rename apps/raven-webserver/{Makefile.webserver => Makefile.raven-webserver} (61%) diff --git a/apps/raven-lcd-interface/raven-lcd.h b/apps/raven-lcd-interface/raven-lcd.h deleted file mode 100644 index f30407d55..000000000 --- a/apps/raven-lcd-interface/raven-lcd.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef raven_lcd_h -#define raven_lcd_h - -int raven_lcd_serial_input(unsigned char ch); -PROCESS_NAME(raven_lcd_process); - -/* Events for the Raven LCD processing loop */ -#define PING_REQUEST 0xc1 -#define PING_REPLY 0xc0 -#define SERIAL_CMD 0x1 - - -#endif diff --git a/apps/raven-webserver/Makefile.webserver b/apps/raven-webserver/Makefile.raven-webserver similarity index 61% rename from apps/raven-webserver/Makefile.webserver rename to apps/raven-webserver/Makefile.raven-webserver index fb39f3545..074215383 100644 --- a/apps/raven-webserver/Makefile.webserver +++ b/apps/raven-webserver/Makefile.raven-webserver @@ -1,6 +1,6 @@ -webserver_src = webserver-nogui.c httpd.c http-strings.c psock.c memb.c \ +raven-webserver_src = webserver-nogui.c httpd.c http-strings.c psock.c memb.c \ httpd-fs.c httpd-cgi.c -webserver_dsc = webserver-dsc.c +raven-webserver_dsc = webserver-dsc.c #$(CONTIKI)/apps/webserver/http-strings.c: $(CONTIKI)/apps/webserver/http-strings # cd $(CONTIKI)/apps/webserver/; $(CONTIKI)/tools/makestrings $< diff --git a/platform/avr-raven/Makefile.avr-raven b/platform/avr-raven/Makefile.avr-raven index 93fa1736c..3d65cfd4b 100644 --- a/platform/avr-raven/Makefile.avr-raven +++ b/platform/avr-raven/Makefile.avr-raven @@ -2,7 +2,7 @@ CONTIKI_TARGET_DIRS = . rf230 apps net loader CONTIKI_CORE=contiki-raven-main CONTIKI_TARGET_MAIN = ${CONTIKI_CORE}.o -CONTIKI_TARGET_SOURCEFILES += rs232.c slip.c cfs-eeprom.c eeprom.c random.c \ +CONTIKI_TARGET_SOURCEFILES += rs232.c cfs-eeprom.c eeprom.c random.c \ mmem.c contiki-raven-main.c contiki-raven-default-init-net.c CONTIKIAVR=$(CONTIKI)/cpu/avr @@ -21,7 +21,6 @@ AVRDUDE_PROGRAMMER=jtag2 AVRDUDE_PORT=usb:00B000000D79 - # Additional avrdude options # Verify off AVRDUDE_OPTIONS=-V diff --git a/platform/avr-raven/contiki-conf.h b/platform/avr-raven/contiki-conf.h index d85d1ccc6..3bf57879b 100644 --- a/platform/avr-raven/contiki-conf.h +++ b/platform/avr-raven/contiki-conf.h @@ -101,6 +101,7 @@ typedef int32_t s32_t; #define UIP_CONF_ND6_MAX_PREFIXES 3 #define UIP_CONF_ND6_MAX_NEIGHBORS 4 #define UIP_CONF_ND6_MAX_DEFROUTERS 2 +#define UIP_CONF_ICMP6 1 #define UIP_CONF_UDP 1 #define UIP_CONF_UDP_CHECKSUMS 1 diff --git a/platform/avr-raven/contiki-raven-default-init-lowlevel.c b/platform/avr-raven/contiki-raven-default-init-lowlevel.c index a2e0cfc84..8e3dba7d7 100644 --- a/platform/avr-raven/contiki-raven-default-init-lowlevel.c +++ b/platform/avr-raven/contiki-raven-default-init-lowlevel.c @@ -32,11 +32,11 @@ * * @(#)$$ */ -#include "contiki-raven.h" +#include "contiki-raven.h" void init_lowlevel(void) -{ +{ /* Configure default slip port with 19200 baud */ //rs232_init(RS232_PORT_0, USART_BAUD_19200, USART_PARITY_NONE | USART_STOP_BITS_1 | USART_DATA_BITS_8); diff --git a/platform/avr-raven/contiki-raven-default-init-net.c b/platform/avr-raven/contiki-raven-default-init-net.c index 39a7a161f..61fc23213 100644 --- a/platform/avr-raven/contiki-raven-default-init-net.c +++ b/platform/avr-raven/contiki-raven-default-init-net.c @@ -41,11 +41,12 @@ void init_net(void) { - uip_ipaddr_t ipprefix; + +/* uip_ipaddr_t ipprefix; uip_ip6addr(&ipprefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0); uip_netif_addr_add(&ipprefix, UIP_DEFAULT_PREFIX_LEN, 0, AUTOCONF); uip_nd6_prefix_add(&ipprefix, UIP_DEFAULT_PREFIX_LEN, 0); - +*/ } diff --git a/platform/avr-raven/contiki-raven-main.c b/platform/avr-raven/contiki-raven-main.c index fb60fa03e..ab5ab5253 100644 --- a/platform/avr-raven/contiki-raven-main.c +++ b/platform/avr-raven/contiki-raven-main.c @@ -40,6 +40,8 @@ */ #include +#include +#include #include #include "lib/mmem.h" @@ -63,6 +65,16 @@ #include "sicslowmac.h" +FUSES = + { + .low = 0xe2, + .high = 0x99, + .extended = 0xff, + }; + + +/* Put default MAC address in EEPROM */ +uint8_t mac_address[8] EEMEM = {0x02, 0x11, 0x22, 0xff, 0xfe, 0x33, 0x44, 0x55}; PROCINIT(&etimer_process, &mac_process, &tcpip_process, &raven_lcd_process); @@ -108,11 +120,11 @@ main(void) autostart_start(autostart_processes); //Give ourselves a prefix - init_net(); + //init_net(); printf_P(PSTR("\n********BOOTING CONTIKI*********\n")); - printf_P(PSTR("System online.\n")); + printf_P(PSTR("System online.\n")); /* Main scheduler loop */ while(1) {