Early access releases #3 & #4

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Early access release #3

Post by jwissing » Fri Apr 15, 2016 2:25 pm

Just a question.
How can i disable the debug messages that seem to come from bdev?

Code: Select all

>>> os.remove('switchRelay.py')
writeblocks(2, 3fff1950(4096))
readblocks(1, 3fff19a0(4096))
writeblocks(1, 3fff1a80(4096))
ioctl(3, 0)
>>>

User avatar
deshipu
Posts: 1348
Joined: Thu May 28, 2015 5:54 pm

Re: Early access release #3

Post by deshipu » Fri Apr 15, 2016 4:31 pm

jwissing wrote:Just a question.
How can i disable the debug messages that seem to come from bdev?

Code: Select all

>>> import esp
>>> esp.osdebug(None)

User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Early access release #3

Post by jwissing » Fri Apr 15, 2016 4:39 pm

deshipu wrote:
jwissing wrote:Just a question.
How can i disable the debug messages that seem to come from bdev?

Code: Select all

>>> import esp
>>> esp.osdebug(None)
I have this code in my boot.py. but those messages are written nonetheless.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Early access release #3

Post by kfricke » Fri Apr 15, 2016 5:29 pm

That osdebug(None) does only disable the ESP core OS debug messages on a UART interface. The debug output mentioned is from the various MicroPython modules being implemented at the moment. Paul and Damien seem to have them enabled intentionally for us to provide meaningful bug and crash reports.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Early access release #3

Post by kfricke » Fri Apr 15, 2016 5:34 pm

Oh, just saw you can help yourself...

Go to the esp8266/scripts/ directory of your MicroPython sources and edit the file flashdev.py. There you can find various debug messages printed onto the console. Simply comment them out or tease them as you like.
After that you do need to rebuild the firmware cleanly, flash and enjoy!

User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Early access release #3

Post by jwissing » Fri Apr 15, 2016 5:40 pm

kfricke wrote:Oh, just saw you can help yourself...

Go to the esp8266/scripts/ directory of your MicroPython sources and edit the file flashdev.py. There you can find various debug messages printed onto the console. Simply comment them out or tease them as you like.
After that you do need to rebuild the firmware cleanly, flash and enjoy!
Is this release and the accessible git source the same already?
When i build from git origin master i get 1.7 .....
This is still 1.6...
Do i need to pull some other repository?

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Early access release #3

Post by kfricke » Fri Apr 15, 2016 5:48 pm

jwissing wrote:...
Is this release and the accessible git source the same already?
...
Do i need to pull some other repository?
Take a look at github and read the section i did mention. Check locally and you should find it in your recently pulled local git repository. If not present take Pauls thread for "tips, tricks and updates" to update it.

User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Early access release #3

Post by jwissing » Sat Apr 16, 2016 8:15 am

kfricke wrote:
jwissing wrote:...
Is this release and the accessible git source the same already?
...
Do i need to pull some other repository?
Take a look at github and read the section i did mention. Check locally and you should find it in your recently pulled local git repository. If not present take Pauls thread for "tips, tricks and updates" to update it.
I have flashed my ESP12E with the latest build and there is no module webrepl2 and module onewire is missing.
I conclude these are different source bases and not comparable.
I take it that it is not possible to suppress the debug messages in this build.

User avatar
Frida
Posts: 40
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: Early access release #3

Post by Frida » Sat Apr 16, 2016 10:25 am

The network resets periodically, why?

Code: Select all

>>> 
>>> 
PYB: soft reboot
ioctl(1, 0)
ioctl(5, 0)
readblocks(0, 3ffef680(4096))
readblocks(2, 3ffef750(4096))
could not open file 'boot.py' for reading
MicroPython v1.6-436-ge5dc8d3-dirty on 2016-04-08; ESP module with ESP8266
Type "help()" for more information.
>>> 
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== import pyb, time
=== 
=== while 1:
===  time.time()
===  pyb.delay(11000 * 6)
=== 
=== 
158
216
275
333
391
449
507
565
623
681
739
797
856
914
972
1030
1088
1146
1203
1261
1319
1377
1435
1493
1551
1609
1667
1725
1783
1841
1899
1957
2015
2073
2131
2189
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
2247
bcn_timout,ap_probe_send_start
2305
2363
2421
2479
bcn_timout,ap_probe_send_start
2536
2594
2652
2710
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
2768
2826
2884
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
2941
bcn_timout,ap_probe_send_start
2999
3057
3115
3173
bcn_timout,ap_probe_send_start
3230
3288
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
3346
bcn_timout,ap_probe_send_start
3404
3462
3519
3577
bcn_timout,ap_probe_send_start
3635
bcn_timout,ap_probe_send_start
3693
3750
3808
bcn_timout,ap_probe_send_start
3866
3924
bcn_timout,ap_probe_send_start
3981
4039
bcn_timout,ap_probe_send_start
4097
4155
4212
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
4270
4328
4386
4443
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
4501
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
4559
bcn_timout,ap_probe_send_start
4616
4674
bcn_timout,ap_probe_send_start
4732
4789
4847
4905
4962
5020
5078
5136
5193
5251
5309
5366
5424
5482
5539
5597
5655
5712
5770
5828
5886
5943
6001
6059
6116
6174
6232
6290
6347
6405
6463
6521
6578
6636
6694
6751
6809
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
6867
6925
6982
7040
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
7098
7156
7213
7271
7329
7387
7445
7502
7560
bcn_timout,ap_probe_send_start
7618
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
7675
7733
7791
7849
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
7906
7964
8022
8080
8137
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
8195
8252
8310
8368
8425
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with Propeller, channel 6
dhcp client start...
ip:192.168.1.8,mask:255.255.255.0,gw:192.168.1.1
8483
8540
8598
8655
8713
8770
8828
8885
8943
9001
9058
9116
9173
9231
Yes Frida is my watchdog!

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Early access release #3

Post by kfricke » Sat Apr 16, 2016 10:43 am

jwissing wrote:...
I take it that it is not possible to suppress the debug messages in this build.
Indeed it is. Simply use the following file as a replacement for your 'esp8266/scripts/flashbdev.py':

Code: Select all

import esp

class FlashBdev:

    SEC_SIZE = 4096
    START_SEC = 0xa0000 // SEC_SIZE
    NUM_BLK = 64

    def __init__(self, blocks=NUM_BLK):
        self.blocks = blocks

    def readblocks(self, n, buf):
        esp.flash_read((n + self.START_SEC) * self.SEC_SIZE, buf)

    def writeblocks(self, n, buf):
        assert len(buf) <= self.SEC_SIZE, len(buf)
        esp.flash_erase(n + self.START_SEC)
        esp.flash_write((n + self.START_SEC) * self.SEC_SIZE, buf)

    def ioctl(self, op, arg):
        if op == 4:  # BP_IOCTL_SEC_COUNT
            return self.blocks
        if op == 5:  # BP_IOCTL_SEC_SIZE
            return self.SEC_SIZE
Flash the firmware using the usual command 'make PORT=/dev/ttyUSB0 BAUD=460800 deploy' in your esp8266 directory and you should end up with no debug messages on access to the flash filesystem.

Locked