====== Eigene Contiki Projekte und Beispiele ====== ==== Test TCP ==== https://github.com/tscheffl/contiki/tree/tscheffl-3-0.0/examples/test-tcp ---- ==== MQTT ==== === Minimal-net === - Starte das Contiki-Binary ./test-mqtt.minimal-net - Das Binary stoppt und wartet auf eine Eingabe. - Konfiguration der IP-Adresse von tap0\\ sudo ip -6 addr add aaaa::1/64 dev tap0 - MQTT subscriber starten auf Topic: ''iot-2/#'' - (optional) Wireshark kann jetzt auf ''tap0'' gestartet werden - Contiki-Binary durch Enter weiter laufen lassen. === Instant Contiki === Hier läuft ein MQTT Broker, gestartet mit mosquitto mosquitto_sub -t '#' -v {"d":{"myName":"BeagleBoard","Seq #":3,"Uptime (sec)":135,"Def Route":"Testnachricht","RSSI (dBm)":0}} FIXME * LED Output * Build Strings, etc * Architecture for Nodes (Node - OpenWRT - mosquitto - Netconf?) ==== IPv6/RPL-Border-Router (SLIP) ==== Das Projekt ist hier dokumentiert: [[contiki:a-n-solutions-module:contiki3|Contiki 3.0 auf dem @ANY2400 & @ANY900 USB Stick mit RPL-Border-Router und SLIP]] ==== UDP-IPv6 ==== Dieses Beispiel wurde nicht modifiziert, aber mit dem Target minimal-net nach [[contiki:minimal-net-linux|dieser Anleitung]] erfolgreich kompiliert. Es stellt ein UDP-Server und Client Programm bereit, die miteinander kommunizieren können. Das Server Programm kann auch für sich allein mit ''netcat'' getestet werden. Es erwartet Nachrichten auf Port 3000 mit dem Sourceport 3001. https://github.com/tscheffl/contiki/tree/tscheffl-3-0.0/examples/udp-ipv6 sudo ip -6 addr add aaaa::1/64 dev tap0 netcat -u -p 3001 aaaa::206:98ff:fe00:232 3000 ---- ==== Webserver-IPv6 ==== https://github.com/tscheffl/contiki/tree/tscheffl-3-0.0/examples/ Es wurde versucht den Code für die AN Solutions Module (AVR-zigbit) zu übersetzen. \\ Hat nicht funktioniert, Data-Segment etwas zu groß... avr-size webserver6.avr-zigbit -C --mcu=atmega1281 AVR Memory Usage ---------------- Device: atmega1281 Program: 57082 bytes (43.6% Full) (.text + .data + .bootloader) Data: 11220 bytes (137.0% Full) (.data + .bss + .noinit) EEPROM: 8 bytes (0.2% Full) (.eeprom) ''project-conf.h'' und ''Makefile'' des Projekts. Der Versuch den nano-Webserver einzubinden hat zu einer Reihe von Compile-Fehlern geführt. #define PROCESS_CONF_NO_PROCESS_NAMES 1 #define UIP_CONF_TCP 1 #define UIP_CONF_UDP 0 CONTIKI_PROJECT=webserver6 all: $(CONTIKI_PROJECT) $(WITH_WEBSERVER) CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\" CFLAGS += -ffunction-sections LDFLAGS += -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__ ifeq ($(WITH_WEBSERVER),) # #Set default webserver for different platforms #Although Makefile.include sets the default target, we need to know it now. # ifeq ($(TARGET),) -include Makefile.target endif ifeq ($(TARGET),sky) SMALL=1 WITH_WEBSERVER=webserver-nano else ifeq ($(TARGET),avr-raven) WITH_WEBSERVER=raven-webserver endif # endif ifneq ($(WITH_WEBSERVER),) APPS = $(WITH_WEBSERVER) ifeq ($(WITH_WEBSERVER),raven-webserver) APPS+=raven-lcd-interface endif #copy output to e.g. webserver-nano.sky, raven-webserver.avr-raven $(WITH_WEBSERVER) : $(CONTIKI_PROJECT) cp $(CONTIKI_PROJECT).$(TARGET) $(WITH_WEBSERVER).$(TARGET) @if (test -n "$(ELF_SIZE)");then $(ELF_SIZE) $(WITH_WEBSERVER).$(TARGET);fi else APPS=webserver all : $(CONTIKI_PROJECT) @if (test -n "$(ELF_SIZE)");then $(ELF_SIZE) $(CONTIKI_PROJECT).$(TARGET);fi endif DEFINES=UIP_CONF_TCP=1 DEFINES=PROCESS_CONF_NO_PROCESS_NAMES=1 # Make no RPL the default for minimal-net builds ifeq ($(TARGET),minimal-net) ifndef CONTIKI_WITH_RPL CONTIKI_WITH_RPL = 0 endif endif CONTIKI = ../.. CONTIKI_WITH_IPV6 = 1 include $(CONTIKI)/Makefile.include