Hello! I need to make a system for changing pixhawk usb port access rights, like if somebody tries to access my ArduCopter autopilot by connecting it with any PC through usb port the software should prompt for password. Please suggest if I am thinking the wrong way!
My Idea behind this is to make my copter personal and no one can change its settings or load firmware.
Thanks in advance.
You must make more precise what exactly you want to achieve. How about updating by SWD?
I dont know of a ready-to-use software solution.
You could make a semi–secure system of physical obscurity rather easily, depends a bit on what flight controller you’ve got and how brave you are.
For example, change the USB port wiring so that you need a custom cable to connect - dont change the 5v pin, just change the 2 data and 0v pins all around.
Maybe remove the physical connector and solder wires directly to the board and use a non standard connector.
Glue the USB connector into the socket and run that to a custom connector.
I’m guessing this is for compliance with the new Indian regulations? If so, perhaps @bugobliterator could guide you.
I’m not familiar with the new requirements, but it might be an option to just modify the bootloader to remove USB access. (remove OTG from this line https://github.com/ArduPilot/ardupilot/blob/14ad9a58bde667b94cfc1aae2e896cebef07ffdf/libraries/AP_HAL_ChibiOS/hwdef/fmuv3/hwdef-bl.dat#L38)
If you do that, either make sure a uart is available for bootloading, or get comfortable with swd flashing.
That just makes it hard to flash a new firmware, but doesn’t achieve any verification at all, so may not be enough.
You have to modify the bootloader to accept only signed or encoded firmware files.
However as Birdperson would say : In open source community it is considered a d*ck move
Hey, did u ever figure it out? I have been trying but did not get much