# Serial Module Possible Error

**URL:** <https://forum.inductiveautomation.com/t/serial-module-possible-error/5920>\
**Category:** Ignition\
**Created:** [February 25, 2013, 12:11am UTC](https://forum.inductiveautomation.com/t/serial-module-possible-error/5920 "2013-02-25T00:11:46Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![rhoag](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rhoag](https://forum.inductiveautomation.com/u/rhoag)\
**Post date:** [March 1, 2013, 3:13am UTC](https://forum.inductiveautomation.com/t/serial-module-possible-error/5920/11 "2013-03-01T03:13:32Z")

</div>

I got the write command to work. Below is the code I’m using to write a two byte HEX message (82 7D) out of the serial port:

```auto
system.serial.configureSerialPort(\
port="COM8",\
bitRate=system.serial.BIT_RATE_57600,\
dataBits=system.serial.DATA_BITS_8,\
handshake=system.serial.HANDSHAKE_CTS_RTS,\
hardwareFlowControl=True,\
parity=system.serial.PARITY_NONE,\
stopBits=system.serial.STOP_BITS_1)

port = "COM8"

system.serial.openSerialPort("port")
system.serial.writeBytes(port, "\x82\x7D")
```

Now the next step is to read data. The write message above doesn’t request the device to provide a response, but I do have other write commands that do. So is there away to cast the system.serial.readBytes data to HEX? Also is there any way to create a port listener? If so will the port listener need to be disabled when a write command is activated?

---

_[View the full topic](https://forum.inductiveautomation.com/t/serial-module-possible-error/5920)._
