Optional baudA positive, non-zero value indicating the baud rate at which serial communication should be established.
Optional bufferA positive, non-zero value indicating the size of the read and write buffers that should be created.
Transport.connect uses 65536 when this is omitted.
Optional dataThe number of data bits per frame. Either 7 or 8.
Optional flowThe flow control mode: none or hardware.
Optional parityThe parity mode: none, even or odd
Optional stopThe number of stop bits at the end of a frame. Either 1 or 2.
Options for device serialPort. SerialOptions
Note: According to the documentation of the Web Serial API, 'baudRate' is a 'required' field as part of serial options. However, we are currently maintaining 'baudRate' as a separate parameter outside the options dictionary, and it is effectively used in the code. For now, we are keeping it optional in the dictionary to avoid conflicts.