Inhaltsverzeichnis
Client-Server Example
Pess the Button on the client Node, the led on the client Node and server Node changed. The Client Software must know the server node adress.
Client Node
Edit er-examole-client.c osd-contiki-work/examples/osd/er-rest-example-merkurboard/er-examole-client.c
--- snip -- /* TODO: This server address is hard-coded for Cooja. */ -#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0221, 0x2eff, 0xff00, 0x26D0) /* cooja2 */ +#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0221, 0x2eff, 0xff00, 0x26D0) /* edit the correct server mac adress */ #define LOCAL_PORT UIP_HTONS(COAP_DEFAULT_PORT+1) #define REMOTE_PORT UIP_HTONS(COAP_DEFAULT_PORT) --- snip ---
compile and flash the client:
makeclient.sh flashclient.sh