Align the sub to the docking port until you will see green lights, then connect with the drone to the service terminal and initiate firmware update procedure. It will then ask you to confirm operation on the main terminal, press the button and the update process will start.
If you damaged your sub and cannot use equipment, then check circut breakers in the engine/reactor bay, and connect popped plugs back to sockets. Then equip the drone with welder and repair all damages outside.