Connecting the Pilot

50 views
Skip to first unread message

Mikkel Roald-Arbøl

unread,
Oct 14, 2020, 6:16:31 AM10/14/20
to autopilot-users

Hi Jonny,

First up, this seems like an amazing framework and I can't wait to get started! And alert: I'm an experimentalist, so a lot of things are new to me figuring out this - which might just be a good thing for providing n00b feedback on the docs. ;-)

I now have Autopilot installed on both a Terminal (Mac) and a Pilot. However, my knowledge is limited when it comes to connecting the two, and right now there's not much help to get from the docs. I have a vague idea that there's some ssh involved (about which I know pretty much 0), or is it simpler than that? Do they need to be connected to the same WiFi network (mine cannot currently where I am stationed)?

An aside: A later request for updating the docs could also be a brief mention of how to install and use virtualenv, in case people are not familiar with this way of working. This was the case for me so I had to figure that out elsewhere and hope for the best (works now, but might be very helpful for other first-timers. Also, it sort of works outside a virtual environment, but the Pilot doesn't as the welcome_msg.txt apparently is missing).

Thanks again, and hope you can help me out here!
Cheers,
Mikkel

jlsaun...@gmail.com

unread,
Oct 14, 2020, 7:30:26 PM10/14/20
to autopilot-users
Thank you for the feedback!!!!! Completely agree on all the above needed documentation.

reading it now and yes the connection docs are totally inadequate.

i'm at like 5% capacity working from home between multiple projects, but here's a brief description for now:

The main "Station" networking object that runs on a Terminal and Pilot receives connections on the port set in prefs.json as `MSGPORT` . The Pilots attempt to connect to the Terminal at the IP address set as `TERMINALIP` and the port set as `PUSHPORT` in prefs.json.

So if you set up your terminal to have static ip 192.168.1.100, say, and set its `MSGPORT` to 5000, then you would connect a pilot to it by setting its `TERMINALIP` and `PUSHPORT` to 192.168.1.100 and 5000.

They have to be able to "see" and connect to one another via IP, (don't have network tunneling implemented), so they should work if they have unique IP addresses assigned to them (eg. not behind a router that acts as a DHCP server like in home networks), for example I connect some Pis to my Terminal through my University's network without issue. More specifically the pilots have to be able to "see" the Terminal, but once they make the initial connection the Terminal can respond even if the pi doesn't have a fixed IP. I can try to help debug network issues if you tell me a bit more about your setup, but network discovery is a sorta general problem and Autopilot's is far from as robust as it could be -- once you get them connected the networking modules work alright though ;).

(dang i'll make sure the welcome_message gets packaged correctly but will make sure the program doesn't fail on account of my sentimental attachment to ye olde internet :p )

i've opened an issue to keep track of this here: https://github.com/wehr-lab/autopilot/issues/24

jlsaun...@gmail.com

unread,
Oct 14, 2020, 7:33:02 PM10/14/20
to autopilot-users
network design described in section 3.5, page 27 of the paper, which needs to be ported over to the docs desperately

planned improvements to networking modules in "mesh networking" here:

Mikkel Roald-Arbøl

unread,
Oct 16, 2020, 7:03:02 AM10/16/20
to autopilot-users
Thanks for the swift replies, and I'm happy to contribute!

When you say that they need to be able to 'see' each other, does that mean that they need to be on the same wireless network? 
Where I am currently (my office), my Mac (Terminal) is connected to eduroam (weak connection), whereas my Pi can't see or connect to eduroam - instead it has an ethernet connection. So I'm assuming that they're not able to see each other this way?

Is bluetooth an option at all? Or can I host a network from the Terminal which the Pilot can then connect to?

In the lab where I'll likely be running my experiments there's absolutely no WiFi connection at all... Terrible, I know!

Cheers,
Mikkel

Mikkel Roald-Arbøl

unread,
Oct 17, 2020, 2:06:13 PM10/17/20
to autopilot-users
...or would it work with an ethernet hub (ethernet splitter) with the Terminal as the input and individual connections to each Pi from the hub? (Would not be able to use Children, but would mean that I wouldn't be relying on wireless). 
Just thinking out loud here. :-)

jlsaun...@gmail.com

unread,
Oct 27, 2020, 8:19:33 PM10/27/20
to autopilot-users
They just need to be on some subnetwork that allows them to be connected directly to one another -- eg. some school networks don't allow you to connect directly to specific ports on other computers on the network -- you can try 'ping'ing one from the other to see if it can connect & the port is open.

currently networking objects only support ethernet/wifi, bluetooth is a bit of a different beast that I know very little about but i would be interested in exploring that if it is useful.

What I do is use a local switch and router in my lab that lets me assign static local IPs to the Pis and terminal pc, all connected with ethernet -- so yes an ethernet hub would work, though there is some slight difference between a switch and a router in how they handle identifying computers on the network, so it might depend still on the subtlety of your exact networking hardware/university network.

Mikkel Roald-Arbøl

unread,
Oct 30, 2020, 9:59:33 AM10/30/20
to autopilot-users
Hi Jonny,
I made it work in the end using my phone as a hotspot - works well for testing it out, but I'll be setting up a router + splitter as a more permanent solution. The point I missed was that I actually had to check which IP addresses were assigned to the devices, and not just use 192.xx which I mistakingly thought.
Now on to the exciting bits - but I know I've got more quesitons better posed in new posts. ;-)
Thanks again!

jlsaun...@gmail.com

unread,
Oct 30, 2020, 2:17:17 PM10/30/20
to autopilot-users
That is an AWESOME solution and i never would have thought of it. keep the questions coming
Reply all
Reply to author
Forward
0 new messages