Search found 20 matches

by nedoskiv
Thu Jul 28, 2022 11:09 am
Forum: ESP32 boards
Topic: software I2C problem
Replies: 1
Views: 1294

Re: software I2C problem

after changing a lot of pin combinations, managed to find working one:

Code: Select all

>>> from machine import Pin, SoftI2C
>>> i2c = SoftI2C(scl=Pin(14), sda=Pin(5), freq=44000)
>>> i2c.scan()
[32, 33]
by nedoskiv
Thu Jul 28, 2022 10:50 am
Forum: ESP32 boards
Topic: software I2C problem
Replies: 1
Views: 1294

software I2C problem

Hello, I have maded schema of two MCP23017 IO expanders, connected to I2C with 4.7K pullup resistors, tested it on ESP8266 with NodeMCU LUA, they work fine now decided to try them on one WT32 board. Hardware I2C pins are used here for intergrated LAN, so I decide to try software I2C after lot of fai...
by nedoskiv
Wed Jul 27, 2022 11:34 am
Forum: ESP32 boards
Topic: socket settimeout problem.
Replies: 10
Views: 7402

Re: socket settimeout problem.

Had to have a bit of a search: https://stackoverflow.com/questions/3432102/python-socket-connection-timeout maybe setdefaulttimeout(2.0) >>> help (socket) object <module 'usocket'> is of type module __name__ -- usocket __init__ -- <function> socket -- <class 'socket'> getaddrinfo -- <function> AF_I...
by nedoskiv
Wed Jul 27, 2022 7:40 am
Forum: ESP32 boards
Topic: socket settimeout problem.
Replies: 10
Views: 7402

Re: socket settimeout problem.

Something to try: import usocket sock = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM) send_data = b'I am going to listen for 5 seconds' sock.settimeout(5) # this sets the listening time Works for me. Maybe try usocket then DGRAM might narrow the problem down. I'm actually using usocket (just ...
by nedoskiv
Wed Jul 27, 2022 6:54 am
Forum: ESP32 boards
Topic: socket settimeout problem.
Replies: 10
Views: 7402

socket settimeout problem.

Hello, I'm writing a simple wget script, but when try to connect to non existing IP or device that is offline, sock.connect take too long to rease an error >>> import usocket as socket >>> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> sock.settimeout(2) >>> sock.connect(("192.168.4.2"...
by nedoskiv
Mon Feb 28, 2022 9:20 am
Forum: Programs, Libraries and Tools
Topic: found a bug in esp8266 wifi
Replies: 8
Views: 4077

Re: found a bug in esp8266 wifi

I have changed the esp8266 board and can successful disable wireless now, guess something was happen to old one.
Still the fact that it stores wireless config every time when I initialize wireless is enough not to use micropython on esp8266, after all, writable memory life is limited.
by nedoskiv
Mon Feb 14, 2022 12:52 pm
Forum: Programs, Libraries and Tools
Topic: found a bug in esp8266 wifi
Replies: 8
Views: 4077

Re: found a bug in esp8266 wifi

nothing special, just tested to see what gonna happen:

Code: Select all

import network

tmp=network.WLAN(network.AP_IF)
tmp.active(False)
by nedoskiv
Mon Feb 14, 2022 7:11 am
Forum: Programs, Libraries and Tools
Topic: found a bug in esp8266 wifi
Replies: 8
Views: 4077

Re: found a bug in esp8266 wifi

bad part is when problem happen, I initialize AP and set it to disable (false), it do not turn off AP, that is not acceptable for me at this point. Guess gonna move to LUA again.
by nedoskiv
Fri Feb 11, 2022 1:40 pm
Forum: Programs, Libraries and Tools
Topic: found a bug in esp8266 wifi
Replies: 8
Views: 4077

found a bug in esp8266 wifi

Not sure if I posted that in correct place, if not please point me where I should report this. In short I never used micropython on esp8266, so I give it a shot, going thru the basics, making some init script for wifi, etc. During testing them I realized, that once wifi Is set for AP mode, It always...
by nedoskiv
Fri Feb 11, 2022 1:07 pm
Forum: ESP8266 boards
Topic: WIFI start AP without being initialized
Replies: 4
Views: 2150

Re: WIFI start AP without being initialized

I tested with another device (wemos D1 mini) all files from filesystem are deleted, disconnect it from power source, connect it again and AP is up with last settings that it was configured, in additional, I create a STA_IF, and try to set .active(False) check and it was set to false, AP is still up,...