Code Monkey home page Code Monkey logo

embeddedproject's Introduction

Embedded Project

How to

  1. Use contiki instant virtual machine, start cooja simulator, create one mote type (Z1) using the file node.c as firmware and another type using gateway.c.
  2. Place the gateway mote on the grid and at least one node mote, put them in range of each other and click start.

MQTT part

  1. Install Mosquitto MQTT broker.
  2. Start broker with mosquitto command.
  3. Subscribe to a topic using command mosquitto_sub -h localhost -t "topic" -v.
  4. Publish messages using the commande mosquitto_pub -m "test" -t "topic".

To do

  • Find a way to avoid loop in the graph.
  • Keep routing table of node consistant.
  • MQTT part.
  • Ping system to check if a node is still in range.
  • Subrscriber and publish system for node network.
  • Improving perfomance somehow.
  • Script to interface the gateway mote with MQTT broker (send publish message from serial to MQTT broker);
  • Make node configurable to choose parent with hops or signal strength.
  • Sensor data sending system.
  • Refactor.
  • Fix serial bug (when sending a message to the gateway, the message have to be sent twice, the first time send garbage for an unknown reason).

Uploading to hardware

  1. sudo adduser $USER dialout and then relog (let user access USB devices)
  2. make TARGET=z1 all (Compile)
  3. make TARGET=z1 node.upload and make TARGET=z1 gateway.upload (Upload to device, to select specific device use the argument MOTES=/dev/ttyUSB0)
  4. If needed, burn a new MAC and node id using the command make clean && make burn-nodeid.upload nodeid=158 nodemac=158 && make z1-reset && make login (158 can be replace with the desired ID), then reburn the program to be used.
  5. To read and write into serial ~/contiki/tools/sky/serialdump-linux -b115200 /dev/ttyUSB0. Baud rate for Z1 devices is 115200.

embeddedproject's People

Contributors

rusack avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.