GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - robert-solomon12/R.Pi-Quad_X: A F330 Quadcopter Project running a Raspberry Pi as the Processor & remotely controlled by an Android Smartphone App. Special Acknowledgements given to Richard Wendel for the inspiration of this project.

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
IMG
IMG
 
 
Presentation for Quadacopter Project
Presentation for Quadacopter Project
 
 
setup/hostapd
setup/hostapd
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
piquadserver.sh
piquadserver.sh
 
 
setup_pi_software.sh
setup_pi_software.sh
 
 
websocket.cpp
websocket.cpp
 
 

Repository files navigation

R.Pi Quad_X (Quadcopter Project)

Websocket and MultiWii serial code to control a quadcopter, running on a Raspberry Pi.

PiQuadcopter based Project, running on the Raspberry Pi. Note that I've used the Raspberry Pi 3 but it was originally tested on a Raspberry Pi 2 according to Richard Wendel.

Overview of all the tech

  • The first thing to do is to create a hosted Wi-Fi network. To accomplish this we use isc-dhcp-server and hostapd
    • isc-dhcp-server serves as the DHCP server for our Wi-Fi network
    • hostapd serves as access point management, essentially making a Wi-Fi card into a router
  • Now for communication with our MultiWii device. There is the C library with the MSP protocol, and I use a backbone library libserialport
    • libserialport is downloaded from their git repository, and installed
    • cMultiWii, my MSP implementation is downloaded from the git repository. This will be compiled later
  • Websocket communication is needed next. I use the websocketpp library, implemented in this repo.
    • websocketpp is not installed. It is a header-only library (.hpp), and is compiled each time (with the intention of improving performance)
  • Compiling websocket.cpp in this repo will build the executable that will recieve commands from a remote control, and then relay them to the MultiWii. It compiles the websocketpp library which takes along time, and the cMultiWii library which is quick to compile.

Instructions to set up your Pi with all of the software it needs:

  • Download/clone this repo
  • Run setup_pi_software.sh, which will install libserialport, isc-dhcp-server, hostapd, and download cMultiWii, websocketpp. It will also compile the websocket server
    • You need to check to see if your MultiWii is /dev/ttyUSB0. Check the troubleshooting section for more information
  • Since your network configuration and device might be different, your /etc/network/interfaces, /etc/default/isc-dhcp-server, and /etc/dhcp/dhcpd.conf files are not automatically modified.
  • Add the following configuration to your /etc/network/interfaces file in order for hostapd to work. Also, remove any reference to wpa_supplicant, as it causes issues with hostapd
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.10.1
  netmask 255.255.255.0
  gateway 192.168.10.1
  • Add the following configuration to your /etc/default/isc-dhcp-server file in order for isc-dhcp-server to know what device to use
INTERFACES="wlan0"
  • Add the following configuration to your /etc/dhcp/dhcpd.conf file in order for isc-dhcp-server to know what subnet to use
subnet 192.168.10.0 netmask 255.255.255.0 {
    range 192.168.10.1 192.168.10.30;
}
  • You need to ensure wlan0 and hostapd.conf are correct. Check the troubleshooting section for more information

Running the program and automatic startup

  • I would suggest a reboot after all of the installation process
  • To start up the hosted network and the websocket, run sudo ./piquadserver.sh
  • To schedule everything to start up automatically on boot, edit /etc/rc.local with something like /home/path/to/piquadserver.sh but if that doesn't work as it didn't for me, use a relative path like I did with something like: cd home/pi/PiQuadcopter/ ./piquadserver.sh & exit 0
    • rc.local is called automatically on startup.
    • Check troubleshooting for more help

Troubleshooting

  • To find your wireless interface, run ifconfig
  • To find your USB device, run dmesg | grep ttyUSB and look for what number it is
    • Once you find your device, you will need to edit line 4 of configure_port.c within cMultiWii to reflect the proper device. You will have to recompile.
  • If your wireless interface is not wlan0, then you will have to change it in your interfaces file, and in hostapd.conf
  • Check /etc/hostapd/hostapd.conf for hostapd configurations, and make sure they match your interfaces configuration
  • If hostapd is throwing errors similar to: n180211: Could not configure driver mode ... then you probably need to kill the instance of hostapd already running.
    • Run ps -A to view all active processes
    • Find the process ID number for hostapd
    • sudo kill <process ID> will kill hostapd and hopefully resolve the issue
  • If there are any problems with isc-dhcp-server, try running sudo journalctl -u isc-dhcp-server.service to look for errors
  • If you need to recompile at any time, just run make at the top level of this repository.

APK For Android Smartphone

  • You can find the following Application for your Android Smartphone here.


Should you have any problems, don't hesitate to contact me on my email at:
[email protected]
or if you find a bug
open up an issue here

About

A F330 Quadcopter Project running a Raspberry Pi as the Processor & remotely controlled by an Android Smartphone App. Special Acknowledgements given to Richard Wendel for the inspiration of this project.

Topics

android-smartphonec-plus-plusdronehostapdiotmultiwiiprogrammingquadcopterraspberry-piraspberry-pi-3websocketwi-fi-network

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.