bluerobotics / companion

Companion computer startup scripts and examples
https://www.ardusub.com/operators-manual/companion-web.html
GNU General Public License v3.0
48 stars 54 forks source link

flash_px4: skip ssl check #423

Closed ES-Alexander closed 2 years ago

ES-Alexander commented 2 years ago

Seems like companion's current Python SSL is too outdated to successfully download ArduSub firmwares. Update avoids checking ssl (not super ideal, but bandaid until companion 1 is available)

Probably need to make a 0.0.30 release so people can use this. In the meantime normal flashing (via uploaded file or direct connection to QGC) should still work, and if necessary there's a terminal workaround to apply this fix manually using sed:

sed -i '/from urllib2.*/a import ssl' ~/companion/tools/flash_px4.py
sed -i 's/urlopen(\w*/\0, context=ssl._create_unverified_context()/' ~/companion/tools/flash_px4.py
patrickelectric commented 2 years ago

Will wait to @Williangalvani review, after that we can merge and do a new release.