Maixduino
Maixduino copied to clipboard
Maixduino UDP protocol issue
Using Maixduino board with MaixPy 0.5.0_12 version it is not possible to use UDP socket communication
//once the NIC is initiated
host = “0.us.pool.ntp.org” port = 123 addr = usocket.getaddrinfo(host,port)[0][-1] NTP_QUERY = bytearray(48) NTP_QUERY[0] = 0x1b s = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM) s.settimeout(1) res = s.sendto(NTP_QUERY, addr) data, addr = s.recvfrom(1024) s.close()
error dropped for sendto(...):
OSError: [Errno 5] EIO
It seems that DGRAM-based communication is not implemented (TCP/IP works properly)