ESP8266 Sans RF

Anything not related to STM32
User avatar
Slammer
Posts: 241
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: ESP8622 Sans RF

Post by Slammer » Thu Apr 21, 2016 1:30 pm

If the price tag of upcoming ESP32 is around 4$ (as your preorder), then we will have a winner....and this will shake out the arduino world...
in a few months we will know...

User avatar
RogerClark
Posts: 6096
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ESP8622 Sans RF

Post by RogerClark » Thu Apr 21, 2016 9:13 pm

I like the ESP8266 but there are a few niggles...

No matter what make USB to serial interface I use, I cant get reliable uploads any faster than 115200 :-(
Albeit I think the FT232 ones I have are probably clones....

And I still have to do the 2 button shuffle to put the device into upload mode.

It would be great if I could upload at the amazing speeds some people manage (900k or more), and if I didnt need to mess around with pressing buttons prior to uploading.

User avatar
martinayotte
Posts: 1179
Joined: Mon Apr 27, 2015 1:45 pm

Re: ESP8622 Sans RF

Post by martinayotte » Thu Apr 21, 2016 9:18 pm

If in your sketch you simply add OTA library+handler, once you've upload your sketch, it is now easy to do upgrades quite quickly without any buttons to press of USB-TTL to attach ... ;) (Of course this is NOT "Sans RF" ... :geek: )

User avatar
WereCatf
Posts: 167
Joined: Sat Apr 16, 2016 5:30 pm

Re: ESP8622 Sans RF

Post by WereCatf » Thu Apr 21, 2016 9:46 pm

RogerClark wrote:No matter what make USB to serial interface I use, I cant get reliable uploads any faster than 115200 :-(
Albeit I think the FT232 ones I have are probably clones....
Are you using a Nodemcu or a Nodemcu-style clone, or something else? For my Nodemcu-clones 921600 uploads work fine. Sometimes it fails to reset the board to upload-mode, but it's just a matter of trying to upload again -- the second time always seems to work, and this problem may be because I'm running Linux under a VM and doing all of my coding under that.

If you are using Nodemcu-style clones, what chip do they use for the USB-to-serial? All three of mine use ch340g, which support speeds up to 2Mbps.

User avatar
WereCatf
Posts: 167
Joined: Sat Apr 16, 2016 5:30 pm

Re: ESP8622 Sans RF

Post by WereCatf » Thu Apr 21, 2016 9:48 pm

martinayotte wrote:If in your sketch you simply add OTA library+handler, once you've upload your sketch, it is now easy to do upgrades quite quickly without any buttons to press of USB-TTL to attach ... ;) (Of course this is NOT "Sans RF" ... :geek: )
Aye, OTA-updates are great (if one's going to use WiFi on the board), they're so much faster than the serial-approach.

User avatar
RogerClark
Posts: 6096
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ESP8622 Sans RF

Post by RogerClark » Thu Apr 21, 2016 10:04 pm

I've tried using OTA from a remote web server, mainly as an experiment. However I don't find it very reliable, even with the latest SDK.

Local OTA is not a lot of use to me, as a lot of the time the RF is running but the device is not signed into my network, as its just operating as an AP, so it would take a lot of messing around to switch the PC's wifi to connect to the ESP8266's AP etc.

Far simpler to use the direct serial connection.

I think I may have a CH340g based USB to Serial kicking around somewhere, but I mainly have Prolific CP21xx modules.

PS. I did try to use a Maple Mini as a USB to Serial, but it didnt seem to work with the ESP8266 at all :-(

User avatar
WereCatf
Posts: 167
Joined: Sat Apr 16, 2016 5:30 pm

Re: ESP8622 Sans RF

Post by WereCatf » Thu Apr 21, 2016 10:31 pm

RogerClark wrote:I think I may have a CH340g based USB to Serial kicking around somewhere, but I mainly have Prolific CP21xx modules.

PS. I did try to use a Maple Mini as a USB to Serial, but it didnt seem to work with the ESP8266 at all :-(
I take that as meaning that you don't use Nodemcy-style stuff with built-in USB-serial, then. If you're using an external USB-serial you need additional steps to get automatic reset to upload-mode working -- the integrated USB-serial has ties to ESP's reset- and GPIO0-pins for this, but when you're using an external module it obviously won't have those ties! On the Nodemcu it's tied as follows: Image

See e.g. https://hallard.me/esp8266-autoreset/ for more details.

User avatar
Slammer
Posts: 241
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: ESP8622 Sans RF

Post by Slammer » Fri Apr 22, 2016 1:15 am

The NodeMCU circuit requires both RTS and DTR signals from Uart chip, which is not very common.
If you look at the end of the page that WereCatf linked, there is a link to :

http://www.jce.lu/blog/?p=143

There you can find a circuit that requires only DTR signal (like basic FTDI cable)
I haven't check the circuit as I have only NodeMCUs.

User avatar
WereCatf
Posts: 167
Joined: Sat Apr 16, 2016 5:30 pm

Re: ESP8622 Sans RF

Post by WereCatf » Fri Apr 22, 2016 2:03 am

Slammer wrote:The NodeMCU circuit requires both RTS and DTR signals from Uart chip, which is not very common.
If you look at the end of the page that WereCatf linked, there is a link to :

http://www.jce.lu/blog/?p=143

There you can find a circuit that requires only DTR signal (like basic FTDI cable)
I haven't check the circuit as I have only NodeMCUs.
esptool.py that is used to upload the sketch to the ESP supports both "ck" and "nodemcu" as the reset-method, I assume that's the "ck" then. Nevertheless, Roger has to implement either one of these if he wants to be able to upload sketches without touching the buttons using his non-integrated USB-serial adapter.

User avatar
mrburnette
Posts: 1785
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ESP8622 Sans RF

Post by mrburnette » Fri Apr 22, 2016 3:43 pm

mrburnette wrote:
martinayotte wrote: <...>

Code: Select all

#define IRAM0         __attribute__((section(".iram.text")))
Unfortunately, it didn't gave much speed improvement, neither than with the previous "dhry21a" Maybe because the Flash Cache is already doing a nice job by leaving redundant code in the cache, so in both case, it was already in the RAM after first iteration / Martin.
Wow ... thank you Martin. I have not tried it yet, but will. <...>
  • To wrap this thread (hopefully, it took a few unexpected turns), I want to post 4 tests:
  • the first 2 will be the no-RF sketch with a standard Arduino implementation: complete setup() and complete loop() with the 2 frequencies: 160MHz and 80MHz.
  • the second set of 2 tests will be no-RF but with migrating the bulk of the loop() into an iRAM function specific to the ESP8266. Again with 2 frequencies: 160MHz and 80MHz.
@ 160MHz standard implementation of loop()
Prime Number Generator by Nick Gammon
ESP8266 port by Ray Burnette

Number of primes in prime table = 53
Last prime in table = 251
Calculating primes through 63001

Starting uS timer now... uS = 1810079
Sketch terminating. Press Reset to rerun.

@ 80MHz standard implementation of loop()
Prime Number Generator by Nick Gammon
ESP8266 port by Ray Burnette

Number of primes in prime table = 53
Last prime in table = 251
Calculating primes through 63001

Starting uS timer now... uS = 3612287
Sketch terminating. Press Reset to rerun.

===========================================

@ 160MHz IRAM implementation of loop()
Prime Number Generator by Nick Gammon
ESP8266 port by Ray Burnette

Number of primes in prime table = 53

Last prime in table = 251
Calculating primes through 63001

Starting uS timer now... uS = 1796557
Sketch terminating. Press Reset to rerun.
@ 80MHz IRAM implementation of loop()
Prime Number Generator by Nick Gammon
ESP8266 port by Ray Burnette

Number of primes in prime table = 53

Last prime in table = 251
Calculating primes through 63001

Starting uS timer now... uS = 3585332
Sketch terminating. Press Reset to rerun.
With all of the previous discussion, I think this is what it is... I do not wish to beat it anymore. Code attached as ZIP
Attachments
PrimeNos_2.zip
(1.77 KiB) Downloaded 11 times
PrimeNos_1.zip
(1.86 KiB) Downloaded 19 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest