contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.71k stars 2.58k forks source link

Cooja Mote Type #442

Open tomhoward1 opened 10 years ago

tomhoward1 commented 10 years ago

Hi, im trying to run Cooja with some native mote types to speed up the simulation (I'm currently using the Sky mote type). If I run Cooja, start a new simulation with default parameters, create a Cooja Mote Type with contiki/examples/rime/example-broadcast.c as the source, create some Mote instances, and run the simulation Cooja crashes out with the following.

java.lang.NullPointerException at se.sics.cooja.radiomediums.DirectedGraphMedium.analyzeEdges(DirectedGraphMedium.java:217) at se.sics.cooja.radiomediums.UDGM$1.analyzeEdges(UDGM.java:119) at se.sics.cooja.radiomediums.DirectedGraphMedium.getPotentialDestinations(DirectedGraphMedium.java:234) at se.sics.cooja.radiomediums.UDGM.createConnections(UDGM.java:181) at se.sics.cooja.radiomediums.AbstractRadioMedium$1.update(AbstractRadioMedium.java:260) at java.util.Observable.notifyObservers(Observable.java:159) at java.util.Observable.notifyObservers(Observable.java:115) at se.sics.cooja.contikimote.interfaces.ContikiRadio.doActionsAfterTick(ContikiRadio.java:351) at se.sics.cooja.MoteInterfaceHandler.doActiveActionsAfterTick(MoteInterfaceHandler.java:308) at se.sics.cooja.contikimote.ContikiMote.execute(ContikiMote.java:148) at se.sics.cooja.motes.AbstractWakeupMote$1.execute(AbstractWakeupMote.java:47) at se.sics.cooja.Simulation.run(Simulation.java:280) at java.lang.Thread.run(Thread.java:724)

It looks like a problem with the radio simulation, so I selected some of the other medium types but they also crash out. Are there any Cooja Mote Type examples anywhere which work with the radio (blink works but its not useful)?

cmorty commented 10 years ago

What version are your working on?

tomhoward1 commented 10 years ago

Latest checkout.

cmorty commented 10 years ago

Is that all you get? Or is there another exception in your log? Although I would have implemented those lines differently, I have no idea how it is possible to get a NullPointer in that line. There should also be some examples in the regression testes.

g-oikonomou commented 9 years ago

Where are we on this one chaps? is this still valid?

joakimeriksson commented 8 years ago

Probably not - not even an answer here for more than a year so I guess this could be closed?