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

How to disable default serial port REPL #830

Closed
ceremcem opened this issue Apr 3, 2016 · 3 comments
Closed

How to disable default serial port REPL #830

ceremcem opened this issue Apr 3, 2016 · 3 comments

Comments

@ceremcem
Copy link

ceremcem commented Apr 3, 2016

Hi,

I want to create a transparent serial <-> wifi bridge (something like esp-link) and in order to make this happen, I need to disable the default REPL at some point of execution.

Closest documentation I could find is "Console Over Serial" section of this page but it doesn't help either.

How can I disable the REPL console with an application code?

Edit

I tried the following code but it seems that it doesn't have any effect:

var ser = Serial1;

disableConsole = function(){
  console.log("Disabling console!");
  ser.removeAllListeners();
  ser.setup(115200);
  return ser.write("Console disabled...");
};

Edit-2

Documentation says that this is not implemented currently.

Is there anyone who may help me solve/hack this problem? Because I have completed basic application code already, only this feature is left unimplemented.

@gfwilliams
Copy link
Member

You can simply do LoopbackA.setConsole() - this'll put the console on Loopback - where you can access it by reading/writing LoopbackB.

For questions like this (as it's not a bug), please can you ask on the forums. I have already answered this (or similar) questions several times previously on there.

@ceremcem
Copy link
Author

ceremcem commented Apr 4, 2016

Wow! This is clearly the best of good news today! My application works right now and it made me feel like in the last scene of this. Thank you :)

But, isn't it still a bug as I found the issue in the documentation and documentation says it is not implemented right now (or am I constantly misunderstanding what I read):

The esp8266 has two UARTS. UART0 uses gpio1 for TX and gpio3 for RX and is used by the Espruino console. It could be reused for application purposes, but that is not currently implemented. UART1 uses gpio2 for TX and RX is not really usable due to being used for the SDIO flash chip. UART1 TX is used by the debug and could be reused for application purposes, but that is not currently implemented.

@gfwilliams
Copy link
Member

Yes, you're right. I'll add an issue in EspruinoDocs, where the documentation is held.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants