Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the umqtt.simple in other socket #792

Open
ZuWard opened this issue Jan 28, 2024 · 3 comments
Open

How to use the umqtt.simple in other socket #792

ZuWard opened this issue Jan 28, 2024 · 3 comments

Comments

@ZuWard
Copy link

ZuWard commented Jan 28, 2024

I am use the esp32 and w5500 eth module. But I am using a third-party driver().
The socket of third-party drivers does not include the read and write method
How can I make umqtt.simple support this socket

@beyonlo
Copy link

beyonlo commented Jan 28, 2024

Have you checked this discussion https://github.com/orgs/micropython/discussions/11474? Since MicroPython version 1.20.0 the W5500 is supported by MicroPython (from Espressif ESP-IDF implementation). So I think that if you use that, everything else (like as mqtt client and any other protocol, including ssl) will be transparent because that espressif W5500 implementation (and micropython support) is using a raw ethernet implementation.

Can anyone confirm if what I did write is correct?

@ZuWard
Copy link
Author

ZuWard commented Jan 29, 2024

I have reviewed the discussion, but I have only succeeded with the code in the discussion once. Even if the same code is used after the second attempt, it cannot connect to the network and can cause SPI blocking. I do not understand why this is the case. Even if SPI is available after a power outage and restart, ETH still cannot obtain the IP, so I can only try using a third-party driver

@ZuWard
Copy link
Author

ZuWard commented Jan 29, 2024

Under the same code, there will always be an OSError prompt: Ethernet enable failed. I guess it's a problem with SPI blocking. How can I avoid this problem.
When I am in the shell, I can obtain the IP address, but when I use thorny to actually execute it, it cannot work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants