-->
Page 1 of 1

UART to WiFi.....Am I missing something?

PostPosted: Thu Nov 29, 2018 9:16 am
by MagicMiklos
Hello!
I have several things I wish to discuss, and maybe find some answers.
I recently bought an ESP-01. Now, from what I understand, you can connect a UART to it and then set the ESP-01 up as an access point, connect your PC to that access point and somehow receive that information over WiFi?

I am not using an Arduino. I made a simple board with a PIC16F1826 on it, a TS1117 3.3V regulator, some capacitors and a programming header for the pic all powered by three AA 1.5V cells. I wrote a tiny program for the PIC to increment a counter every cycle and transmit that counter out on the Tx pin which is connected to the Rx of the ESP-01 (Although I think that might be terrible mistake number 1). It is that counter value which I would like to receive over WiFi. Later I would like to transmit longer strings.

Now, to communicate with the ESP-01, I have cut the Tx line from the PIC momentarily and connected up a CP2102 with a USB socket. Anyway, I can communicate with the ESP-01 using AT commands just fine. I set it up as a SoftAP, gave it a SSID and password, I can connect to it with my PC and everything works great up to that point. But now what? I'm missing something. TCP-SSL? I fear that I don't understand enough about TCP/IP or SSL or web servers to make this work.

If anyone has any input, it is greatly appreciated.
Thank you and sorry about the ramble.

Re: UART to WiFi.....Am I missing something?

PostPosted: Fri Nov 30, 2018 4:22 am
by QuickFix
Please stop for a moment and briefly ignore all ("Wrong") information that's out there on the internet.

The ESP8266 isn't a WiFi-chip, it actually is a microcontroller with integrated WiFi hardware and a lot of memory running at 80 or 160MHz.
Every ESP comes preinstalled with AT-firmware, which is, to put it mildly, pretty useless since it doesn't let the module act like a black box (for transparent serial operation) or as a fully fletched AT-modem (so you could use it in a Hayes kind of way).

99.9% of the people using the ESP start off by experimenting with AT-commands only once and quickly turn to a one MCU solution with only the ESP or in a setup where the ESP works with a self made up protocol in a multi MCU environment.
In both architectures the firmware for the ESP is written in C++ (Arduino), LUA, BASIC, Python or any other popular language.
Since these are all high level languages, one can use readily available libraries so you don't have to worry about the WiFi stack and concentrate on the actual problem at hand: your project.

The module you choose (the ESP-01) is also not the best way to get to know the full potential of the ESP8266.
By using a development board you don't have the extra hurdle of getting things connected as they should and can start using the platform nearly as cheap as a separate module (± €2.50 incl. shipping).

Lots of people also only use dev-boards (like the NodeMCU or Wemos) for their final product, since they're cheap, compact and reliable.

Re: UART to WiFi.....Am I missing something?

PostPosted: Mon Dec 03, 2018 2:01 am
by MagicMiklos
Thank you for your reply.

It was much more informative than most of the material I've found for the ESP-01.

I'll have a look at getting a dev kit.

Thanks again!