CaribouLabs antenna measurement(CLAM) is a tool desgined to test a signal strength in certain environment. It is composed by three units:
- TxUUT - A unit desinged to transmit/stop transmission of signals and control a pan-tilt unit in order to decide transmission direction
- RxMeas - A unit desgined to receive the signals and compute the RSSI, it requires CaribouLite.
- ControlPC: Computer that controls the opertions of TxUUT and RxMeas, it is the only Unit that can communicate with both.
CLAM
CLAM required certain electronics for each unit and install modules:
- RPi model 4B
- RPi hat PCA9685.
- Pan tilt unit. We used the following unit. Platform holding two LD-1501MG servo motors which moves pitch and azimuth angles
- Transmitter technologt - You must own signal transmission unit and adapt it to our interface.
As we the TxUUt, we are using the RPi Zero 2 connected to a CaribouLite unit
CaribouLite on RPi |
- Hostapd - Module allowing a device to become an Access point(AP). It will Configure the RxMeas to be Router.
- Dnsmasq - Module provide network inconfiguration that support the AP creation of hostapd module.
- Iptables - Module that enables control over incoming and outcoming network traffic.
- protobuf - Module that allows to send protobuf messsage, will be explained in Communication.
- For the python files you are need: Numpy, Matplotlib, seaborn, pandas, TOML, smbus
Before we start, we remind you the TxUUT must have transmitter and CaribouLite must be installed on RxMeas
We clone the reopsitory to each unit
git clone https://github.com/cariboulabs/CLAM.git
Then, we enter CLAM directory
cd CLAM
First, we configure the RPi of of RxMeas to be an AP. Download the net_conf.sh and run it.
chmod +x net_conf.sh
./net_conf.sh
After we configured the network of RxMeas we have to make sure the TxUUT and ControlPC are connected to RxMeas as they are rebooted. We will edit wpa_supplicant.conf that manage wireless network connections
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Then, we add to it the following configuration to the file:
network=
{
ssid="CL_ANTPATTERN"
psk="CaribouAntenna4321"
key_mgmt=WPA-PSK
}
We apply the changes by restarting the wpa_supplicant service:
sudo systemctl restart wpa_supplicant
Finally we will reboot both devices
sudo reboot
To connect the TxUUT we will use the command:
sudo nmcli dev wifi connect "CL_ANTPATTERN" password "CaribouAntenna4321"
**Note: ** In case there is a problem with configuration process use the following guide
We will use the 'setup.sh' file to configure the program to start as system rebooting by the command and add required system parameter:
chmod +x setup.sh
./setup.sh --system <system_name>
It will be one the three: ControlPC, TxUUT, RxMeas Configuration & Installation process has been completed.
We developed a communication process based on the UDP protocol and Protobuf messages:
-
UDPcommunicator: The 'UDPcommunicator' is a class desgien in Python and C++. Each class opens a UDP socket which allows us to send, receive and close the socket.
-
Protobuf We will use protobuf message to communicate between systems We have different messages, each with their own data and agenda: 'System', 'Inforamtion', 'Motors', 'Transmit', 'SetFrequency', 'Sampling' and 'GetRssi' These methods are part of external module called 'ProtobufTransformer'(Python, C++).
Add protobuf messages First, we go to Messages.proto in utils dir
cd utils
nano Messages.proto
- We create another Message as in the same syntax
- We add an Enum value to the new message in MessageType
- Since we wrap each message in a spcieal Wrapper message we have to add it to the Wrapper message
- Then we compile it again for python and C++
- Now you have to edit ProtobufTransformer in both sides and the relative context to the different units
The TxUUT is responsible to move the pan-tilt unit to the desiered location and transmit/stop transmission of signals. The module is written in python
- Transmission: Now, we must add transmitor software to:
self.transmitter = ... # Add your transmitter technology
The code must support three names:
- connect - Method to connect transmitter to device
- transmit - Method that require frequnecy, power, wave and bool to transmit or not
- disconnect - Method to disconnect in transmitter technology when ending. The transmitter interface was written in Python
Warning: You are required to know the legal frequncies, power, and wave types to transmit in your country. CaribouLabs will not be responsibe by any means for a breach of law.
The RxMeas unit will handle the signal receiving and RSSI calculations, it was developed in C++
The main unit to control the operations of the CLAM, developed in python. It is configured by TOML file and the results will uploaded into CSV file. Results will be analyzed and provides 3D measurement plot and heatmap plot.
As the services are ready, we go to the Control PC and activate the ControlPC
python3 main.py
We will have CLI interface we will your actions, you must activate the unit and check communication with them using option 1
Using option 5 will allow us to scan certain area depend on Configurations in TOML file "Conf_ControlPC.toml" Don't try put azimuth bigger then 90 degrees, it will mess with the system observation of the upper hemosphere!.
Once the scanning is complete we will receive CSV file with results and heatmap plot. We add antenna pattern plot and 3d plot in plotter.py if needed.