fix broken api when startup.
fix broken api calls.
fix serial.read api.
add serial permission.