# serial.close ## Function Close the open serial port. ## Syntax ```bt device.open(config).close() ``` ## Parameters No parameters. ## Return value | Type | Description | | ------ | ------ | | Bool | Returns true if the shutdown is successful. | ## Example ```bt port = device.open({type: 'serial', port: 'COM3'}) result = port.close() // Output: true print result ``` ## Notes - The handle remains the Device value after closing, but the underlying port is closed.