def __init__(self, clientID, bootstrapURI, port, serialPort, debug=False, verbose=False):
super(ConstrainedClientSerial, self).__init__(clientID, bootstrapURI, port, debug, verbose)
print("Creating serial")
serialConnection = serial.Serial(
port=serialPort,
baudrate=57600, # 115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE, # STOPBITS_TWO
bytesize=serial.EIGHTBITS
)
#self._clientSession = fdpexpect.fdspawn(self._serial, logfile=open("constrained_client_serial.log", "w"))
self._clientSession = SerialSession(serialConnection)
self._sendline("") # FIXME - This should be a reboot?
self.expect("Contiki>")
self.init()
constrained_client.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录