• 物联网操作系统


    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

  • 相关阅读:
    提高php代码效率的几点
    jquery各种操作复选框(全选、全不选、自动勾选、反选……)
    封装PDO单例模式类
    Git常用命令
    简化版的sqlserver分页
    Sql Server 数据分页
    Linux 下动态链接库搜索路径问题
    mysqlperformanceblog
    vim 退格键(backspace)不能用
    Linux vi/vim 编辑命令总结
  • 原文地址:https://www.cnblogs.com/kinging/p/5867885.html
Copyright © 2020-2023  润新知