LogoLogo
  • TJUAV Documentation
  • Documentation
    • What is TJUAV?
      • Subsystems
      • Competition Details (2021)
    • How to Use Gitbook
    • Table of Contents
  • RC Guide
    • Introduction
    • Aerodynamics & Flight
      • Forces of Flight
    • RC Electronics
      • Comms
      • Power / Propulsion System
        • Batteries / Battery Chargers
        • ESCs
        • Motors
    • Control Surfaces
    • Propellers
      • Function
      • CW and CCW Propellers
      • Thrust Table
    • Flight Simulations
    • Tools
      • Laser Cutter
      • 3D Printer
    • Getting Certified
  • Software
    • Programming
      • Git
      • Python
      • JS
      • VSCode
      • Mission Planner
    • Mechanical
      • Fusion360
        • Installation
        • Fusion Teams
        • Sketches
        • Sketch Tools
        • Parameters
        • Timeline
        • Solid Tools
        • Components
        • Joints & Assemblies
        • Add-Ins
        • Good Practice
      • AutoCAD
      • Cura
        • Initial Setup
        • Profiles
        • Quality
        • Shell
        • Infill
        • Material
        • Speed
        • Travel
        • Cooling
        • Supports
        • Adhesion
        • Experimental
    • Website
      • Code Documentation
      • Heroku Usage
      • AWS Usage
      • GitHub Pages
  • Hardware
    • Computers
    • Radios
      • RFD900x
      • Ubiquiti Bullet and Powerbeam M2
    • Cameras
      • Gphoto2
      • Sony α5000/α5100
      • See3Cam_CU135
      • Arducam 4
    • Power
  • Mechanical Progress
    • Airframes
      • Razgriz
      • Hyperion
      • Testing Plane
      • Avalon
        • Avalon Mk.1
        • Avalon Mk.2
    • UGVs
      • Electrical System
      • Drop Mechanism
      • Speed Car Super Speed
      • SPARTA
  • Programming Progress
    • Computer Vision
      • Preprocessing Techniques
      • Map Stitching
        • SIFT
      • Detection / Classification
        • Canny / Contours
        • Blob Detection
        • KMeans
        • Mean Shift Filter
        • RotNet
    • Autopilot
      • A*
      • RRT*
      • Genetic Algs
      • Spline Navigation
  • Master Code
    • GroundStation
      • Frontend
      • Backend
    • Computer Vision
      • Image Capturing
      • Map Stitching
      • Detection
      • Classification
    • Autopilot
    • Comms
      • Image Compression
      • Packet Format
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. Hardware
  2. Radios

Ubiquiti Bullet and Powerbeam M2

Setup and troubleshooting for Bullet and Powerbeam M2 transmissions over TCP sockets.

PreviousRFD900xNextCameras

Last updated 3 years ago

Reference

I refer to this as the M2

I refer to this as the dish

INITIAL SETUP

First, power the M2 and Dish using PoE injectors. Generally, you want to use a battery-powered injector for the M2 and an AC powered injector for the Dish. The leftmost LED should be green. Wait for 30 seconds to see if the rest of the M2 & Dish LEDs light up. If they do, skip to the next section.

If nothing happens, it means the Bullet hasn’t connected to the Dish’s Access Point yet. First, you should check all available Wi-Fi connections. If something like TJ-AP or TJ-GS shows up, the Dish is doing its job. Otherwise, you want to access the Dish’s configuration page. On the computer that's connected to the Dish via ethernet, type 192.168.1.20 in a browser. If this doesn't work, you need to set a static IP for the Dish. On a linux computer, use the following command:

sudo ifconfig eth0 192.168.1.7 netmask 255.255.255.0

Click on Properties, then click Use the following IP Address.

Set the IP address to 192.168.1.7 or 192.168.1.x where x is any number except for 20.

You should now be able to access 192.168.1.20 in a browser. If you don’t know the login, ask around. If absolutely no one in the club knows the login, you must factory reset the M2 and repeat above steps. The default login is ubnt for both user and password. Click on the Systems tab and in the bottom right, click on “Upload Configuration”. Upload the Dish configuration file from our GCS repo.

Now access the Bullet M2’s configuration in a browser. Upload the Bullet M2 configuration file from our GCS repo.

ONCE ALL LEDS ARE LIT

You can now attempt python socket connections. Find the IP address you statically assigned to the Dish (most likely 192.168.1.7). On the Ground Station computer connected to the Dish, you must bind to yourself and wait for connections:

import socket

s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)

s.bind((DISH_IP,PORT))

conn,addr=s.accept()

On the flight companion computer connected to the M2, connect to the GS’s open socket:

client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client_socket.connect((DISH_IP, PORT))

You can now transmit & receive data over the air.

Not working?

  • Try pinging the Dish’s IP from both computers

  • Make sure you are connecting over the same port

  • Don’t attempt multiple connections over the same socket; kill both scripts and try again.

  • Bullet randomly disconnecting from ethernet? Run this shell script in the background:

#!/bin/sh
while :
do
    sudo ifconfig eth0 192.168.1.7 netmask 255.255.255.0
    sleep 5
done

On a windows computer, go to Start Menu > Control Panel > Network and Sharing Center or Network and Internet > Network and Sharing Center. Click on Change Adapter Settings in the left panel. A list of connections will be displayed. Right click on the Ethernet connection with the description “Unidentified Network”. Click on Properties, then find Internet Protocol Version 4 (TCP/IPv4) in the scrolling menu. Should look like this: