baud rates of 57600 and 115200. Just eliminate the explicit baud rate checking altogether and use atoi().