contiki

Contiki BR not executing tcp_ip event,, does'nt goes after PROCESS_YIELD

浪尽此生 提交于 2019-12-11 07:31:43
问题 I'm trying to implement ECC in 6LoWPAN border router. I'm using contiki Wismote motes for all udp_sender.c as sender and the Border router (border_router.c) needs to receive some messages and also reply ECC keys. I have disabled the default server (WITH_WEBSERVER=0) in makefile and enabled debug_print. udp_sender.c sends messages correctly but the border router doesn't receive messages. Nothing executes after PROCESS_YIELD in border_router.c while(1) { PROCESS_YIELD(); **//Nothing executes

Contiki compile error, “ ERROR: address 0x820003 out of range at line 1740 of…”

試著忘記壹切 提交于 2019-12-11 06:34:08
问题 I started to use contiki operating system with atmel atmega128rfa1. I can compile my example, but the hex file is bad. The error is: ERROR: address 0x820003 out of range at line 1740 of ipso.hex (i am not using IPSO, just i kept this name). When I compile in linux system the code is program size is 27804 byte and the data is 4809byte. When I compile in windows the program is 28292 and the data is 4791. I use only one process and one etimer, I would like to turn on and off 1 led. the makefile

git clone connection refused

不想你离开。 提交于 2019-12-10 16:51:11
问题 I'm pretty new and trying to set up an environment for my Econotag. Using this guide https://github.com/malvira/libmc1322x/wiki/libmc1322x I am getting an error message . user@instant-contiki:~$ git clone git://git.devl.org/git/malvira/libmc1322x.git Cloning into 'libmc1322x'... fatal: unable to connect to git.devl.org: git.devl.org[0: 209.208.78.21]: errno=Connection refused How to get around this 回答1: Looks like an empty repo (git.devl.org/git/malvira/libmc1322x.git). I think this is the

Casting pointers on embedded devices

不想你离开。 提交于 2019-12-08 17:40:17
问题 I encountered a strange problem when casting and modifying pointers on a 32bit embedded system (redbee econotag running contiki OS to be specific). uint32_t array[2]; array[0] = 0x76543210; array[1] = 0xfedcba98; uint8_t* point = ((uint8_t*)array)+1; printf("%08x \n", *(uint32_t*)point ); output on my computer: 98765432 output on embedded device: 10765432 My computer behaves as I expect it to, the embedded device however seems to wrap around when it reaches the end of the word. Why does this

Contiki difference between RTIMER_NOW() and clock_time()

*爱你&永不变心* 提交于 2019-12-07 23:18:50
问题 I would like to know the difference between RTIMER_NOW() and clock_time() function. Can I store the values they return in an int variable? Do they return the time referred to the whole simulation or to the single mote that call them? If a mote starts its main process 5 sec after the first event in the simulation, does these functions return the value of the simulation or the (value of simulation - 5 sec)? Thank you. 回答1: The two functions: RTIMER_NOW() - returns the uptime in real-time timer

How to read temperature, humidity and light measures with contiki-OS?

China☆狼群 提交于 2019-12-07 19:14:54
问题 I would like to know how to measure temperature, light and humidity with a contiki program. I'm using a TelosB mote (sky mote), so these three sensors are integrated in the mote itself. PS: I'm working on Contiki-OS 2.7 回答1: In order to use the light and temperature sensors you will need to add the next: #include "dev/sht11-sensor.h" #include "dev/light-sensor.h" Then you can use the next functions: static int get_light(void) { return 10 * light_sensor.value(LIGHT_SENSOR_PHOTOSYNTHETIC) / 7;

use of malloc in contiki programs

时间秒杀一切 提交于 2019-12-07 12:37:09
问题 Consider the following contiki program. #include<stdio.h> #include"contiki.h" #include <stdlib.h> static char *mem; static int x; /*---------------------------------------------------------------------------*/ PROCESS(test, "test"); AUTOSTART_PROCESSES(&test); /*---------------------------------------------------------------------------*/ PROCESS_THREAD(test, ev, data) { PROCESS_BEGIN(); printf("before malloc\n"); mem=(char*)malloc(10); for(x=0;x<10;x++) mem[x]=x+1; printf("after malloc\n");

How to read temperature, humidity and light measures with contiki-OS?

隐身守侯 提交于 2019-12-06 14:30:32
I would like to know how to measure temperature, light and humidity with a contiki program. I'm using a TelosB mote (sky mote), so these three sensors are integrated in the mote itself. PS: I'm working on Contiki-OS 2.7 In order to use the light and temperature sensors you will need to add the next: #include "dev/sht11-sensor.h" #include "dev/light-sensor.h" Then you can use the next functions: static int get_light(void) { return 10 * light_sensor.value(LIGHT_SENSOR_PHOTOSYNTHETIC) / 7; } static int get_temp(void) { return ((sht11_sensor.value(SHT11_SENSOR_TEMP) / 10) - 396) / 10; } For

Contiki difference between RTIMER_NOW() and clock_time()

末鹿安然 提交于 2019-12-06 11:34:18
I would like to know the difference between RTIMER_NOW() and clock_time() function. Can I store the values they return in an int variable? Do they return the time referred to the whole simulation or to the single mote that call them? If a mote starts its main process 5 sec after the first event in the simulation, does these functions return the value of the simulation or the (value of simulation - 5 sec)? Thank you. The two functions: RTIMER_NOW() - returns the uptime in real-time timer ( rtimer ) ticks modulo rtimer overflow value. For example, on a platforms where RTIMER_ARCH_SECOND is 32768

Contiki UDP packet transmission duration with CC2538

自古美人都是妖i 提交于 2019-12-06 10:46:06
Could someone explain me what is going on within the Contiki-OS when it transmits an UDP packet? Here is the current consumption of my device in details running with the CC2538 chip: My question is: why it takes so long to transmit an UDP broadcast packet (about 250ms) knowing that theoretically at 250kbps the packet of 408 bits length should be transmitted in approximately 2ms? I'd understand if the transmission last lets say ten milliseconds but here the difference is huge. I use the example in contiki/examples/ipv6/simple-udp-rpl/broadcast-example.c Does anyone have an idea? By default,