Skip to content
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

Add support for Serial access for ESP8266 board #665

Closed
nkolban opened this issue Oct 15, 2015 · 5 comments
Closed

Add support for Serial access for ESP8266 board #665

nkolban opened this issue Oct 15, 2015 · 5 comments
Assignees
Labels
enhancement ESP8266 This is only a problem on ESP8266 devices

Comments

@nkolban
Copy link
Contributor

nkolban commented Oct 15, 2015

Serial processing (UART0 and UART1) has not been tested and may not work. This issue looks to see what might be needed to be done to support Serial access from JavaScript through the ESP8266 serial interfaces.

@nkolban nkolban added the ESP8266 This is only a problem on ESP8266 devices label Oct 15, 2015
@tve
Copy link
Contributor

tve commented Dec 7, 2015

From Gordon:

@tve it'd need to implement jshUSARTSetup - I don't know if that's actually done right now?
You can move the console out of the way with something like LoopbackA.setConsole() and then you can use Serial1 for whetever you want...

http://forum.espruino.com/conversations/278532/#comment12666182

@tve tve added the enhancement label Dec 7, 2015
@tve tve self-assigned this Dec 7, 2015
@SpenceKonde
Copy link

Any updates on this?
Getting a working serial implentation on ESP8266 would be a real boon.

@gfwilliams
Copy link
Member

Have got Serial1.setup working with cb0232b

So you can read and write Serial1 when you move the console elsewhere. I'm less sure whether Serial2 works yet

@MaBecker
Copy link
Contributor

Serial1

// disable console on Serial1
Serial1.setConsole(false)
// now you can use Serial1 for other stuff

Serial2 can only be used to transmit data over GPIO2.

// disable debug to free GPIO2
require("ESP8266").setLog(0)
// now you can use Serial2-TXD for other stuff 
Serial2.print("Hello");

So lets close this.

@gfwilliams
Copy link
Member

Thanks! Just so you know, Serial1.setConsole(false) won't disable the console on Serial1 - it just allows it to be hot-swapped if (for example) Telnet connects.

To move it out the way you need to put it somewhere else with (for example) Serial2.setConsole(false) or LoopbackA.setConsole(false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ESP8266 This is only a problem on ESP8266 devices
Projects
None yet
Development

No branches or pull requests

5 participants