-
Notifications
You must be signed in to change notification settings - Fork 17
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
ESP-01 WiFi modem (AT command) #169
Comments
Thanks for the suggestion @MykolaKyrylenko ! Would an ESP32 simulation also fit for your use case? Or do you need at ESP-01 specifically? |
Thanks for the response. |
Not at the moment. But if you run your code directly on the simulated ESP32, you should be able to use the WiFi functions directly. Does this not fit your needs? |
I lecture at a technical college, and we are using the Atmel processor on the Arduino Mega to teach low level C programming, e.g. DDR, PORTC, etc. registers. The ESP32 will be too complicated for our students. NOTE: in industry I had to integrate a cellular modem to a microcontroller, and that worked well. |
Got it. Yeah, ESP32 is indeed pretty complex. There might be a way, at some point, to run both the AVR and ESP32 simulators in different tabs and have them communicate over virtual UART, which may be helpful. How long until you get to teaching the WiFi modem part? |
Thanks for that. Either solution will be great. PS I noticed another enhancement request, was using WebSockets. Can something be done with that work? |
I had an interim solution, if that is of interest. Would it be possible to have a 'serial' device which just sends a HTTP POST request? |
PS to my previous comment. Sort of like the CURL command (https://curl.se/) to generate HTTP requests. |
Sorry - I forgot to reply to your suggestions :) There's a way to achieve what you suggested with the features that we already have, though it's not very straightforward (and also undocumented):
I'm pretty positive that we'll have something usable for the next semester. You can track the roadmap in the public features page. How's the semester going so far? |
Thanks for the message. Overall, the students are loving Wokwi. I needed to adapt bits due to known limitations, e.g. resistor divider network cannot be created for A/D conversion, so I used the potentiometer slider instead. A full integration of Wokwi and Falstad will be gold. |
Thanks for the feedback! I opened a new issue (#203) for the resistor divider network, it's now also open for vote. Let's see how much love it gets! |
This one is getting many votes recently, making its way to the top of the list. We may start working on it soon if it keeps coming up the list! |
Some updates: I'm looking into using the official ESP-AT Firmware on ESP32-C3 to provide this functionality. Anyone interested in beta testing? |
I would be interested. Do you think the ESP32-C3 can be included with an Arduino on the same project? |
Thanks! In general, it is not possible to run two MCUs at once (at least until we tackle #186). For the AT modem specifically, I'm working to make it possible. I'll share the details about the beta testing here in a few days. |
So, here's something working - you can interact with the modem directly through the virtual serial monitor: https://wokwi.com/projects/330317327704785492 The performance is pretty bad, and I haven't tried to connect it with an Uno yet (but in theory, that should also work). The only way to connect it is through diagram.json, as there's no UI element yet. The WiFi works similar to how it does in the ESP32 - same access point configuration, uses the same gateway settings, etc. |
Thanks @ricardojlrufino! Behind the scenes, we're simulating the ESP-AT firmware using the same simulation engine that powers the ESP32 simulation. So it's not real hardware, but your questions shows that we are probably doing pretty good job with the simulation :-) |
yes ... |
Some more updates: the performance is now somewhat better (the simulation runs at 100% speed on my PC), and also fixed some issues with the UART output (wrong baud rate, missing chars when there's a lot of output, etc.). So it should already be usable now. It will probably take some time until I get to create the board graphics, though. |
Thanks! This was a bug - can you please try again now? |
Hooray :) If anyone gets a chance to test this with the Uno (or other Arduino board), I'd love to learn how it works |
I tried it with the Mega using Serial 1. The code is very crude, but commands get sent and responses are received. Works well. |
Cool! I see you also tried to get an HTTP request working, any luck with that yet? |
Interesting, so it sent the POST request, but then said "ERROR" without telling anything else. Do you have a physical ESP chip to try it and see if you get a different result? |
Downloading a PCAP packet capture could be helpful to understanding what's going on |
The 'Download WiFi Packet Capture (PCAP) file' option does not appear on my project. |
My server is a VPS on Binary Lane (https://www.binarylane.com.au/), and running standard Ubuntu + Apache. Note: when I historically used the "WiFiEsp.h" library, it worked well. |
I tried with WiFiEsp library and no joy, even to initialise the ESP32-01 |
Seems to work here without retries: https://wokwi.com/projects/330962510931821139 Note: intially, I tried to send the POST message with no delays between the characters, and I got a bad request error. By slowing down the data with 100msec delays (lines 84 - 91) the request was accepted without error. |
Thanks for sharing your findings! |
Update: The ESP32-01 now has graphics too, thanks to @AriellaE. The part name has changed to https://wokwi.com/projects/330317327704785492 Next steps: documentation, add the the part to the dropdown menu. |
Excellent. |
Lovely :) |
The newer library WiFiEspAT works with the ESP-01 Shield! I think it works because the wokwi ESP-01 shield has a newer firmware wich is supported by the new library. |
Note: Using VSCode, in order for the following to work: // disconnect persistent connection (not persistent)
WiFi.disconnect();
WiFi.begin("Wokwi-GUEST"); you need to comment this line: #define WIFIESPAT1 in |
Thanks @CreativeQuantum, I was about to give up on using WiFiEspAt until I saw your comment (although now I see this information is in the README, I had missed it). An easier way to do this, without modifying the library, is to add WiFiEspAt says they support firmware 2.4.0+, but Wokwi is running 2.3.0:
So far I haven't run into any issues, but it may be worth upgrading it. |
Excellent work, glad there are other super heros fighting crime, huh, I mean, software complexity (which is a kind of crime of its own). |
Would it be possible to add the equivalent of an ESP-01 component for integrating to an Arduino Uno or Mega project at a WiFi modem. Some ideas:
Thanks.
The text was updated successfully, but these errors were encountered: