Wireless Mesh network with contiki OS - sensors

I am working on a project called sensorhub. In that, sensors needs to communicate with each other in a mesh network and need to send the data to the border router.
I found that contiki os can do the mesh network work.but i didn't know how to get started with it.
My question is,
Is there any possibility that cc26xx can be done with cooja simulator ?
If answer to the first question is No. what kind of things I need to follow to make the mesh network work with cc26xx/cc13xx?

No. You can use msp430 based platforms, such as sky or z1 in Cooja.
Contiki uses RPL for IPv6 multihop routing in order to build a single-parent routing tree on top of the mesh. The mesh network is a sort of service provided by the system, you don't need to do anything special to enable it. See contiki/examples/ipv6/ for some examples on how to send packets between nodes. These examples work in both star and mesh network topologies, as long as there's a RPL root node somewhere in the network.

Related

Make ROS independent from wlan connection with new network inteface

I am starting ROS on Ubuntu 20 on Raspberry PI with setting ROS_HOSTNAME to $(hostname).local and ROS_MASTER_URI to http://$(hostname):11311.
The problem is that if I am connected to WiFi and then that connection fails (for example if WiFi goes out of range), then the robot stops working correctly.
I was thinking that a possible solution could be to create a new network interface or a VLAN and start ROS on that network and then bridge that new network to wlan interface. This would make the network that the ROS is connected to independent from wlan interface, but it would still have access to network if wlan would be online. I would also like to keep the possibility to connect to robot's ROS through another device on the wlan network.
I am asking here for help because I don't have enough networking knowledge to make this work. So any guidelines would be appreciated. If there is another better approach to solving this problem, please let me know.
I suggest using ros_bridge for communication with the robot. It is often used if you have a web interface for your robot and you need to visualize some data from the robot's backend on the web. Or even send a command to the robot.
The counterpart to this node is the roslibjs library. You can find it here
For more info, you can check Robot Web Tools, a collection of tools for web-based robot apps.
However, maybe you are not interested in web apps; you can still use ros_bridge with roslibpy which is python implementation of rosbridge protocol. It is the same as roslibjs, but this uses python instead of javascript.
You can easily create a python app which will use roslibpy to subscribe or publish to topics or call services.
This approach is better because you will encapsulate your robotic backend, and you can control what is visible to the outside world with params for the ros_bridge node. You can also handle better reconnects if your robot lost wifi connection.
Still, you can use exposed ROS_MASTER_URI for rviz and debug proposes, but I wouldn't try to use it for controlling the robot because the connection between nodes won't be recreated if you lose wifi connection.
In my work, we used ros_bridge for some time in production AMR, and I have to say that it wasn't as robust as I thought initially. For example, there were issues when the robot changed the wifi access points, and caching messages didn't behave according to the documentation. For the web, we still use it but to control a fleet of mobile robots, we had to abandon it, and we developed our solution based on rabbitmq.
But I guess that if you are using Raspberry Pi, then it is not a production robot, and therefore I think you should be OK with ros_bridge.

Which mesh (Zigbee, Thread, Bluetooth Mesh) network protocol for unusual use case?

I’m creating an IOT device with some unusual needs when compared with typical home automation. I wanted to ask if anyone knew of a mesh protocol (Zigbee, Thread, BLE Mesh), that might be able to achieve this user experience:
When someone turns on their device, it looks to connect to a mesh network, comprised of other devices they have previously “friended”.
If no network is found, it creates its own mesh network, available for other “friended” devices to connect to, when those devices turn on.
If the device creates its own mesh network (as in behaviour above), but no one connects to it – and then the device finds a different network with more than one friend on it, the device should kill its own network in favour of connecting to the other.
I’m expecting that there will not be a “master” node who has “friended” every possible device that wants to join the network – I’d like the possibility for “friends” to bring their “friends”, to also join the network.
If a partition in the network occurs (this is very likely to occur in my use case), the network should automatically re-form when the devices are close to each other again.
All devices are expected to be identical in function, size, software – so BLE Mesh is probably not suitable given it needs a “Provisioner”?
Messages transferred will be bespoke to this application – ruling out Zigbee’s Application Layer?
Messages will be small in size, so data transfer speed is not a big concern.
I believe from what I’ve read that Thread is probably the most suitable for this use case – but wanted some other opinions to see what the best choice might be?
Seems to be a bit of a mine field to fully understand the ins and outs of all of these mesh protocols!
I believe Thread/OpenThread addresses all of the use case items you listed above.

Ethernet connection in bus topology

We are planning to use Ethernet bus topology (wiki). The reason using this very old topology is hardware limitations and software requirements. Collisions should be OK, as bandwitdh requirement is very low.
My problem is, how can we test this topology with modern Ethernet controllers and software like Ubuntu etc. I could not find a good implementation example.
I have tried connecting three Intel Ethernet controllers (with Static IPs) together and only two of them had link at a time (they worked in point-to-point connection as usual)
"Modern" hardware is rather limited when trying to build a bus topology - it's much easier to build a more usual star/tree network. However, with the right key components you can even connect both topologies.
From the software point of view, the network just "works", i.e. as long as the network is configured correctly the software applications can (and should) be oblivious to the network layout.
With an assumed Ethernet network, the logical structure of each segment is a bus anyway: each device can just talk to any other device, regardless of where and how they are connected.

What is P2P and mesh networks? Can anyone help me in this?

Right now I am working on a project which fully depends on peer-to-peer communication (ie, no centralized server) with no internet connection. I'm studying about peer-to-peer for the last week, I came to know about the mesh network things. It seems similar to P2P.
I want to know whether the P2P is a part of the mesh networking concept or they are the same? Is there any difference between these two?
As far as my research, it's really hard for me to find the thing I want. Can anyone explain it in a simple manner? Because what am I getting all the time is the same answer without a reference on what is the relation between these two.
P2P and mesh network are usually used when referring to concepts on different network layers.
A mesh network is a topology used to organize nodes into a network that can transmit data between nodes that are not in direct physical contact with each other. Different models on the same layer would be star (e.g. local ethernet setups) or hub-spoke topologies for example.
P2P on the other hand refers how endpoints talk to each other on the application layer, i.e. they connect to each other "directly" (abstracted over the underlying network layers of course) to exchange information. It contrasts with the client-server model, where a server would act as relay or storage for the data that clients read or write.
Peer-to-peer refers to the hierarchy, that all stations are on the same level.
Mesh refers to the cabling scheme, a many-to-many network.
A peer-to-peer network may connect may use bus, ring, or mesh cabling.
A client-server network mostly uses star cabling scheme.
P2P is an overlay network on top of the Internet. The P2P protocols are on the Application layer if you are considering OSI reference model. In addition, it is a logical organization of nodes and nodes basically can communicate with each other without the need for a central node (coordinator). Therefore, the nodes need to have an Internet connection.
whereas, mesh is a physical topology (not logical topology) where each node is connected to every other node directly (of course if it is not partial mesh topology)

Simple Universal Plug and Play ( uPNP ) to find Raspberry Pi on Network

I have a RaspberryPi connected to my home network via WiFi with a dynamic ip address. I then have my iPhone connected to the same network also via WiFi. The Pi has a lightweight c++ HTTP server running on it that can execute commands. I now want to write an Objective-C app that can find the Pi on the network, regardless of it's ip address, and send it commands. So, Universal Plug and Play seems like the logical solution - but everything I find on Google is dealing with Media players and streaming audio/video content.
I just want the Pi to somehow simply broadcast on my network - "Hey, I'm RasberryPi and my IP Address is 192.168.0.5!".
Can somebody please suggest a package or solution to this problem? Thanks!
For the RPi side I would suggest GUPnP as long as you can fulfill the dependency requirements. It's a very modular framework so you don't need to load or use any of the multimedia related things if you don't need them. It's based on glib and libsoup and allows you to fairly easily define and implement your own UPnP services. Take a look at the BinaryLight example: It implements a BinaryLight Device that contains a SwitchPower service with several methods and two state variables (properties). You should be able to hit the ground running if you start with that. There's documentation on how to write a server.
The components you are going to need/want:
libgssdp, handles discovery, used by gupnp
libgupnp, the actual upnp implementation, used by your app
the dependencies (glib, gio, gmodule, libsoup, libxml)
Also possibly for testing (this on a desktop linux machine since it requires gtk):
gupnp-tools, contains gupnp-universal-cp
EDIT: If you really don't want to implement any UPnP functionality, it's possible you could just use GSSDP for the IP discovery. This could be very simple: see test-publish example.

Resources