title: ser.write() hex string Raspberry
body: <p>I have a problem with sending/reading hex data over RS485. I'm not sure if I send the correct string over the serial port.
  The hex code is: <code>E1 14 75 81</code>. I have read that i can write: </p>
  
  <pre><code>data = "\xE1\x14\x75\x81" 
  ser.write(data)
  </code></pre>
  
  <p>To check if the correct code is send, I added <code>print(ser.write(data))</code> But I get this Output back:</p>
  
  <pre><code>True
  4
  ▒
  </code></pre>
  
  <p>I also want to read the answer of the hex string. For this i only have to added <code>ser.read()</code></p>
  
  <p>Here the ful code:
      import serial
      import struct</p>
  
  <pre><code>    ser = serial.Serial(
          port='/dev/ttyAMA0',
          baudrate=19200,
          parity=serial.PARITY_NONE,
          stopbits=serial.STOPBITS_ONE,
          bytesize=serial.EIGHTBITS
      )
  
      print(ser.isOpen())
      data = "\xE1\x14\x75\x81"
      ser.write(data)
      print(ser.write(data))
      ser.read()
      print(ser.read())
      ser.close()
  </code></pre>
  
  <p>Many thank for your help!</p>