Implementing Trickle Algorithm with Raspberry Pis over WiFi - linux

I have three Raspberry Pi 2 Model B with me and each of them have been hardcoded to IP addresses such as 192.168.50.x/24 and each of them run an avahi-daemon in order to provide the mDNS and easier to ping when using the .local suffix.
for instance
Raspberry Pi #1
IP Address 192.168.50.1 subnet 255.255.255.0
hostname: hydrogenPi
mDNS: hydrogenPi.local
Raspberry Pi #2
IP Address 192.168.50.2 subnet 255.255.255.0
hostname: heliumPi
mDNS: heliumPi.local
Raspberry Pi #3
IP Address 192.168.50.3 subnet 255.255.255.0
hostname: lithiumPi
mDNS: lithiumPi.local
All the Pis are working in Ad-hoc mode and are using the batman-adv version 2015 which is available on the Pis already.
I would like to send some files over the ad-hoc network using WiFi (Dongle used LogiLink Wireless Adapters with Ralink RT5370 driver) using the Trickle Algorithm RFC Standard 6206.
Are there any available code snippets or ideas where I can start the implementation of the Algorithm?
NOTE: I want to flood the ad-hoc network with data in an efficient manner and hence I was thinking of the Trickle Algorithm. SInce it is now an RFC standard does it already have implementations available in Raspberry Pis like 6LoWPAN et.al. which I came across in lib/modules/4.13.7+/kernel/net/ in Raspberry Pi directory ?
Thanks

I have found a Python programmed repository on GitHub
There is a RPL(Routing Protocol for Low-power & lossy networks) Repository which is called simpleRPL
In the /RPL folder there is a simple Trickle Timer implementation

Related

How can I do a http.request using a different gateway?

I have one network connection on my Macbook Pro. It is configured by my ADSL modem by DHCP. That modem is on 192.168.1.1 . I also have a cable modem connected to the network. I switched its DHCP server off. It is on 192.168.1.254 .
How can I connect to a URL using the cable modem?
I think I have to set up a vlan which I then can use by setting the localAddress option of http.request. Am I right?
Ok, I found out that it is not possible with one ethernet interface. So I bought another usb to ethernet adapter. Now one is configured by DHCP. The other is configured by hand. In node I use the localAddress to set which interface to use.

RPi: one common network between Wi-Fi module and Ethernet

So, I have Raspberry Pi B+. And compatible (I have checked, it worked) Wi-Fi module for RPi. I use Raspbian.
My task is build a router from RPi (with Wi-Fi access point).
But, one important detail there.
I don't need internet access on this setup.
This setup will only give us communication between Wi-Fi (1 or more) and Ethernet (1) clients.
For example, in this LAN:
192.168.1.1 - is RPi itself
192.168.1.10 - Ethernet client
192.168.1.15 - Wi-Fi client #1
192.168.1.20 - Wi-Fi client #2
...
How to build router on RPi, which works without internet by scheme described above?
Thank you for your help! If you have questions, feel free to ask, please.

Share wireless connection with ethernet device - Raspberry Pi 3 (Raspbian)

I would like to share a internet connection to a computer which is connected to Raspberry Pi 3 via ethernet cable. I am using WIFI connection for my Raspberry.
I have already set the IP settings on other computer but it does not work like when you are connecting two computers.
I need static IP on Raspberry and on other computer. I have already set that Raspberry has static IP (wlan0), but when I set ethernet (eth0) to static IP, internet on Raspberry stops working.
That is how my network should be
ifconfig from Raspberry
Thank you for your help, BR Matevz
I suggest you need to use a network range for the network between the computer and the Raspberry pi. The network between the router and Raspberry is 192.168.50.0/24
The network between the computer should be something different, for example it could be: 192.168.51.0/24
The Raspberry pi could then be 192.168.51.1 and the computer could be 192.168.51.2
You would then have to use IP forwarding on the PI and possibly NAT as well.

Finding device on network without its ip

We have developed a device that is connected to our clients network and we would like to be able to get its ip or set the ip without knowing its ip.
The device has a Linux OS.
We can save the device MAC Address before giving it to customers. We can program a service to broadcast the device IP and MAC Address to a certain IP or port/socket. We can listen to a certain port/socket for commands. Is this the right direction? Should we investigate in other network protocols other than TCP/IP?
We have seen this feature in hardware/device manufacturers provide a CD with a software that can locate their devices on a network even if they have been newly added to the network without network or ip configuration.
Best regards,
Hussam Kazah
Using propriety broadcasting protocol is a very common technique for detecting devices on network without knowing it's name.
However there's a better option:
UPNP, is an excellent protocol for achieving your goals.
libupnp can get you started in no time.
There's a standard protocol called DHCP which allows a network device to make a broadcast request for its IP address. This protocol is widely used by network appliances. On the other hand you may scan your local network for all connected devices using ARP (address resolution protocol) using for example arp-scan utility.

Bridge between simulated network and real host

I need to build a bridge (tap) between a simulated network (NS-3) and the real Linux host So when the "bridged" node receive a packet in NS-3, the real Linux host receive the packet.
How i can build such bridge? Could you give example? Thanks.
one way is to use linux bridge. Create a bridge and add the physical host interface & logical interface (tap) in the same bridge.

Resources