Search found 11 matches
- Tue Jun 30, 2020 10:48 am
- Forum: ESP32 boards
- Topic: ESP32 and RDA5807M
- Replies: 1
- Views: 2842
Re: ESP32 and RDA5807M
This module the same module https://github.com/alankrantas/micropython-TEA5767
- Thu Feb 06, 2020 11:40 am
- Forum: General Discussion and Questions
- Topic: socket.settimeout() not working
- Replies: 7
- Views: 5451
Re: socket.settimeout() not working
I found in documentation. Sorry. All is working. # Instead of: s.settimeout(1.0) # time in seconds s.read(10) # may timeout # Use: poller = uselect.poll() poller.register(s, uselect.POLLIN) res = poller.poll(1000) # time in milliseconds if not res: # s is still not ready for input, i.e. operation ti...
- Thu Feb 06, 2020 10:57 am
- Forum: General Discussion and Questions
- Topic: socket.settimeout() not working
- Replies: 7
- Views: 5451
- Thu Feb 06, 2020 10:48 am
- Forum: General Discussion and Questions
- Topic: socket.settimeout() not working
- Replies: 7
- Views: 5451
Re: socket.settimeout() not working
The error has changed: OSError: [Errno 22] EINVAL
Code: Select all
>>> res = s.sendto(NTP_QUERY, addr)
>>> s.settimeout(5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] EINVAL
- Thu Feb 06, 2020 7:36 am
- Forum: General Discussion and Questions
- Topic: socket.settimeout() not working
- Replies: 7
- Views: 5451
Re: socket.settimeout() not working
All is working fine if host is available.. if the host is not available, msg = s.recvfrom (48) hangs and does not exit. nic = WIZNET5K(SPI(1),Pin.board.X12,Pin.board.X11) ip = ('10.128.0.206','255.255.255.0','10.128.0.1','8.8.8.8') nic.ifconfig(ip) host = 'pool.ntp.org' addr = socket.getaddrinfo(hos...
- Wed Feb 05, 2020 11:27 am
- Forum: General Discussion and Questions
- Topic: socket.settimeout() not working
- Replies: 7
- Views: 5451
socket.settimeout() not working
PyBoard 1.1 + Ethernet >>> dir(socket.socket) ['__class__', '__name__', 'close', 'send', '__bases__', '__del__', 'accept', 'bind', 'connect', 'listen', 'recv', 'recvfrom', 'sendto', 'setblocking', 'setsockopt', 'settimeout'] >>> dir(socket.socket.settimeout) ['__class__'] >>> host = '10.128.0.148' >...
- Thu Jan 30, 2020 1:19 pm
- Forum: MicroPython pyboard
- Topic: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
- Replies: 19
- Views: 81226
Re: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
I received a new module from another vendor. the left module works, the right module does not work at all.
- Mon Dec 16, 2019 8:48 am
- Forum: MicroPython pyboard
- Topic: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
- Replies: 19
- Views: 81226
Re: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
I was tested other Ethernet Module with Wiznet 5500. All is working. import network nic = network.WIZNET5K(SPI(1,SPI.MASTER), pyb.Pin.board.PA4, pyb.Pin.board.PA3) nic.active(True) nic.ifconfig( ‘dhcp’ ) print(nic.ifconfig()) (‘10.10.10.113’, ‘255.255.255.0’, ‘10.10.10.1’, ‘10.10.10.1’) MicroPython ...
- Wed Dec 11, 2019 10:46 am
- Forum: MicroPython pyboard
- Topic: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
- Replies: 19
- Views: 81226
Re: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
You have to compile the code with: MICROPY_PY_WIZNET5K = 5500 MICROPY_PY_LWIP = 1 Don't forget to call 'make clean' before recompile. P.S:: For convenience, I placed an image here: https://hidrive.ionos.com/lnk/I4Ymqmvs Thank you. I was tested this module with arduino, the same result, I thin that ...
- Tue Dec 10, 2019 8:06 am
- Forum: MicroPython pyboard
- Topic: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
- Replies: 19
- Views: 81226
Re: Pyboard + W5500/W5200 Ethernet - Cant get it to work - MicroPython v1.11-422-g98c2eabaf
did you call nic.active(True) after instantiation? AttributeError: 'WIZNET5K' object has no attribute 'active' My code: import network nic = network.WIZNET5K(pyb.SPI(1), pyb.Pin.board.X12, pyb.Pin.board.X11) # CS = X12 Reset X11 nic.active(True) nic.regs() ---------------------------- Wiz CREG: 000...