what do the chg_A1:-180 (and similar) messages mean?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
gojimmypi
Posts: 36
Joined: Wed Mar 02, 2016 8:01 pm
Contact:

what do the chg_A1:-180 (and similar) messages mean?

Post by gojimmypi » Thu Mar 10, 2016 5:46 pm

Greetings!

I have MicroPython alpha installed on a NodeMCU board. Installed fresh just yesterday :)

Code: Select all

#4 ets_task(40100268, 3, 3fff4658, 4)
MicroPython v1.5.2-395-g5f6d12c on 2016-03-08; ESP module with ESP8266
Type "help()" for more information.
>>>
Today when I arrived, my session has a bunch of messages like those shown below. When googling it, it seems those messages were seen on an older version of expressif software. Anyone else seeing them on the MicroPython for the ESP8266? What do they mean? Important? Can be turned off? Thanks

Code: Select all

>>> chg_A3:-180
chg_A1:-140
chg_A1:-100
chg_A1:-60
chg_A3:-180
chg_A1:-140
chg_A1:-100
chg_A1:-60
chg_A1:-20
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A1:-140
chg_A1:-100
chg_A1:-60
chg_A1:-20

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: what do the chg_A1:-180 (and similar) messages mean?

Post by Damien » Thu Mar 10, 2016 10:09 pm

They are debug messages from the underlying O/S. I'm not quite sure what they mean but are harmless (I've seen them before on my set-up). They could be something to do with adjusting the wifi radio power.

To disable them use:

import esp
esp.osdebug(None)

That will turn off all debugging messages.

gojimmypi
Posts: 36
Joined: Wed Mar 02, 2016 8:01 pm
Contact:

Re: what do the chg_A1:-180 (and similar) messages mean?

Post by gojimmypi » Thu Mar 10, 2016 11:41 pm

Damien! Thanks for your reply. Dude, you really rock :) Awesome project. (and don't even get me started how cool the theoretical physics & your involvement with CERN is!)

anyhow... your response seemed completely reasonable... until... until Pandora would not launch on my phone. huh?

Hey - so is it at all possible to somehow have *two* OS's running? (yes, I realize that's sounds like a ludicrous question, but hear me out) Surely the answer is no, as the ESP8266 is single-threaded, right? I ask, as before I flashed your binary MicroPython onto my board, I previously had NodeMCU/Lua installed. No big deal... sure... I had installed it myself and started at 0x00000, the same address I installed MicroPython. It appeared to have worked, as duh - there was no longer a Lua prompt rather a Python prompt. Even the "MicroPython v1.5.2-395-g5f6d12c on 2016-03-08; ESP module with ESP8266" message at boot time.

The crazy thing? I had previously setup a tiny Lua demo as a soft wireless AP & single web page on the ESP8266 before flashing the MicroPython. It seems like it is still running!. :shock:

I was working on other things, and noticed Pandora on my phone refused to start. My phone was connected to the soft AP (with no router, no internet) that I setup on Lua, even though (I thought) - I had wiped it and replaced with your MicroPython.

So check this out: here's the diagnostic info being shown in MicroPython, showing connections to the WiFi access point I created in Lua with the NodeMCU software: (my phone MAC edited)

Code: Select all

#4 ets_task(40100268, 3, 3fff4658, 4)
MicroPython v1.5.2-395-g5f6d12c on 2016-03-08; ESP module with ESP8266
Type "help()" for more information.
>>> add 1
aid 1
station: fc:c2:de:xx:xx:xx join, AID = 1
err already associed!
station: fc:c2:de:xx:xx:xx leave, AID = 1
rm 1
I did nothing but install MicroPython; certainly did not create soft AP with python. I printed "Hello World", that's it. So unless you are doing the same with MicroPython internals: creating a software AP with the exact same naming convention (my phone still sees the same ESP_[6 digits of ESP MAC] WiFi Access point)... then both must still be running?! Is that even possible?

And ya - your instructions clearly do state to "erase everything first" ;) and I noticed the "blank.bin" that I loaded is only 4kb in size...

So what I'm thinking, is that NodeMCU was already installed at a different base address, and the one I installed at 0x00000 - thinking it was an update - wasn't actually even being used. Then when I installed your MicroPython at 0x0000, somehow both are running (?).

Or is MicroPython not a new binary OS, rather an app that runs on some sort of internal expressif OS, to which it can give attention in addition to the concurrent Lua? Is there some way to communicate with that other process? Putty only seems to connect to the one UART & that UART sees Python.

I'm in pretty much incredulous disbelief that I still see my Lua access point with Python installed (and I have no other ESP8266's even in the building). So I'm really curious as to what you believe is going on.

btw - I have a variety of ESP8266 boards. Happy to test & help in any way I can.

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: what do the chg_A1:-180 (and similar) messages mean?

Post by platforma » Fri Mar 11, 2016 11:40 am

If you haven't done "erase_flash" with the esptool.py, or what have you. The chip will remember your last AP settings, depending on how you set them up. It is a "feature" of the ESP8266, so you don't have to reconfigure the AP every time you power up, and save some time. So it's no surprise that it still instantiates the AP if you haven't flashed clean :)

To clarify, Micropython or NodeMCU are not operating systems, rather user applications running in a vendor operating system (the one that comes with the ESP).

gojimmypi
Posts: 36
Joined: Wed Mar 02, 2016 8:01 pm
Contact:

Re: what do the chg_A1:-180 (and similar) messages mean?

Post by gojimmypi » Fri Mar 11, 2016 6:16 pm

*edit - spelling
To clarify, Micropython or NodeMCU are not operating systems, rather user applications running in a vendor operating system (the one that comes with the ESP).
well that's certainly interesting! I thought the binary code uploaded was the only thing being executed. Where can I find out more about this "vendor operating system"?

Is that the "Expressif SDK"? http://www.esp8266.com/viewtopic.php?f=5&t=1692 (I thought the Expressif stuff was one option of firmware to be used, and NodeMCU and MircoPython were others)

thanks for your reply.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: what do the chg_A1:-180 (and similar) messages mean?

Post by pfalcon » Wed Mar 23, 2016 12:11 pm

gojimmypi wrote:*edit - spelling

Is that the "Expressif SDK"? http://www.esp8266.com/viewtopic.php?f=5&t=1692 (I thought the Expressif stuff was one option of firmware to be used, and NodeMCU and MircoPython were others)

thanks for your reply.
Yes, Espressif SDK includes a simple RTOS (parts of it are also stored in chip's BootROM). Any firmware for ESP8266 uses SDK/RTOS services (though MicroPython goes further and changes some ways how custom firmware integrates with vendor RTOS, but majority of functionality is still handled by it).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Post Reply