Baud Rate on ESP8266 #6630
Replies: 1 comment
-
Posted at 2015-11-10 by Kolban here you go ... a one time special to get you going ... a build of Espruino for ESP8266 with a 9600 baud rate ... https://github.com/espruino/EspruinoBuilds/tree/master/ESP8266/Special_9600 Posted at 2015-11-10 by @gfwilliams Thanks @Kolban! Just to add, while 9600 is a bit slow, it was originally chosen because of the default config of bluetooth adaptors. It is handy in that it means that flow control isn't much of an issue because Espruino can crunch through data as fast as you can send it :) ... you can however set the Bluetooth adaptors to different baud rates, but then you need a USB-TTL adaptor to do that :) Posted at 2015-11-10 by tve 9600 seems.... anachronistic Posted at 2015-11-11 by @gfwilliams 9600 is actually surprisingly usable - I know it seems like it wouldn't be :) The ESP8266 port should really honour the default baud rate option in
At least then it's relatively easy for people to change - and also if boards aren't going to use 9600 by default we can make sure that every board reference page accurately reports what the default baud rate is. Posted at 2015-11-11 by bluebie Wonderful! Thanks @Kolban! I'll head over to my craft lab tomorrow and give this a go! 💙 I'd like to see 9600 baud be the default on ESP8266, as it is more of a bootstrapping technology in my view - something you use to upload a telnet server if you want more speed or portability. It needs to be widely interoperable. Anything that makes the chip work with less stuff should be opt in - like could we have a function that sets the baud higher until reset? or some sort of autobauding like the chip's built in bootloader? Considering the 9600 compatibility of the chip's bootloader, the entire espruino firmware could be installed through an audio jack, perhaps even just as an 8bit mono wav file (or flac if you're so inclined). If it were gzipped it would compress down quite well I think! Could be really cool, continuing the experiments with webpages talking to espruino devices, to be able to flash the firmware itself right off a tablet or even an iPod. Something I'd be curious to look in to for sure. Posted at 2015-11-11 by tve
Like what? Anyone using esp8266 uses 115200 as default. I don't know of anyone that tries to talk to esp8266 using 9600 baud...
Please tr this and report back :-) Given how long it takes already at 115200 baud, you better prepare a sofa so you can take a nap. And how reliable is this? I bet it will crap out before done... Posted at 2015-11-11 by tve
You must have more patience than I do... I find the upload from the IDE unbelievably slow. When I run a simple DS18B20 test the total code is just a couple of KB, yet it takes longer for the IDE to upload it and get it running than if I reprogram the entire esp8266 firmware! Posted at 2015-11-12 by bluebie @tve NodeMCU and Arduino default to 9600, so do the official espruino boards. I'm uploading the 9600baud espruino firmware now and it takes about ten minutes. More of a go make some tea kind of wait than a go have a nap kind of wait. It sounds like you must have another bottleneck than serial connection if your uploads are taking that long, even at 9600bd a kilobyte takes about one second to transfer, so a couple kb should be done in a couple seconds! Posted at 2015-11-12 by tve 10 minutes... If I had to wait that long each time I make a FW change... LOL Posted at 2015-11-12 by @gfwilliams The Web IDE's default is 9600, and I'll probably keep it at that so new users don't have to fiddle around in the settings. The whole As @Bluebie says, I'm surprised about the DS18B20 upload taking so long as you've only got about 8k of usable memory, so the most it could take is 8 seconds before it totally filled up all your memory (unless something else is going on). Having said all that, the ESP8266 port seems to be for those willing to get their hands dirty at the moment - so asking them to change one setting in the Web IDE isn't really a big deal :) Posted at 2015-11-12 by bluebie Wow, GPIO is incredibly slow on this 9600baud build. I benchmarked running
Posted at 2015-11-12 by Kolban Try taking out the digitalWrite to give us a base line. What is the cost of simply running the loop without the I/O? Posted at 2015-11-12 by @gfwilliams could it be there are debug print statements in that build? Posted at 2015-11-13 by bluebie I don't see any debug stuff coming out of the serial console. Loop seems to run pretty fast.
Posted at 2015-11-13 by bluebie I'm also seeing a lot of lost characters when trying to upload stuff using the Web IDE app in Chrome. have to hit upload again and again before it finally seems to work. Posted at 2015-11-13 by Kolban Try the following and see if it makes any difference:
Posted at 2015-11-13 by bluebie Woah okay that sure did fix it! 0.00063072000 seconds! Cool! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-11-10 by bluebie
Hey there!
I'm having a bit of trouble getting started with Espruino on esp-12ex. I've run NodeMCU successfully on it in the past, but as I lack a suitable usb-serial adaptor currently, I've been accessing the chip via a little bluetooth adaptor, which seems to only be happy running at 9600 baud.
After a lot of confusion, it seems the ESP8266 port runs at 115200 by default, unlike the main espruino boards? I wonder if it's trivially easy for someone to pop out a 9600 baud build, or if perhaps that would be a more sensible default as it would be consistent with other boards and would enable interoperability with the audio jack serial stuff (which is super cool!)
Should have an FTDI cable in a couple of weeks if all goes to plan, but I'm super excited to get started on this ASAP, as I want to build a rapid prototype for a robotics project and confirm everything works well enough before ordering parts to make a whole lot of little IP networked stepper motors.
Beta Was this translation helpful? Give feedback.
All reactions