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.72k stars 2.58k forks source link

mobility in Contiki 3.0 #2341

Open DavidAngc opened 7 years ago

DavidAngc commented 7 years ago

HI, I have tried the mobility plugin on Contiki 2.7 and it is successful. However, when i use it for Contiki 3.0, it does not work. Can anyone advise how to implement the mobility plugin in Contiki 3.0?

Regards,

Gotacotrim commented 7 years ago

Hi David,

First thing to do is change the libraries on Mobility.java if you didn't do yet (old) import se.sics.cooja.ClassDescription; (new) import org.contikios.cooja.ClassDescription;

Then you will get some problems with the line private MessageList log = new MessageList();

The MessageList library has changed to MessageListUI, so you will need to update the code.

I hope this could help you.

regards,

avitzavi commented 6 years ago

I also had to update the path to cooja.jar in the build.xml BUT: Even after changing the libraries (all of them, not just .ClassDescription) in Mobility.java and changing MessageList to MessageListUI, I am still getting errors when trying to build the Mobiity package for the first time.

avitzavi commented 6 years ago

I got it to successfully build with the following changes to Mobility.java: 1) changed all mentions of "import se.sics.cooja." to "import org.contikios.cooja." 2) changed "import org.contikios.cooja.GUI;" to "import org.contikios.cooja.Cooja;" 3) changed ~2 mentions of getGUI() to getCooja 4) changed ~3 mentions of "GUI" (on those in all caps) to "Cooja"

I did not change MessageList to MessageListUI in any location. Source: https://sourceforge.net/p/contiki/mailman/message/34787343/ Let me know if this sounds right!

EDIT: while it builds, I cant get it to show up as a plugin in Cooja, even after adding the path and "activating for this session"...

JayanthEM commented 6 years ago

Hi, The mobility plugin is working for me in contiki 3.0. Refer this blog http://contikiemj.blogspot.com.

JihenHlel commented 6 years ago

@avitzavi and @JayanthEM i did the same steps you followed but i didn't get mobility in tools, Any propositions???

JayanthEM commented 6 years ago

In the mobility plugin check the cooja.config file. If the directory path is like se.sics.cooja... change it to org.contikios.cooja... and also in mobility.java replace se.sics.cooja with org.contikios.cooja

JihenHlel commented 6 years ago

it's ok @JayanthEM thank you i solved the problem, this link may help others: http://miracbektas.com/?p=123 , @JayanthEM you didn't sign anything about config cooja file in your blog you have to updated it :)

ayoub-root commented 6 years ago

follow this link but you need to chnage something in mobilty.java replacethe line messagelist log = new messagelist(); by messagelistui log = new messagelistui()

faroouq commented 5 years ago

After step in "ayoub-root commented on Sep 20, 2018" above I run sudo ant clean in the mobility folder to clean previous compilation. Then I run sudo ant jar to make new compilation.

It runs. Thanks all.

tarimislam commented 5 years ago

I am facing problem to start onus in Contiki. Problem is given above.

onus

Any solutions

nilampradhan2 commented 2 years ago

I am trying to build mobility in contiki-ng. it is giving me following error. Why is it showing /../../tools/tools/.../ in path. please help

[java] WARN [AWT-EventQueue-0] (ProjectConfig.java:240) - Trying to import non-existant project configuration: /home/user/contiki-ng/tools/tools/cooja/apps/mobility/cooja.config [java] FATAL [AWT-EventQueue-0] (Cooja.java:437) - Error when loading extensions: Error when loading extension: Project directory does not exist: /home/user/contiki-ng/tools/tools/cooja/apps/mobility [java] org.contikios.cooja.Cooja$ParseProjectsException: Error when loading extension: Project directory does not exist: /home/user/contiki-ng/tools/tools/cooja/apps/mobility

TiagoDemay commented 2 years ago

Estou tentando construir mobilidade em contiki-ng. está me dando o seguinte erro. Por que está mostrando /../../tools/tools/.../ no caminho. por favor ajude

[java] WARN [AWT-EventQueue-0] (ProjectConfig.java:240) - Tentando importar configuração de projeto inexistente: /home/user/contiki-ng/tools/tools/cooja/apps/mobility/cooja.config [java] FATAL [AWT-EventQueue-0] (Cooja.java:437) - Erro ao carregar extensões: Erro ao carregar extensão: diretório do projeto não existe: /home/user/contiki-ng/tools/tools/cooja/ apps/mobility [java] org.contikios.cooja.Cooja$ParseProjectsException: Erro ao carregar a extensão: o diretório do projeto não existe: /home/user/contiki-ng/tools/tools/cooja/apps/mobility

@nilampradhan2, I believe the PATH is wrong, there are two "tools" in yours.