Python WebSocket连接拒绝了错误的校验和

Python WebSocket连接拒绝了错误的校验和,python,python-2.7,websocket,Python,Python 2.7,Websocket,我们有一个以太网RFID阅读器和一个测试程序,允许我们通过WebSocket和设备进行通信。测试程序可能是用C语言编写的。但是,我试图编写的python脚本无法与设备通信。 代码如下所示: import websocket import thread import time def on_message(ws, message): print message def on_error(ws, error): print error def on_close(ws):

我们有一个以太网RFID阅读器和一个测试程序,允许我们通过WebSocket和设备进行通信。测试程序可能是用C语言编写的。但是,我试图编写的python脚本无法与设备通信。 代码如下所示:

import websocket
import thread
import time

def on_message(ws, message):
    print message

def on_error(ws, error):
    print error

def on_close(ws):
    print "### closed ###"

def test(ws):
    ws.send("<command><heartbeat/></command>")


if __name__ == "__main__":
    websocket.enableTrace(True)
    ws = websocket.WebSocketApp("ws://192.168.0.194:10001",
                              on_message = on_message,
                              on_error = on_error,
                              on_close = on_close)
    ws.on_open = test
    ws.run_forever()
通过网络嗅探器,我可以看到我所有的消息都有一个错误的校验和,如:

Checksum: 0xcc83 (incorrect, should be 0xb8ad)

c#部分的错误是这对中的吗?c#程序工作正常,当我使用网络嗅探器时,它有正确的校验和。我基本上是在尝试重新创建一个可以嵌入到我们系统中的程序。也许使用另一个协议?大量的阅读器和协议。哪一个?校验和:
可能通过以太网串行可能是您有另一个与读卡器的连接处于活动状态,但读卡器只允许一个连接吗<代码>超过了一个端口上允许的连接数
似乎表明了这一点。您是否尝试过其他WebSocket实现?大概
Checksum: 0xcc83 (incorrect, should be 0xb8ad)