Hi @XiangHong -
If you’re trying to use Navigator Web Assistant, but don’t have a Navigator, and are using some sort of Herelink autopilot, that is not supported.
In general, your code looks to be taking over the serial port used for communication with the flight controller. This would of course prevent BlueOS from communicating with it!
Please share the goals for your autonomy - typically using Lua Scripts with a Navigator and ArduSub or ArduRover is the easiest approach to adding specialized functionality or autonomy…