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

disable startup banner #3021

Closed
532910 opened this issue Jan 28, 2020 · 12 comments
Closed

disable startup banner #3021

532910 opened this issue Jan 28, 2020 · 12 comments

Comments

@532910
Copy link
Contributor

532910 commented Jan 28, 2020

Please add support for disable startup banner

Workarounds

comment out print_version(L); in app/lua/lua.c

@marcelstoer
Copy link
Member

Why would you want to disable it? Feel free to create a PR.

@TerryE
Copy link
Collaborator

TerryE commented Jan 29, 2020

The ROM bootloader generates a lot of output at 74,880 baud which looks like 1.2 Kb of crap at 115,200 baud, followed by the ~350 bytes of the extended version message, plus info messages on whether the LFS region is loaded or not.

The info message can be a little distracting, but given that the bootloader output is still going to be output to UART1, then suppressing it is only of minor benefit. The main advantage of keeping it is that we created this extended info because this information is really helpful for pinning down bugreps and bug reporters rarely included this before we had it. Perhaps could have a node.textinfo()or the like which generated this string on demand instead, but even so, I am not sure this is worthwhile.

@KT819GM
Copy link

KT819GM commented Jan 30, 2020

Wanted to write similar comment like @TerryE about bootloader output if the case is to keep silent boot because of some parsing on the other end of transmission. But maybe it's for an additional level of security? if so, it could be useful for production devices. Some #ifdef action could be applied on user_config.h to disable any version info?

@marcelstoer
Copy link
Member

Anyone is welcome to create a PR that makes the banner optional (with the default being enabled of course).

@HHHartmann
Copy link
Member

@marcelstoer But why do you close this issue?

@marcelstoer
Copy link
Member

#1010

532910 added a commit to 532910/nodemcu-firmware that referenced this issue Jan 31, 2020
@532910 532910 mentioned this issue Jan 31, 2020
4 tasks
@532910
Copy link
Contributor Author

532910 commented Jan 31, 2020

@TerryE, I'm talking about a control to disable this banner, not about changing the current behaviour and disable it by default.

I'm agree it's very helpful for bugreps, but it may be unwanted for non-interactive serial devices.

#3026

@532910
Copy link
Contributor Author

532910 commented Jan 31, 2020

@marcelstoer, I understand #1010, but still think it's odd to close it. This way no one will fix it. Do not treat it like a your responsibility. Think about it like a public todo list. It's not done, so should be unchecked (opened).

@TerryE TerryE reopened this Jan 31, 2020
@TerryE
Copy link
Collaborator

TerryE commented Jan 31, 2020

Marcel, given that @532910 is offering to do the fix, I also think that it is a little premature to close this.

@532910, what is your response to my point about there already being 1.2Kb of 'crap' sent to the UART, so what is really so bad about another ~350 bytes? You only see it when debugging anyway.

I think that there should be a consensus on need before we consider changing the Lua core code.

On some of my apps I connect to my ESPs using the UART instead of WiFi, and with these init.lua goes straight into the app. The controlling RPi issues JSON commands over the UART and gets JSON responses. Any line not starting with { is ignored and hence the boot message is also ignored.

@532910
Copy link
Contributor Author

532910 commented Jan 31, 2020

@TerryE, I'm sorry, I missed the note about 1.2Kb of 'crap' ):
BTW, could you confirm it also sends some crap to UART1 (GPIO2, TXD1) at boot-up?

The real problem that I have is the serial screen. So I need a separate pin to enable it only after boot-up. It will be cool just to send no 'crap' to it.

@TerryE
Copy link
Collaborator

TerryE commented Jan 31, 2020

The real problem that I have is the serial screen.

What do you mean? What are you using to read the TXD0 and TXD1 pins? As for TXD1, output comes from three sources: The ROM bootloader at 74880 baud

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 31860, room 16 
tail 4
chksum 0x74
load 0x3ffe8000, len 2460, room 4 
tail 8
chksum 0x67
load 0x3ffe899c, len 8, room 0 
tail 8
chksum 0x9a
csum 0x9a

the SDK 3.0 before handover to NodeMCU, again at 74,880 baud

system SPI FI size:4, Flash size: 4194304
boot not set
ota1 not set
ota2 not set
rf cal sector: 11
freq trace enable 0
rf[112] : 00
rf[113] : 00
rf[114] : 01

SDK ver: 3.0.1-dev(fce080e) compiled @ Apr 16 2019 15:02:05
phy ver: 1145_0, pp ver: 10.2

and then the NodeMCU startup at whatever you've configured the frequency to be (by default 115,200)

I can't think a way of silencing all of this output short of 3.3V AND gate on GPIO1 and another spare GPIO.

@532910
Copy link
Contributor Author

532910 commented Jan 31, 2020

The Futaba 20x2 dot matrix VFD M202MD07HB is connected to TXD1. TXD0 is used for debug & development.

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

5 participants