Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 11 15:19

    joakimeriksson on release-4.7

    (compare)

  • Jun 10 20:06
    altf4 closed #1591
  • Jun 10 20:06
    altf4 commented #1591
  • Jun 10 14:38

    joakimeriksson on develop

    Update README.md 1) Add a link… Merge pull request #1596 from c… (compare)

  • Jun 10 14:38
    joakimeriksson closed #1596
  • Jun 10 13:56

    joakimeriksson on develop

    Excluded platforms that miss ne… Small fix Merge branch 'develop' into bug… and 1 more (compare)

  • Jun 10 13:56
    joakimeriksson closed #1593
  • Jun 10 13:39

    joakimeriksson on develop

    Minor code-style in stack-check Avoid arithmetic on void pointe… Avoid out-of-bounds array acces… and 1 more (compare)

  • Jun 10 13:39
    joakimeriksson closed #1585
  • Jun 10 13:37
    joakimeriksson milestoned #1090
  • Jun 10 13:37
    joakimeriksson demilestoned #1090
  • Jun 10 13:35
    joakimeriksson commented #1537
  • Jun 10 13:35

    joakimeriksson on develop

    MAC: add MAC_TX_QUEUE_FULL erro… Merge pull request #1537 from a… (compare)

  • Jun 10 13:35
    joakimeriksson closed #1537
  • Jun 10 13:30
    joakimeriksson synchronize #1593
  • Jun 09 08:43
    atiselsts opened #1596
  • Jun 09 08:43

    atiselsts on atiselsts-patch-1

    Update README.md 1) Add a link… (compare)

  • Jun 08 20:54
    arurke synchronize #1585
  • Jun 08 14:53
    joakimeriksson milestoned #1587
  • Jun 08 14:45

    atiselsts on develop

    Zoul: fix building of platform-… Merge pull request #1590 from a… (compare)

daniel_colt
@daniel_colt:matrix.org
[m]
Thanks @atiselsts ! I'm using an older development version that doesn't have that yet. How could I update it without loosing my changes in the repo?
Mao Xinwei
@NaughtCrab
Hello, I met a problem. Because there is no nullrdc_driver in Contiki-NG, I use nullradio_driver
Anil Kumar Prajapati
@anilprajapati88
@atiselsts Thanks, it works for me. can you suggest that can we an existing module will store the mote output of simulation into a text file?
Gleykyson Lucas de Morais
@gleykyson_twitter
Good afternoon, I would like to know if COOJA can analyze the SNR metric: Signal-to-Noise Ratio
Mao Xinwei
@NaughtCrab
Sorry, I call NETSTACK.RADIO_send() in sender, and NETSTACK.RADIO_read() in receiver. The sender transmits 64bit empty packets. Both are compiled successfully in zoul. However, the receiver cannot get any packet, does someone know the reason?
Atis Elsts
@atiselsts
@anilprajapati88 not sure what you mean exactly. Look at ng-contiki/examples/benchmarks/result-visualization/ - it shows how to automate cooja simulations and to parse the output to extract meaningful metrics
@NaughtCrab sending is synchronous, but reception asynchronous. Instead of calling the read function directly, you need to use a MAC layer that defines an input function. This input function will be automatically called when the node gets a traffic. By default, you are supposed to use existing Contiki-NG MAC layers, and work at the level of UDP (or TCP or IP) packets
@gleykyson_twitter cooja does not provide this metric. is not specialized in the simulation of the physical layer
Anil Kumar Prajapati
@anilprajapati88
@atiselsts Thanks, Actually I want to run a simulation script editor and with the help of this, automate the process of storing mote output. But In Contiki-Ng, the simulation script editor not working. I tried all the possible solotion. can you suggest the solution??
Anil Kumar Prajapati
@anilprajapati88
@atiselsts - I checked the result visualization but I am unable to run this due to rom overflow issue. I found that when we try to print the log information, in this rom overflow occurs due to MSP430 GCC version. I set up MSP430 GCC version 4.7.3, the only latest version available on the internet.
Screenshot from 2021-05-27 15-48-29.png
Mao Xinwei
@NaughtCrab
@atiselsts Thanks for your suggestion. However, I want to physical and mac layer directly. Because I want to scan all the channels as quickly as possible. If I use the lower layer, it adds other mechanism like CSMA, and the speed of packet sending is limited. I have tried the nullnet using etimer and timer on zoul, the send inteval is 62.5ms, otherwise the callback will show MAC_TX_ERR. The ideal speed should reach 7.8125ms, that's the reason why I need to define physical layer by myself. Is there any guideline in this part? or just a simple example about nullradio or nullmac implementation?
Atis Elsts
@atiselsts
@anilprajapati88 use cooja motes to avoid memory overflow
But In Contiki-Ng, the simulation script editor not working
Is it not? Do you know how to reproduce the problem? If so, create an issue on github or write more detailed info here
@NaughtCrab write your own MAC layer, very simple one. Use the nullmac as a template
Anil Kumar Prajapati
@anilprajapati88
@atiselsts - thanks, I will explore cooja motes and I don't know how to create an issue on GitHub but I will try this.
ouadev
@ouadev
Hello everyone. I'm new to Contiki-ng, and I'm trying to use the MAC layer 802.15.4 to exchange different frames such as beacons, beacon requests, data,. ... And I'm uaing csma mode, but looking at the csma-output.c code only data frames are supported. I guess this is because 6LowPAN only needs this data frame type. Can someone please confirm to me this observation ? And can anyone point to me to a solution where I can use the full frame types specified by the 802.15.4 standard ?
Anil Kumar Prajapati
@anilprajapati88

@atiselsts - thanks, I will explore cooja motes and I don't know how to create an issue on GitHub but I will try this.

While compiling with cooja motes, I got the same issue mentioned at contiki-ng/contiki-ng#1231, to solve this, I followed,
https://github.com/contiki-ng/contiki-ng/pull/1211/files, and then this problem comes ->

Redefining printf
for OBJ in node.o build/cooja/mtype862.o ; do objcopy --redefine-sym printf=log_printf --redefine-sym puts=log_puts --redefine-sym putchar=log_putchar $OBJ; done
gcc -I'/include' -I'/include/linux' -shared -Wl,-Map=build/cooja/mtype862.map -o build/cooja/mtype862.cooja node.o build/cooja/mtype862.o build/cooja/mtype862.a.

so to resolve please guide.

Kerem Örs
@fkerem
Is there an http server example for contiki-NG?
Victor-Kas
@Victor-Kas
Greetings, I need guidance on how to set up a multihop rpl network in contiki. I'm a beginner when it comes to contiki development and I am really struggling to get the code to work. So far I am only able to send packets between a client and a server in single-hop format but I would like to be able to send packets from multiple clients to a single server via multi-hop communication. Your assistance would be greatly appreciated
Atis Elsts
@atiselsts
@fkerem examples/rpl-border-router/webserver/
@anilprajapati88 64 bit cooja is not supported yet, use the official Docker image instead:https://github.com/contiki-ng/contiki-ng/wiki/Docker
@Victor-Kas I already replied about this to your colleague I think? Use examples/rpl-udp/ as the starting point.
Atis Elsts
@atiselsts
@ouadev beacon mode of the 802.15.4 standard is not supported in Contiki-NG. We have non-beacon CSMA and we have TSCH with Enhanced Beacon frames
Sending out and receiving frames with a different type is not a problem, it's the easy part. os/net/mac/framer/frame802154.h has the frame codes already in place. The complex part is to write the protocol logic!
Anil Kumar Prajapati
@anilprajapati88
@atiselsts - Thanks for valuable information. I want to know that, can we print the respective node_id from ip addresses.
Victor-Kas
@Victor-Kas
@atiselsts thanks worked perfectly
Atis Elsts
@atiselsts
@anilprajapati88 convert to linkaddr_t first, then use node_id = linkaddr.u8[LINKADDR_SIZE - 1] + (linkaddr.u8[LINKADDR_SIZE - 2] << 8);
Victor-Kas
@Victor-Kas
But now I have a different issue. I am trying to write code that will enable the nodes to read soil moisture from an external analogue sensor...... I was looking at an example in the book "practical contiki" but I can't really seem to make sense of it
Anil Kumar Prajapati
@anilprajapati88

@atiselsts - I am using the logic -->> const linkaddr_t linkaddr = (const linkaddr_t )uip_ds6_nbr_lladdr_from_ipaddr(sender_addr);
node_id = linkaddr.u8[LINKADDR_SIZE - 1] + (linkaddr.u8[LINKADDR_SIZE - 2] << 8);
printf("Node Id : %d", node_id); but it will give me error :

make udp-client.z1 TARGET=z1
make: msp430-gcc: Command not found
CC udp-client.c
udp-client.c: In function ‘udp_rx_callback’:
udp-client.c:43:32: error: cast to union type from type not present in union
udp-client.c:44:21: error: request for member ‘u8’ in something not a structure or union
udp-client.c:44:55: error: request for member ‘u8’ in something not a structure or union
udp-client.c:43:21: error: variable ‘linkaddr’ set but not used [-Werror=unused-but-set-variable]
udp-client.c: At top level:
cc1: error: unrecognized command line option "-Wno-unused-const-variable" [-Werror]
cc1: all warnings being treated as errors
make: * [../../Makefile.include:414: udp-client.o] Error 1
Process returned error code 2

Anil Kumar Prajapati
@anilprajapati88

@atiselsts - I am using the logic -->> const linkaddr_t linkaddr = (const linkaddr_t )uip_ds6_nbr_lladdr_from_ipaddr(sender_addr);
node_id = linkaddr.u8[LINKADDR_SIZE - 1] + (linkaddr.u8[LINKADDR_SIZE - 2] << 8);
printf("Node Id : %d", node_id); but it will give me error :

make udp-client.z1 TARGET=z1
make: msp430-gcc: Command not found
CC udp-client.c
udp-client.c: In function ‘udp_rx_callback’:
udp-client.c:43:32: error: cast to union type from type not present in union
udp-client.c:44:21: error: request for member ‘u8’ in something not a structure or union
udp-client.c:44:55: error: request for member ‘u8’ in something not a structure or union
udp-client.c:43:21: error: variable ‘linkaddr’ set but not used [-Werror=unused-but-set-variable]
udp-client.c: At top level:
cc1: error: unrecognized command line option "-Wno-unused-const-variable" [-Werror]
cc1: all warnings being treated as errors
make: * [../../Makefile.include:414: udp-client.o] Error 1
Process returned error code 2

same i was checked in contiki-3.0, In rpl-udp
: server_ipaddr.u8[sizeof(server_ipaddr.u8) - 1] print the node_id, but same error occurs error: request for member ‘u8’ in something not a structure or union

Atis Elsts
@atiselsts
@anilprajapati88 if you have a pointer, you need to use -> instead of . to access its members. Learn about pointers - any C programming course covers them!
Anil Kumar Prajapati
@anilprajapati88
@atiselsts -Thanks a lot, its works . Yes, I will revise the concept of pointer and macros.
Henrique Mecking
@henriquemecking_twitter

Hello,
I'm following the documentation available at https://github.com/contiki-ng/contiki-ng/wiki/Instrumenting-Contiki-NG-applications-with-energy-usage-estimation [1]
and I was left with the following question:
"Let's assume you have a COOJA.testlog file formatted like this:"

1107305 2 [INFO: Main ] Starting Contiki-NG-release/v4.5-149-g1c0b472-dirty
1110081 2 [INFO: Main ] - Routing: RPL Lite
1112715 2 [INFO: Main] - Net: sicslowpan

but when I export my logs, they are in the format:

00:00.941 ID:8 [INFO: Main ] Starting Contiki-NG-release/v4.6-194-gf102e05b4-dirty
00:00.943 ID:8 [INFO: Main ] - Routing: RPL Lite
00:00.946 ID:8 [INFO: Main ] - Net: sicslowpan

And so I can't successfully run the python script available in [1].
Do you have any suggestions?

Henrique Mecking
@henriquemecking_twitter
when I try to run cooja in nogui mode, I get the error below:
user@ad680624876b:~/contiki-ng/tools/cooja/dist$ java -jar cooja.jar -nogui=../../../lab/sec1.csc
 INFO [main] (Cooja.java:1321) -> Starting Cooja
 INFO [main] (Cooja.java:2865) - External tools default settings: /external_tools_linux.config
 INFO [main] (Cooja.java:2895) - External tools user settings: /home/user/.cooja.user.properties
 INFO [main] (Simulation.java:422) - Simulation random seed: 123456
 INFO [main] (CompileContiki.java:140) -> make motes_udp.z1 TARGET=z1
Message:
Message:> make motes_udp.z1 TARGET=z1
Message:make: 'motes_udp.z1' is up to date.
 INFO [main] (MspMote.java:235) - Loading firmware from: /home/user/contiki-ng/lab/../examples/myfirstlab/motes_udp.z1
 INFO [main] (MspMote.java:235) - Loading firmware from: /home/user/contiki-ng/lab/../examples/myfirstlab/motes_udp.z1
 INFO [main] (MspMote.java:235) - Loading firmware from: /home/user/contiki-ng/lab/../examples/myfirstlab/motes_udp.z1
 INFO [main] (MspMote.java:235) - Loading firmware from: /home/user/contiki-ng/lab/../examples/myfirstlab/motes_udp.z1
 INFO [main] (MspMote.java:235) - Loading firmware from: /home/user/contiki-ng/lab/../examples/myfirstlab/motes_udp.z1
 INFO [main] (Cooja.java:1787) - Visualized plugin was not started: class org.contikios.cooja.plugins.SimControl
 INFO [main] (Cooja.java:1787) - Visualized plugin was not started: class org.contikios.cooja.plugins.Visualizer
 INFO [main] (Cooja.java:1787) - Visualized plugin was not started: class org.contikios.cooja.plugins.LogListener
 INFO [main] (Cooja.java:1787) - Visualized plugin was not started: class org.contikios.cooja.plugins.TimeLine
 INFO [main] (Cooja.java:1787) - Visualized plugin was not started: class org.contikios.cooja.plugins.Notes
FATAL [main] (Cooja.java:3310) - In controlling simulation plugin, aborting
Anil Kumar Prajapati
@anilprajapati88

@atiselsts - I am finding another way to print mote id in Contiki-ng, we can print by - / Pass the address of a node in addr to print the mote id /

int mote_id = addr->u8[sizeof((addr)->u8) - 1];
printf("Mote id : %d", mote_id);

GrreaterHu
@GrreaterHu
image.png
image.png
Hi, everyone. didn't you ever meet this question? The rpl-type.h file could not be found.but the file is just there. I really confused.
Atis Elsts
@atiselsts
@henriquemecking_twitter you need to have the ScriptRunner plugin configured in the .csc file to run without GUI
like this:
<plugin>
  org.contikios.cooja.plugins.ScriptRunner
  <plugin_config>
    <script>TIMEOUT(100000, log.testOK());

while(true) {
    YIELD();
   log.log(time + " " + "node-" + id + " "+ msg + "\n");
}</script>
    <active>true</active>
   </plugin_config>
   <width>600</width>
   <z>2</z>
   <height>700</height>
   <location_x>710</location_x>
   <location_y>30</location_y>
 </plugin>
@anilprajapati88 this will work only if the mote id is based only on the last byte (IDs less than 256 will be fine)
Henrique Mecking
@henriquemecking_twitter
thanks @atiselsts :)
Konstantinos Arakadakis
@konstantinosarakadakis_gitlab
I am trying to compute the energy consumption when my board runs a specific routine. During this routine, it receives and transmits some packets, but also performs some flash reads and writes. Can I use energest to get the times about these flash operations? If not, do you have any alternative solution? Thank you
jeppenodgaard
@jeppenodgaard
I think the answer to this is yes, but I'm not 100 % sure:
Will setting #define UIP_CONF_TAG_TC_WITH_VARIABLE_RETRANSMISSIONS 1 and calling uipbuf_set_attr(UIPBUF_ATTR_MAX_MAC_TRANSMISSIONS, 15); before simple_udp_sendto() break 802.15.4 compatibility (CSMA_MAX_FRAME_RETRIES should be range 0-7 according to standard)?
Henrique Mecking
@henriquemecking_twitter

Hi,
I'm having difficulty using cooja in -nogui mode. Apparently it is not respecting the configured timeout, and it always ends before the time I need to run the whole test.
NOTE: In -quickstart mode the tests are run normally, until the end.

Just below my runner script configuration.

  </plugin>
      <plugin>
  org.contikios.cooja.plugins.ScriptRunner
  <plugin_config>
      <script>TIMEOUT(600000);
      <!-- sim.setSpeedLimit(0); -->
while(true) {
    YIELD();
   log.log(time + " " + id + " "+ msg + "\n");
}</script>

Execution log:

user@ad680624876b:~/contiki-ng$ time java -jar tools/cooja/dist/cooja.jar -nogui=lab/sec2.csc 
 INFO [main] (Cooja.java:1321) - > Starting Cooja
..
 INFO [main] (ScriptRunner.java:430) - Test script deactivated
 INFO [main] (LogScriptEngine.java:265) - Script timeout in 600000 ms
 INFO [main] (ScriptRunner.java:387) - Test script activated
 INFO [Thread-2] (Simulation.java:253) - Simulation main loop started, system time: 1623500600287
 INFO [Thread-2] (LogScriptEngine.java:389) - Test script at 5.00%, done in 511.9 sec
 INFO [Thread-2] (LogScriptEngine.java:389) - Test script at 10.00%, done in 1516.0 sec

real    5m7.211s
user    3m39.159s
sys    0m12.454s

If I change the timeout value from 600000 to 1000000:

  </plugin>
      <plugin>
  org.contikios.cooja.plugins.ScriptRunner
  <plugin_config>
      <script>TIMEOUT(1000000);
      <!-- sim.setSpeedLimit(0); -->
while(true) {
    YIELD();
   log.log(time + " " + id + " "+ msg + "\n");
}</script>

Execution log: (Runtime is similar)

user@ad680624876b:~/contiki-ng$ time java -jar tools/cooja/dist/cooja.jar -nogui=lab/sec2.csc 
 INFO [main] (Cooja.java:1321) - > Starting Cooja
..
 INFO [main] (ScriptRunner.java:430) - Test script deactivated
 INFO [main] (LogScriptEngine.java:265) - Script timeout in 1000000 ms
 INFO [main] (ScriptRunner.java:387) - Test script activated
 INFO [Thread-2] (Simulation.java:253) - Simulation main loop started, system time: 1623500968795
 INFO [Thread-2] (LogScriptEngine.java:389) - Test script at 5.00%, done in 2469.9 sec

real    5m33.593s
user    3m51.214s
sys    0m13.736s

Do you have any tips that can help me solve this problem?

Atis Elsts
@atiselsts
I assume you're not getting any crash logs? Perhaps the system kills the java process because you ran out of RAM? Is this a large simulation that might use a lot of RAM?
Henrique Mecking
@henriquemecking_twitter
Hi @atiselsts , thanks for your reply. I'm not getting any message that tells me the reason for the interruption. I'm using docker to run cooja in nogui mode. In normal (quickstart) mode the simulation works normally, just a little slow. There are only 15 nodes sending one packet per second each