2025-11-17, 12:42 PM
Several of us users have encountered difficulties configuring TinyPilot on a second Raspberry Pi in "managed" Wi-Fi mode and "remote" mode. While awaiting an update, we've found a solution.
After configuring the autopilot's Pi as "master" and the second one as "managed," if the "remote" option is checked, it becomes impossible to configure the address 192.168.14.1. It doesn't persist when you leave the page. To keep it, you have to modify "host":192.168.14.1 and "remote":true directly in the hat.conf file. But even then, the second Pi almost never connects to remote mode, although I miraculously succeeded twice out of hundreds of attempts.
When this doesn't work, the "pypilot web" log is as follows:
2024-02-11_11:02:38.34162 failed to read config //.pypilot/web.conf
2024-02-11_11:02:38.34245 using port 80
2024-02-11_11:02:38.34250 processing clients
2024-02-11_11:03:45.33523 Client connected lsltJJcmV7ZNtAJ2AAAB
2024-02-11_11:03:45.33534 failed to read config file: //.pypilot/pypilot_client.conf [Errno 2] No such file or directory: '//.pypilot/pypilot_client.conf'
2024-02-11_11:03:51.35921 Client disconnected lsltJJcmV7ZNtAJ2AAAB
2024-02-11_11:03:56.48603 Client connected LF-Tdl6yqCXL5BSOAAAD
2024-02-11_11:04:35.43175 Client disconnected LF-Tdl6yqCXL5BSOAAAD
Krystall, a French user on the "hisse et oh" forum, found a workaround.
The file of the second Pi to modify is "/tinypilot/pypilot/pypilot/client.py". However, the change is never applied.
You need to retrieve "/tce/optional/pypilot.tcz", then run "unsquashfs pypilot.tcz" in a folder on your desktop.
This will create a folder called "squashfs-root".
Inside this folder, you need to modify "/squashfs-root/usr/local/lib/python3.6/site-packages/pypilot/client.py".
On line 152, replace "configfilepath = os.getenv('HOME') + '/.pypilot/'" with "configfilepath = '/home/tc/.pypilot/'" as on line 159.
Do the same with "/squashfs-root/usr/local/lib/python3.6/site-packages/pypilot/web/web.py".
Then run "mksquashfs squashfs-root pypilot.tcz" and replace the new "pypilot.tcz" file in its original location.
With these steps, the second Pi will switch to "managed" and "remote mode".
Other users are having trouble switching their TinyPilot to "managed" mode with an existing Wi-Fi network on their boat, but haven't found a solution yet.
Has anyone succeeded?
After configuring the autopilot's Pi as "master" and the second one as "managed," if the "remote" option is checked, it becomes impossible to configure the address 192.168.14.1. It doesn't persist when you leave the page. To keep it, you have to modify "host":192.168.14.1 and "remote":true directly in the hat.conf file. But even then, the second Pi almost never connects to remote mode, although I miraculously succeeded twice out of hundreds of attempts.
When this doesn't work, the "pypilot web" log is as follows:
2024-02-11_11:02:38.34162 failed to read config //.pypilot/web.conf
2024-02-11_11:02:38.34245 using port 80
2024-02-11_11:02:38.34250 processing clients
2024-02-11_11:03:45.33523 Client connected lsltJJcmV7ZNtAJ2AAAB
2024-02-11_11:03:45.33534 failed to read config file: //.pypilot/pypilot_client.conf [Errno 2] No such file or directory: '//.pypilot/pypilot_client.conf'
2024-02-11_11:03:51.35921 Client disconnected lsltJJcmV7ZNtAJ2AAAB
2024-02-11_11:03:56.48603 Client connected LF-Tdl6yqCXL5BSOAAAD
2024-02-11_11:04:35.43175 Client disconnected LF-Tdl6yqCXL5BSOAAAD
Krystall, a French user on the "hisse et oh" forum, found a workaround.
The file of the second Pi to modify is "/tinypilot/pypilot/pypilot/client.py". However, the change is never applied.
You need to retrieve "/tce/optional/pypilot.tcz", then run "unsquashfs pypilot.tcz" in a folder on your desktop.
This will create a folder called "squashfs-root".
Inside this folder, you need to modify "/squashfs-root/usr/local/lib/python3.6/site-packages/pypilot/client.py".
On line 152, replace "configfilepath = os.getenv('HOME') + '/.pypilot/'" with "configfilepath = '/home/tc/.pypilot/'" as on line 159.
Do the same with "/squashfs-root/usr/local/lib/python3.6/site-packages/pypilot/web/web.py".
Then run "mksquashfs squashfs-root pypilot.tcz" and replace the new "pypilot.tcz" file in its original location.
With these steps, the second Pi will switch to "managed" and "remote mode".
Other users are having trouble switching their TinyPilot to "managed" mode with an existing Wi-Fi network on their boat, but haven't found a solution yet.
Has anyone succeeded?