Connect To Multiple Wireless Networks With A Raspberry Pi

6 Exciting Raspberry Pi Multiple Camera Applications: From Under the Sea to up in the Space

Posted: February 2, 2021

The Raspberry Pi is a powerful single-board computer to help you do proof-of-concept of your ideas. To make the Raspberry Pi smart enough to realize what we want, we’ll need it to sense the world. Read more…



Raspberry Pi MQTT Server – Install and test Mosquitto

There are several applications that can be used to send and receive through MQTT, but the simplest on the Raspberry Pi is probably Mosquitto. We will install this on the Raspberry Pi first:

After installation, a Mosquitto server is started automatically. We open a subscriber in the channel “test_channel” waiting for messages:

The channel is here like a frequency, on which one hears. For example, different data may be sent in different channels (e.g., temperature, humidity, brightness, etc.).

In order to simply transfer data, we can either use the same Raspberry Pi (open new terminal / SSH connection) or send the data from another Pi. If we use the same Raspberry Pi, use is easily possible. For this we simply send a test message (as publisher) in the same channel:

Otherwise you have to specify the internal IP address (eg of the recipient instead of “localhost”. On the receiver side, the message should appear soforn.


2. Choose right usb Wi-Fi adaptors

So one thing I discovered digging further is it’s actually useful to have Wi-Fi adaptors:

a) of the same make

b) that are confirmed to support ad-hoc / mesh mode

And funny thing I’ve ordered my RPis separately and they had 2 different wi-fi dongles. I’ve decided to order 2 new ones that were recommended as the ones that definitely support mesh net mode (in this thread for example ) so went ahead and ordered 2 x “Edimax EW-7811Un 150 Mbps Wireless 11n Nano Size USB Adapter” from Amazon.

2. Configuring the .bashrc file

So here is the main thing that needs to be done. We need to say our computer who is the master computer running ROS and what is there’s IP in the network. Since Computers running ROS don’t know there IP address.

First in Master PC open terminal and type:

go to the bottom of your .bashrc file and paste then save it.

In first line we specify the address of the master along with the port to operate.

we basically say our master PC that you are the Host so in order to specify the IP address we say take your own localhost IP address.

finally source your .bashrc file

Now we need configure .bashrc file of our raspberry pi

as i know the IP address of my raspberry pi , I will just ssh into the pi by my ubuntu terminal.

Enter your Username and password of Pi.

Now i am in my RPi.

Now i am in my RPi.

Now you have to configure the .bashrc file here

go to the below of your file and paste then save

You can see the change  we here specified ROS_MASTER_URI as here is IP address of our master PC. We tell the IP address of master PC  to our Pi. Rest of the line specifies IP address of the own just it.

finally you have to source your .bashrc file

In above steps please specify correct IP address of your devices

Multi Camera Solutions for Nvidia Jetson Nano

Posted: September 16, 2019

Things to know about using multiple cameras on Jetson Nano The Nvidia Jetson series is known for its extraordinary performance in artificial intelligence with a small form factor. Since the Jetson TX1/TX2 could be too Read more…

1 comment

VLAN Tagging On Your Switch

Most modern managed Ethernet switches can handle VLAN tagging. All you need to do on the Switch side is enable tagging of the selected port to all the VLANs you want to connect to your RPi. How to do that differs from Switch to Switch. On my HP switch it’s only a matter of ticking some boxes in the VLANs – Participation / Tagging menu. There you select a T for each VLAN you want to connect to the selected Ethernet port. And don’t forget to click Apply for each VLAN.  Normally an output port of the Switch is Untagged

Normally an output port of the Switch is Untagged. This means that none of the packets sent or received through this port are modified by the Switch. This also implies that the packets can belong to only one VLAN. Untagging a particular output port to a different VLAN will disable the port on the VLAN it previously belonged to.

If you set an output port of the Switch to Tagged to VLAN X, all packets belonging to VLAN X will be transmitted or received through the select port as well, all packets will carry the VLAN number. You’ll have to tag the same Ethernet port to more than one VLAN, otherwise it will not make much sense to tag a port. You can even leave one VLAN untagged to that port. In mixed mode you can have one Untagged VLAN connected to a port and one or more Tagged VLANs connected to the same port. In this mixed mode a normal computer will only be able to communicate with the untagged VLAN. All tagged packets will be ignored by a physicial network adapter. And a physical network adapter will never send out tagged packets, only virtual network VLAN adapters can do that. A computer can only connect to the Tagged VLANs if it is set up properly using IEEE 802.1q virtual VLAN network adapters. Tagging a port implies that the connected computer (or other network device) has to be IEEE 802.1q compliant. Otherwise it won’t understand the modified packets. Normal computers won’t be able to connect to such a Switch port, without appropriate settings. I’ll cover the RPi settings to make it IEEE 802.1q compliant next.

How To Set Up a WireGuard VPN Server on Ubuntu Linux

With WireGuard now officially supported by Ubuntu and integrated into the Linux kernel, I’ve decided it’s high time to for dedicated guide on how to set up a WireGuard VPN server on Ubuntu.…

TorqueWrench • 22 Apr 2020


If you are lucky enough to have an internet service provider which supports IPv6 you may want to make one more small change to the /etc/dhcpcd.conf file. Per default the file is configured to use privacy IPv6 addresses. This means that your IPv6 address may change from time to time and can not be linked to a specific computer. Which is a nice feature, for a desktop computer. However, your Raspberry Pi is probably going to be used as a server, in which case having a dynamic IPv6 address is not what you want. To fix this edit the file /etc/dhcpcd.conf once more and find the line containing slaac private and change it into slaac hwaddr. Then reboot your Pi or the networking service once more and your Raspberry Pi will get a fixed IPv6 address from now on, based on its MAC address.


Leave a Reply

Your email address will not be published.