Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Interaction between Californium and Cooja

Hi Simone,

➢ My problem is, how to correctly handle timers? E.g. the retransmission timer? I know that cooja allows a thread to become an observer of every simulated millisecond. Do you think is feasible to organize a “coojaStack” in which time elapses based on such observer? Do you have any idea or hints on how and where to start?

There are different components, but currently a lot of the timers implementation uses the ScheduledExecutorService as in the CoapEndpoint (which passes it into the CoapStack and the Layers). So, if you able to provide a ScheduledExecutorService implementation, which is based on your simulator time, you have a good chance get first good results. A second implementation patter is to use System.nanoTime() or System.currentTimeMillis(). If your first result indicates, that you need to change those timers as well, a "central switch" may also help to do that.     

Mit freundlichen Grüßen / Best regards 

Achim Kraus

(INST/ECS4) 
Bosch Software Innovations GmbH | Stuttgarter Straße 130 | 71332 Waiblingen | GERMANY | http://www.bosch-si.com 


Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr.-Ing. Rainer Kallenbach, Michael Hahn



From: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] On Behalf Of Simone Bolettieri
Sent: Samstag, 9. Dezember 2017 15:55
To: cf-dev@xxxxxxxxxxx
Subject: [cf-dev] Interaction between Californium and Cooja

Hi everyone,

for our project we need to evaluate a CoAP proxy with a simulated network of 15.4 server nodes. My idea is to use cooja for doing so the tunslip tool is used as a bridge between the Californium proxy/Californium CoAP clients and a 6LoWPAN network. It works well, but, it’s required to run the simulation at “human time” because on the proxy side I collect statistics and also because CoAP timeouts are useless if the couple coap client and coap server runs at different speed. (with cooja you can require a simulation to go as fast as possible ).

I’ve exploited many ways, one of that was to set a “safe” speed up (e.g. 2x human time),  tracking the simulation speed time and scale every statistics collected from Californium by that factor. However this methos is not so reliable (cooja can slow down and accelerate without a reasonable reason). 

A second idea (and now comes the question), is to import a Californium element inside cooja. 
Basically I would need a new connector that has to put the UDP packet inside a IPV6 segment and then inside a 15.4 frame. This packet has to be passed to the cooja interface for sending packet. And this seems easy.  My problem is, how to correctly handle timers? E.g. the retransmission timer? I know that cooja allows a thread to become an observer of every simulated millisecond. Do you think is feasible to organize a “coojaStack” in which time elapses based on such observer? Do you have any idea or hints on how and where to start?

My hope is to save a lot of time by simulating in such a way.

Simone Bolettieri – Research Fellow at the Institute of Informatics and Telematics (IIT)-CNR in Pisa 

Back to the top