APSync + rPiZero + Internet?

I have APSync working as a hotspot on a raspberry pi zero wired to a pixhawk hexacopter. I can upload dronekit-python scripts and Mavlink is working great. It is all flying and triggering processes by monitoring switches on my Taranis. Life is good, eh?

No. I want more. Is there some way I can add another wireless dongle and bridge to the internet? I would like to update python 2 to 3 but apt-get is useless without access to the Internet. I can’t even upload python scripts to the rPi Zero and browse the Internet from my development machine at the same time. Am I missing something?

Failing an easy way to bridge to the Internet, is there an easy way to disable the hotspot and perhaps assign a fixed IP address?

It’s not a hotspot if can’t reach the Internet, is it?

Seriously, I am grateful for the work some very smart people have offered up to the likes of me.

Sure. Try an LTE modem and use zerotier if you like :slight_smile:

Using Ubuntu has advantages…

If you’re able to run a USB cable to the aircraft for updates etc, set up an “Ethernet Gadget” on the pi, connect it to a laptop that’s on the Internet and turn on Internet connection sharing on the laptop. I’ve done this (on the bench) with APsync on a pi zero successfully. Works on pi zero only, not a full size pi.

Thanks. I will try that.

Hi can you explain how you enabled the ethernet gadget.
I tried these directions:


My original install was apsync.

Now, I can ping through the ethernet gadget, but it says “connection refused” when I try to SSH in through the ethernet/usb port.

When I log into the local wifi (ardupilot), I can ssh in.

Did you get the pi zero w working with the ethernet gadget using apsync or raspbian?

It’s been a year since I worked on this. Unfortunately I don’t recall the exact steps I took. I think the instructions I followed where here, specifically steps 2 and 4. However since you have a working interface for ping it sounds like you’ve successfully passed this point.

I was using the apsync image.

When you say you can “ping through the gadget”, do you mean you can ping the pi gadget interface from your computer?

Do you have Internet connection sharing enabled on your computer for the gadget connection? I’m not sure if that is required in order to get local SSH working, but it would be worth trying just in case that sets up the necessary routing on whatever OS you’re using.

I’d check /etc/ssh/sshd_config on the pi to verify the SSH server is running on all interfaces. Take a look at /var/log/auth.log on the pi to see if there are any interesting error messages from sshd indicating why the connection was refused. Check you don’t have iptables running or anything that might block incoming connections.

I just powered up my pi and it’s still working so if you need any specific information from mine I’m happy to provide it.

I did get it to work, following the instructions in my link, but there were some subtleties.
The main thing is the instructions say to login to raspberrypi.local, but that fails because in the apsync distro, you should login to apsync.local.
Once I figured that out, and did the file configurations on the pi as in the instructions, it worked beautifully.

Thanks so much for the idea!!!
It’s great to have a internet access for the pi!



Are you able to connect from Mission Planner through the Pi Zero running wifi to the flight controller?

I have troubles connecting Mission Planner to AP Sync (on both Pi Zero and Pi 3, see post
APSync cmavnode UDP heartbeat and other packets not accepted by client PC when MAVProxy UDP packets are accepted: why?).

Got it to work.
Only worked on 57600 baud for some reason.
Using Omnibus F4 pro V2 with Chibios. Maybe that’s why.

I’m Italian;

I’m not a programmer; After 2 years I finally fly with a copter 620mm and 2 planes in auto mode perfeclty, thanks to Ardupilot guides, thank to Randy and Lefebrve for copter (not contacted directly, but thanks for their work)

Now I want a telemetry LTE; I connected PI zero W with ApSync (by UART??? TX/RX, I powered it by Pixhawk temporally, it is only less than 200 mA for now without modem), like explained in ardupilot site, companion computer page); I can connect with my PC by wi-fi and with Mission Planner, because all is done by programmer; I can connect my PC and do commands with Putty, as described in ardupilot guide, page APSync, it was simple because all is programmed;

but Is there a simple guide, for not programmers like me, to connect a USB modem to RPI and have a LTE telemetry and a video streaming (via VPN???)

I found only 2 sites that sells it: the Italian Volta (who won the CES Las Vegas this year), and Uavmatrix (from Finland or Norway, not remember), but I don’t want to pay for it, because I don’t work with these drones, but I like them only for hobby.

Excuse me for bad english.