title: Sending raw data over a tcp socket with python
body: <p>I'm trying to make a domotica system, and I've recovered by using Wireshark the commands, but I can't get them send properly.</p>
  
  <p>This is what I've got:</p>
  
  <pre><code>#!/usr/bin/env python
  
  import socket
  
  
  TCP_IP = '10.20.0.195'
  TCP_PORT = 9761
  BUFFER_SIZE = 1024
  MESSAGE1 = b"02:63:82:00:06"
  MESSAGE2 = b"02:63:82:80:06" 
  
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  s.connect((TCP_IP, TCP_PORT))
  s.send(MESSAGE1)
  s.send(MESSAGE2)
  s.close()
  </code></pre>
  
  <p>If I look in Wireshark, I see packages with no data attached. How can I fix this?</p>
  
  <p>I'm using Python 3.</p>