# serial.read_text ## Function Read data from the open serial port and convert it to a string strictly according to UTF-8. ## Syntax ```bt device.open(config).read_text() ``` ## Parameters No parameters. ## Return value | Type | Description | |------|------| | String/Null | Legal UTF-8 returns String; illegal UTF-8 returns `null`. | ## Code Example ```bt port = device.open({type: 'serial', port: 'COM3'}) text = port.read_text() // Output: String print type(text) ``` ## Notes - `read_text()` does not use lossy conversion; please use `read_bytes()` for industrial protocol messages.