-
Notifications
You must be signed in to change notification settings - Fork 17
WiFi Support for ESP32 / ESP32-S2 #202
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
Comments
Using MQTT with libraries like PubSubClient.h would be great. It would allow the development of complete projects with digital twins of embedded systems, a significant advance in the democratization of teaching in schools. |
Once we have WiFi support in place, MQTT libraries should work. I noted to check PubSubClient in particular. The WiFi features currently has 45 votes. |
Some progress update: managed to establish a connection to an open WiFi network within the simulation! https://twitter.com/WokwiMakes/status/1457805832977063936 There's still much to be done, but this is one milestone :-) |
Very ecouraging Wireshark screenshot ! |
One packet at a time :) |
Replying to @lzzy12's comments from another issue:
Yes, that's the plan. |
Great ! |
I'm trying to connect to WiFi to test the pubsubclient library (https://github.com/knolleary/pubsubclient/tree/master/src), but I'm not able to connect (https://wokwi.com/arduino/projects/315894638733951554). |
I think it's still in testing phase and not yet pushed to production |
OK |
Indeed - it will probably be in production in a few days. Meanwhile, I ran @pixavier's project, and it seems to work well in the testing environment: |
Wow ! |
It's been few days, is it out yet? |
Partially. You can try connecting to Wokwi-GUEST, and hopefully get some internet access. Not thoroughly tested, no code examples and and no user interface indication yet, so your milage may vary.. |
I tried this but it seems it just gets stuck in the |
Closer and closer: https://wokwi.com/arduino/projects/316434364352168512 After a few seconds, it stops receiving messages, and after a while, it loses the MQTT connection and cannot reconnect. |
Thanks for checking it! There seems to be something iffy with the websocket proxy, I'll have to investigate why this happens. What is the performance difference you are observing between Firefox / Chrome? I see in your screen shot chrome gets around 9%. What do you get on Firefox? Does adding |
Connection times:
WiFi 16" 1'21" Firefox also 9% delay(10) appeared to improve the situation, but MQTT does not connect anymore after some seconds, less than a minute. Digital Twin (DT) link: Snap! based DT test environment: |
Two days working with it. Fairly good for prototype development and testing purposes. Sometimes, after some minutes ([1, 10]), MQTT loses connection, but one can continue testing by restarting the simulation again. |
We're not able to host our own webserver right now, are we? I'm not able to connect to the ip address after starting the webserver |
Thanks for the feedback! I believe this is an infrastructure issue. Do you have a specific use case for this or are you just playing around to explore what's possible?
Can you explain more about your setup? Where is the web server running and where are you trying to connect to it from? |
I was just trying to follow a few lectures from my university. Here is an article with something similar I was trying to do: https://randomnerdtutorials.com/esp32-web-server-arduino-ide/ |
|
Good news: WiFi support is now done for the ESP32! You can check out the documentation, including code examples and explanation about how to connect it to the Internet: https://docs.wokwi.com/guides/esp32-wifi @lzzy12 - there's also a way to host your own webserver on the ESP32 using the Private Wokwi IoT Gateway. You can see it in action in this video: esp-http-server-leds.mp4The ESP32-S2 is still missing some bits, so it doesn't have a functional WiFi at the moment. We'll continue working on it as we improve the ESP32-S2 simulation as part of #196. Finally, I want to thank everyone who supported and helped testing this feature. As a token of appreciation - if anyone who participated in this thread wants to have access to the Private Wokwi IoT Gateway, just let me know (+ send me a link to one of your Wokwi projects so I can find your user id). For others - you are always invited to join the club and help make Wokwi better. |
Hi Uri,
Thank you for your offer to access the Private Wokwi IoT Gateway as a
participant in the thread.
You can find my user id from the following project:
https://wokwi.com/arduino/projects/324549436880454228
All the best,
Xavier Pi
https://github.com/pixavier
El jue, 3 feb 2022 a las 14:49, Uri Shaked ***@***.***>)
escribió:
… Good news: WiFi support is now done for the ESP32!
You can check out the documentation, including code examples and
explanation about how to connect it to the Internet:
https://docs.wokwi.com/guides/esp32-wifi
@lzzy12 <https://github.com/lzzy12> - there's also a way to host your own
webserver on the ESP32 using the Private Wokwi IoT Gateway
<https://docs.wokwi.com/guides/esp32-wifi#the-private-gateway>. You can
see it in action in this video:
https://user-images.githubusercontent.com/892318/152354817-aebcbace-3fc3-4dc6-b56e-8bea6c2241de.mp4
The ESP32-S2 is still missing some bits, so it doesn't have a functional
WiFi at the moment. We'll continue working on it as we improve the ESP32-S2
simulation as part of #196
<#196>.
Finally, I want to thank everyone who supported and helped testing this
feature. As a token of appreciation - if anyone who participated in this
thread wants to have access to the Private Wokwi IoT Gateway, just let me
know (+ send me a link to one of your Wokwi projects so I can find your
user id). For others - you are always invited to join the club
<https://wokwi.com/club> and help make Wokwi better.
—
Reply to this email directly, view it on GitHub
<#202 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APGUFFDKOTZCNCKYB6AHNZ3UZKBXBANCNFSM5FMTWU3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Mine is https://wokwi.com/arduino/projects/319226828692652627 GitHub.com/lzzy12 |
You both @pixavier and @lzzy12 should now have access to the Private IoT Wokwi Gateway when you are logged-in. Here are the full instructions. Please check it it works for you and report back. |
WiFi support will allow you to connect to various hosts on the internet using standard protocols and standards: MQTT, REST, WebSockets, etc.
The text was updated successfully, but these errors were encountered: