物聯網操作系統 - Contiki


What is Contiki?

  Contiki is an open source operating system for the Internet of Things. Contiki connects tiny low-cost, low-power microcontrollers to the Internet. Contiki is a powerful toolbox for building complex wireless systems.

開始使用Contiki

  官方:http://www.contiki-os.org/

開發環境:

  宿主機:Windows 10 Pro 64-bit (10.0, Build 10586)

  虛擬機:VMware® Workstation 11.1.1 build-2771112

  集成環境:Instant Contiki 3.0 , 解壓:

  在VMware中新建虛擬機ubuntu_contiki,過程中使用Instant_Contiki_Ubuntu_12.04_32-bit.vmdk虛擬磁盤。

  啟動新建虛擬機ubuntu_contiki,登錄密碼為 user 。

使用Cooja

$ cd contiki-3.0/tools/cooja
$ ant run

BUT 執行 ant run ,有如下報錯:

解決辦法:

在 https://github.com/contiki-os/mspsim.git 中下載mspsim-58f187351f3417814aa2d0d92af9e2bb768d92ee.zip文件;

解壓,並拷貝到/contiki-3.0/tools/mspsim/ 目錄下;

重新在/contiki-3.0/tools/cooja/ 下執行 ant run 

仿真運行Contiki小例程

創建一個新的仿真:

設置仿真選項:

添加 motes 到仿真

創建新的mote type ,選擇一個應用及其源代碼文件   (例如:ipv6 udp )

編譯(點擊Compile)、創建(點擊Create)應用 

添加節點仿真

開始(點擊Start)、暫停(點擊Panuse)仿真

運行Contiki 小例程

先運行一個hello world (^_^)試試!

在目錄/contiki-3.0/examples/hello-world 中,執行make

/contiki-3.0/examples/hello-world$ make

生成hello-world.native 文件,執行 ./hello-world.native

/contiki-3.0/examples/hello-world$ ./hello-world.native

清除執行:

/contiki-3.0/examples/hello-world$ meke clean

或者

/contiki-3.0/examples/hello-world$ make distclean

說明:make clean僅僅是清除之前編譯的可執行文件及配置文件。 而make distclean要清除所有生成的文件。

注:hello-world 小例程的分析請參考:http://www.cnblogs.com/abatei/p/5137392.html

---------END


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM