https://github.com/micropython/micropyt ... 26da083558
Then I send a piece of data from the PC, and pyboard successfully received it. But when I send data from the PC every 100ms, my pyboard obviously does not receive smoothly.
Here is my code:
Code: Select all
def read(self):
if self._need_check:
self._check_socket_state()
msg_bytes = None
try:
print("read start\r\n")
msg_bytes = self.ws.read()
print(msg_bytes)
print(rtc.datetime())
except OSError:
self.client_close = True
if not msg_bytes and self.client_close:
raise ClientClosedError()
return msg_bytes
Code: Select all
read start
None
(2018, 9, 29, 1, 12, 48, 28, 53)
read start
None
(2018, 9, 29, 1, 12, 48, 28, 53)
read start
b'{"functionName":"setTemperature","ID":"LOW_CYLINDER","temperature":-273.15}\r\n{"functionName":"setTemperature","ID":"LOW_CYLINDER","temperature":-273.15}\r\n{"functionName":"setTemperature","ID":"LOW_CYLINDER","temperature":-273.15}\r\n'
(2018, 9, 29, 1, 12, 48, 28, 52)
read start
None
(2018, 9, 29, 1, 12, 48, 28, 50)
read start
None
(2018, 9, 29, 1, 12, 48, 28, 50)
read start
Code: Select all
Wiz CREG:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0010: 00 00 00 00 00 80 00 01 00 07 d0 08 28 00 00 00
0020: 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 bf 00
0030: 00 00 00 00 00 00 00 78 25 04 00 00 00 00 00 00
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Wiz SREG[0]:
0000: 84 00 04 42 c0 00 ff ff ff ff ff ff 00 00 00 00
0010: 00 00 05 c0 00 00 80 00 00 00 00 00 00 00 10 10
0020: 40 00 12 cb 12 cb 00 00 4f 9e 4f 9e ff 40 00 00
Wiz SREG[1]:
0000: 00 00 00 00 00 00 ff ff ff ff ff ff 00 00 00 00
0010: 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00
0020: 00 00 00 00 00 00 00 00 00 00 00 00 ff 40 00 00
Wiz SREG[2]:
0000: 00 00 00 00 00 00 ff ff ff ff ff ff 00 00 00 00
0010: 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00
0020: 00 00 00 00 00 00 00 00 00 00 00 00 ff 40 00 00
Wiz SREG[3]:
0000: 00 00 00 00 00 00 ff ff ff ff ff ff 00 00 00 00
0010: 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00
0020: 00 00 00 00 00 00 00 00 00 00 00 00 ff 40 00 00
I find wiznet is in MACRAW mode through https://github.com/micropython/micropython/pull/3379 , and dpgeorge also optimizes its speed, Is there any way to improve its real-time?
Please forgive my poor English, thanks.