Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Firmware release 1.7.1.b1

    Scheduled Pinned Locked Moved Announcements & News
    firmware
    73 Posts 12 Posters 39.2k Views 12 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      daniel
      last edited by

      Hello,

      A new firmware version 1.7.1.b1 has been released.

      Here's the change log:

      • Add support for LoRaWAN class C devices.

      • Fix issue with Bluetooth client not using the correct connection id.

      • Add support to select the RTC source clock.

        The options now are the internal 150KHz RC clock or an external 32KHz crystal.

      • Add TX_FAILED_EVENT for LoRa

        Also, the TX_EVENT for confirmed packets is only raised when the
        acknowledge is received, otherwise the TX_FAILED_EVENT is raised.

      • Allow to send packets with more than 64 bytes on raw LoRa.

      • Register LoRa and Timer Alarm callback handlers with the GC root pointers.

      • Remove all logs messages from the IDF sent to UART0.

      • Add all IRQ handlers to the GC root pointers.

      • Set the correct stack limit on the IRQ thread to (stack_size - 1024).

      • Update to the latest IDF and add support for the 4MByte pSRAM on the OEM modules.

      • Fix timer alarm memory allocation bug during initialisation.

      All the sources have been pushed to the github repository as well: https://github.com/pycom/pycom-micropython-sigfox

      Cheers,
      Daniel

      robert-hhR M L 5 Replies Last reply Reply Quote 4
      • robert-hhR Offline
        robert-hh @daniel
        last edited by robert-hh

        @daniel Making runs in unresolved libs:

        • micro-ecc
        • jsmn
        • soc
          I freshly cloned pycom-esp-idf to overcome compile errors, but these libs are missing during the link state.
          So: Where do I get the libs from?

        Update: So, libmicro-ecc.a is in the lib directory, only the Makefile for the bootloader needs a --Llib in the definition of B_LIBS. But still libjsm.a and libsoc.a are missing.
        Update 2: Fixed with an update to the repository by Daniel

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          mcook @daniel
          last edited by

          @daniel

          Hi,

          The previous code built easy enough... seems like this one's bootloader has some overlapping names defined already in IDF. Do you have any suggestions for how to build this version?

          Thanks,
          Mike

          $ make BOARD=LOPY -j5 LORA_BAND=USE_BAND_915 V=1 TARGET=boot
          CC bootloader/bootloader.c
          xtensa-esp32-elf-gcc -DESP_PLATFORM -g3 -Wpointer-arith -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wl,-EL -mlongcalls -Wall -ffunction-sections -fdata-sections -fno-common -Og -nostdlib -std=gnu99 -g3 -fstrict-volatile-bitfields -Iboards/LOPY -I. -I.. -Ihal -Iutil -Imods -Itelnet -Iftp -Ilora -Ibootloader -Ifatfs/src/drivers -Ibuild/LOPY_915/release -Ibuild/LOPY_915/release/genhdr -I/Users/michaelcook/pycom-esp-idf/components/bootloader_support/include -I/Users/michaelcook/pycom-esp-idf/components/bootloader_support/include_priv -I/Users/michaelcook/pycom-esp-idf/components/mbedtls/include -I/Users/michaelcook/pycom-esp-idf/components/mbedtls/port/include -I/Users/michaelcook/pycom-esp-idf/components/driver/include -I/Users/michaelcook/pycom-esp-idf/components/driver/include/driver -I/Users/michaelcook/pycom-esp-idf/components/esp32 -I/Users/michaelcook/pycom-esp-idf/components/esp32/include -I/Users/michaelcook/pycom-esp-idf/components/soc/esp32/include -I/Users/michaelcook/pycom-esp-idf/components/expat/include -I/Users/michaelcook/pycom-esp-idf/components/freertos/include -I/Users/michaelcook/pycom-esp-idf/components/json/include -I/Users/michaelcook/pycom-esp-idf/components/expat/include -I/Users/michaelcook/pycom-esp-idf/components/lwip/include/lwip -I/Users/michaelcook/pycom-esp-idf/components/lwip/include/lwip/port -I/Users/michaelcook/pycom-esp-idf/components/newlib/include -I/Users/michaelcook/pycom-esp-idf/components/nvs_flash/include -I/Users/michaelcook/pycom-esp-idf/components/spi_flash/include -I/Users/michaelcook/pycom-esp-idf/components/tcpip_adapter/include -I/Users/michaelcook/pycom-esp-idf/components/log/include -I/Users/michaelcook/pycom-esp-idf/components/sdmmc/include -I/Users/michaelcook/pycom-esp-idf/components/bt/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/device/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/dm -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/hh -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/sys/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/gatt/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/gap/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/l2cap/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/btcore/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/osi/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/hci/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/gki/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/api/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/btc/include -I../lib/mp-readline -I../lib/netutils -I../lib/fatfs -I../lib -I../drivers/sx127x -I../stmhal -DMICROPY_NLR_SETJMP=1 -DUSE_BAND_915 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DNDEBUG -DBOOTLOADER_BUILD -c -MD -o build/LOPY_915/release/bootloader/bootloader.o bootloader/bootloader.c
          CC bootloader/flash_qio_mode.c
          xtensa-esp32-elf-gcc -DESP_PLATFORM -g3 -Wpointer-arith -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wl,-EL -mlongcalls -Wall -ffunction-sections -fdata-sections -fno-common -Og -nostdlib -std=gnu99 -g3 -fstrict-volatile-bitfields -Iboards/LOPY -I. -I.. -Ihal -Iutil -Imods -Itelnet -Iftp -Ilora -Ibootloader -Ifatfs/src/drivers -Ibuild/LOPY_915/release -Ibuild/LOPY_915/release/genhdr -I/Users/michaelcook/pycom-esp-idf/components/bootloader_support/include -I/Users/michaelcook/pycom-esp-idf/components/bootloader_support/include_priv -I/Users/michaelcook/pycom-esp-idf/components/mbedtls/include -I/Users/michaelcook/pycom-esp-idf/components/mbedtls/port/include -I/Users/michaelcook/pycom-esp-idf/components/driver/include -I/Users/michaelcook/pycom-esp-idf/components/driver/include/driver -I/Users/michaelcook/pycom-esp-idf/components/esp32 -I/Users/michaelcook/pycom-esp-idf/components/esp32/include -I/Users/michaelcook/pycom-esp-idf/components/soc/esp32/include -I/Users/michaelcook/pycom-esp-idf/components/expat/include -I/Users/michaelcook/pycom-esp-idf/components/freertos/include -I/Users/michaelcook/pycom-esp-idf/components/json/include -I/Users/michaelcook/pycom-esp-idf/components/expat/include -I/Users/michaelcook/pycom-esp-idf/components/lwip/include/lwip -I/Users/michaelcook/pycom-esp-idf/components/lwip/include/lwip/port -I/Users/michaelcook/pycom-esp-idf/components/newlib/include -I/Users/michaelcook/pycom-esp-idf/components/nvs_flash/include -I/Users/michaelcook/pycom-esp-idf/components/spi_flash/include -I/Users/michaelcook/pycom-esp-idf/components/tcpip_adapter/include -I/Users/michaelcook/pycom-esp-idf/components/log/include -I/Users/michaelcook/pycom-esp-idf/components/sdmmc/include -I/Users/michaelcook/pycom-esp-idf/components/bt/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/device/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/dm -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/hh -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/bta/sys/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/gatt/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/gap/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/stack/l2cap/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/btcore/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/osi/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/hci/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/gki/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/api/include -I/Users/michaelcook/pycom-esp-idf/components/bt/bluedroid/btc/include -I../lib/mp-readline -I../lib/netutils -I../lib/fatfs -I../lib -I../drivers/sx127x -I../stmhal -DMICROPY_NLR_SETJMP=1 -DUSE_BAND_915 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DNDEBUG -DBOOTLOADER_BUILD -c -MD -o build/LOPY_915/release/bootloader/flash_qio_mode.o bootloader/flash_qio_mode.c
          In file included from /Users/michaelcook/pycom-esp-idf/components/newlib/include/sys/param.h:9:0,
          from bootloader/bootloader.c:18:
          /Users/michaelcook/pycom-esp-idf/components/newlib/include/sys/syslimits.h:40:0: error: "ARG_MAX" redefined [-Werror]
          #define ARG_MAX 65536 /* max bytes for an exec function /
          ^
          In file included from bootloader/bootloader.c:17:0:
          /Users/michaelcook/pycom-esp-idf/components/newlib/include/limits.h:141:0: note: this is the location of the previous definition
          #define ARG_MAX 4096
          ^
          In file included from /Users/michaelcook/pycom-esp-idf/components/newlib/include/sys/param.h:9:0,
          from bootloader/bootloader.c:18:
          /Users/michaelcook/pycom-esp-idf/components/newlib/include/sys/syslimits.h:52:0: error: "PATH_MAX" redefined [-Werror]
          #define PATH_MAX 1024 /
          max bytes in pathname */
          ^
          In file included from bootloader/bootloader.c:17:0:
          /Users/michaelcook/pycom-esp-idf/components/newlib/include/limits.h:145:0: note: this is the location of the previous definition
          #define PATH_MAX 4096
          ^
          bootloader/bootloader.c:36:21: fatal error: soc/rtc.h: No such file or directory
          #include "soc/rtc.h"
          ^
          cc1: all warnings being treated as errors
          compilation terminated.
          make: *** [build/LOPY_915/release/bootloader/bootloader.o] Error 1
          make: *** Waiting for unfinished jobs....
          bootloader/flash_qio_mode.c: In function 'bootloader_enable_qio_mode':
          bootloader/flash_qio_mode.c:121:5: error: implicit declaration of function 'esp_rom_spiflash_wait_idle' [-Werror=implicit-function-declaration]
          esp_rom_spiflash_wait_idle(&g_rom_flashchip);
          ^
          bootloader/flash_qio_mode.c: In function 'enable_qio_mode':
          bootloader/flash_qio_mode.c:162:22: error: 'EFUSE_SPICONFIG_SPI_DEFAULTS' undeclared (first use in this function)
          if (spiconfig != EFUSE_SPICONFIG_SPI_DEFAULTS && spiconfig != EFUSE_SPICONFIG_HSPI_DEFAULTS) {
          ^
          bootloader/flash_qio_mode.c:162:22: note: each undeclared identifier is reported only once for each function it appears in
          bootloader/flash_qio_mode.c:162:67: error: 'EFUSE_SPICONFIG_HSPI_DEFAULTS' undeclared (first use in this function)
          if (spiconfig != EFUSE_SPICONFIG_SPI_DEFAULTS && spiconfig != EFUSE_SPICONFIG_HSPI_DEFAULTS) {
          ^
          bootloader/flash_qio_mode.c:199:5: error: unknown type name 'esp_rom_spiflash_read_mode_t'
          esp_rom_spiflash_read_mode_t mode;
          ^
          bootloader/flash_qio_mode.c:203:12: error: 'ESP_ROM_SPIFLASH_QIO_MODE' undeclared (first use in this function)
          mode = ESP_ROM_SPIFLASH_QIO_MODE;
          ^
          bootloader/flash_qio_mode.c:206:5: error: implicit declaration of function 'esp_rom_spiflash_config_readmode' [-Werror=implicit-function-declaration]
          esp_rom_spiflash_config_readmode(mode);
          ^
          bootloader/flash_qio_mode.c:208:5: error: implicit declaration of function 'esp_rom_spiflash_select_qio_pins' [-Werror=implicit-function-declaration]
          esp_rom_spiflash_select_qio_pins(ESP32_D2WD_WP_GPIO, spiconfig);
          ^
          cc1: all warnings being treated as errors
          make: *** [build/LOPY_915/release/bootloader/flash_qio_mode.o] Error 1

          1 Reply Last reply Reply Quote 0
          • D Offline
            daniel
            last edited by

            @mcook did you also clone the latest version of the IDF: https://github.com/pycom/pycom-esp-idf ? With the old IDF it is not going to build...

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              mcook @robert-hh
              last edited by

              @robert-hh

              I pulled again, and I got those libs.

              $ git pull
              remote: Counting objects: 13, done.
              remote: Compressing objects: 100% (2/2), done.
              remote: Total 13 (delta 5), reused 7 (delta 5), pack-reused 6
              Unpacking objects: 100% (13/13), done.
              From https://github.com/pycom/pycom-micropython-sigfox
              5bed5e9..88419a4 master -> origin/master
              Updating 5bed5e9..88419a4
              Fast-forward
              esp32/bootloader/.DS_Store | Bin 0 -> 8196 bytes
              esp32/bootloader/bootloader.bin | Bin 0 -> 11120 bytes
              esp32/bootloader/lib/libmicro-ecc.a | Bin 0 -> 154340 bytes
              esp32/bootloader/lib/libsoc.a | Bin 0 -> 102856 bytes
              esp32/lib/libjsmn.a | Bin 0 -> 21586 bytes
              esp32/lib/libmdns.a | Bin 0 -> 199564 bytes
              esp32/lib/libsoc.a | Bin 0 -> 107940 bytes
              7 files changed, 0 insertions(+), 0 deletions(-)
              create mode 100644 esp32/bootloader/.DS_Store
              create mode 100644 esp32/bootloader/bootloader.bin
              create mode 100644 esp32/bootloader/lib/libmicro-ecc.a
              create mode 100644 esp32/bootloader/lib/libsoc.a
              create mode 100644 esp32/lib/libjsmn.a
              create mode 100644 esp32/lib/libmdns.a
              create mode 100644 esp32/lib/libsoc.a

              1 Reply Last reply Reply Quote 0
              • M Offline
                mcook @daniel
                last edited by

                Thanks, it went a lot further this time. I was able to build the bootloader. But it is failing while trying to build the app. Seems like a lot of it was completed.

                I am getting a number of errors. Do you have any suggestions?

                Mike

                First error: In file included from /Users/michaelcook/pycom-esp-idf/components/soc/esp32/include/soc/soc.h:20:0,
                from /Users/michaelcook/pycom-esp-idf/components/driver/include/driver/timer.h:19,
                from mods/machtimer_alarm.c:6:
                /Users/michaelcook/pycom-esp-idf/components/soc/esp32/include/soc/io_mux_reg.h: In function 'PIN_PULLUP_DIS':
                /Users/michaelcook/pycom-esp-idf/components/esp32/include/esp_assert.h:23:28: error: first argument to '__builtin_choose_expr' not a constant
                _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG);
                ^
                /Users/michaelcook/pycom-esp-idf/components/soc/esp32/include/soc/soc.h:138:38: note: in expansion of macro 'TRY_STATIC_ASSERT'
                #define ASSERT_IF_DPORT_REG(_r, OP) TRY_STATIC_ASSERT(!IS_DPORT_REG(r), (Cannot use OP for DPORT registers use DPORT##OP));

                robert-hhR 1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @mcook
                  last edited by

                  @mcook did you include the board name in the make, like
                  make BOARD=WIPY TARGET=app

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    mcook @robert-hh
                    last edited by

                    @robert-hh

                    Yes. I did. I use the flash target to get it to write directly to the board.

                    make BOARD=LOPY LORA_BAND=USE_BAND_915 flash

                    Mike

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      livius @daniel
                      last edited by livius

                      @daniel
                      I have few new problems after upgrade from 1.6.13 to 1.7.1
                      Now many times i got

                      AttributeError: 'module' object has no attribute
                      

                      but code was not changed and worked before upgrade - can something e.g. GC root pointers change affect some code?
                      I do not use custom threads. Only "simple" code.

                      UPDATE
                      After downgrade to 1.6.13 all work ok without any change in the code..

                      think about people first, then computers

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        daniel
                        last edited by

                        @livius: can you share a small piece of code that reproduces the issue that you are having? Thanks...

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          daniel
                          last edited by

                          @mcook please try clonning the new IDF from scratch.

                          M 1 Reply Last reply Reply Quote 0
                          • D Offline
                            daniel
                            last edited by

                            @livius can you share the complete exception log? Is it happening inside an interrupt callback?

                            L 1 Reply Last reply Reply Quote 0
                            • M Offline
                              mcook @daniel
                              last edited by

                              @daniel

                              Hi. I did that.

                              These are my steps. They worked with the previous source. But now I am receiving the error. Do I need to change something?

                              #for my mac - get the ESP32 xtensa compiler
                              wget https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-59.tar.gz

                              #edit ~/.bash_profile to add in the xtensa compiler
                              #Add in esp bin to the PATH:
                              export PATH=$PATH:$HOME/xtensa-esp32-elf/bin

                              cd ~/

                              #clone the esp idf libs
                              git clone https://github.com/pycom/pycom-esp-idf.git

                              cd pycom-esp-idf

                              #checkout the submodules
                              git submodule update --init

                              #set up the IDF_PATH
                              vi ~/.bash_profile
                              export IDF_PATH=~/pycom-esp-idf

                              cd ~/
                              #clone the code for micropyton
                              git clone https://github.com/pycom/pycom-micropython-sigfox.git

                              cd pycom-micropython-sigfox/mpy-cross
                              make all

                              cd ../esp32

                              #make the bootloader
                              make BOARD=LOPY -j5 LORA_BAND=USE_BAND_915 V=1 TARGET=boot

                              #vi application.mk
                              #update the reference to /dev/ttyUSB0 to the serial port the LoPy is using
                              #now I power off LoPy, attach GND to PIN 23 on the LoPy , and power back on

                              make BOARD=LOPY LORA_BAND=USE_BAND_915 flash

                              #the board is now flashed. power it off, remove the jumpers, power it on

                              J 1 Reply Last reply Reply Quote 0
                              • L Offline
                                livius @daniel
                                last edited by livius

                                @daniel

                                Is it happening inside an interrupt callback?

                                I do not use in this project callbacks and threads

                                i have tried to create minimal code to reproduce but still without success.
                                Maybe this help somehow - but probably not:
                                In normal case with 1.6.13 when it start this is the log

                                rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
                                configsip: 0, SPIWP:0x00
                                clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
                                mode:QIO, clock div:2
                                load:0x3fff9010,len:8
                                load:0x3fff9018,len:248
                                load:0x40078000,len:4056
                                load:0x4009fc00,len:920
                                entry 0x4009fde4
                                I (1557) wifi: wifi firmware version: 90b1b8b
                                I (1558) wifi: config NVS flash: disabled
                                I (1558) wifi: config nano formating: disabled
                                I (1573) wifi: Init dynamic tx buffer num: 32
                                I (1574) wifi: wifi driver task: 3ffd55f8, prio:23, stack:3584
                                I (1574) wifi: Init static rx buffer num: 10
                                I (1576) wifi: Init dynamic rx buffer num: 0
                                I (1580) wifi: Init rx ampdu len mblock:7
                                I (1584) wifi: Init lldesc rx ampdu entry mblock:4
                                I (1588) wifi: wifi power manager task: 0x3ffda9b4 prio: 21 stack: 2560
                                I (1595) wifi: sleep disable
                                I (2584) wifi: wifi timer task: 3ffdba30, prio:22, stack:3584
                                I (2606) wifi: Init ampdu: 0
                                I (2607) wifi: mode : softAP (24:0a:c4:00:6e:c3)
                                boot
                                29.31876 100463.6 262.9624
                                main
                                free 47904
                                konfig.config_wifi=1
                                wifi_sta
                                I (3439) wifi: Init ampdu: 0
                                I (3439) wifi: mode : sta (24:0a:c4:00:6e:c2) + softAP (24:0a:c4:00:6e:c3)
                                I (3440) wifi: sleep disable
                                <WLAN>
                                [(ssid='vnet-509F64', bssid=b'pT\xd2b\xc4\xda', sec=4, channel=1, rssi=-38), (ssid='livius', bssid=b'\x000O\x8b\x0c\x08', sec=4, channel=9, rssi=-40), (ssid='UPC0838976', bssid=b'\x8c\x04\xff\xf5\xae\x8a', sec=4, channel=11, rssi=-60), (ssid='UPC Wi-Free', bssid=b'\x8e\x04\xff\xf5\xae\x8c', sec=5, channel=11, rssi=-60), (ssid='UPC77A39D9', bssid=b'\x90\\Dt\x81\x7f', sec=4, channel=6, rssi=-69), (ssid='UPC Wi-Free', bssid=b'\x92\\\x14t\x81\x7f', sec=5, channel=6, rssi=-70), (ssid='TP-LINK_9A6D1E', bssid=b'\xb0Hz\x9am\x1e', sec=3, channel=6, rssi=-73), (ssid='keke', bssid=b'\xb0Hz\xbe\xf6\xa4', sec=3, channel=4, rssi=-75), (ssid='2.4G-Vectra-WiFi-B7C11C', bssid=b'\x84\x00-  <', sec=4, channel=1, rssi=-76), (ssid='2.4G-vnet-1C0A58', bssid=b't\x85*3 \xd7', sec=4, channel=1, rssi=-76), (ssid='DIRECT-y6-BRAVIA', bssid=b':\xb1\xdb\x83\xd7\x89', sec=3, channel=6, rssi=-85), (ssid='2.4G-vnet-08CC4C', bssid=b'\x00q\xc2C|\x94', sec=4, channel=1, rssi=-86), (ssid='UPC1334070', bssid=b'D2\xc8\x9c6\x0c', sec=4, channel=1, rssi=-87), (ssid='UPC Wi-Free', bssid=b'\x92\\\x14\xceh\x95', sec=5, channel=6, rssi=-88), (ssid='UPC Wi-Free', bssid=b'F2\xc8\x9c6\x0e', sec=5, channel=1, rssi=-89), (ssid='UPC5F267D4', bssid=b'\x90\\D\xceh\x95', sec=4, channel=6, rssi=-89), (ssid='UPC248781946', bssid=b'\xfco\xb7=fT', sec=3, channel=11, rssi=-91), (ssid='vnet-EC0D8E', bssid=b'T\xbe\xf7\nEN', sec=4, channel=11, rssi=-91), (ssid='UPC0040392', bssid=b'\x00&$>\xaa\x99', sec=4, channel=1, rssi=-94), (ssid='UPC Wi-Free', bssid=b'\x02&$>\xaa\x9b', sec=5, channel=1, rssi=-94)]
                                vnet-509F64
                                livius
                                UPC0838976
                                UPC Wi-Free
                                UPC77A39D9
                                UPC Wi-Free
                                TP-LINK_9A6D1E
                                keke
                                2.4G-Vectra-WiFi-B7C11C
                                2.4G-vnet-1C0A58
                                DIRECT-y6-BRAVIA
                                2.4G-vnet-08CC4C
                                UPC1334070
                                UPC Wi-Free
                                UPC Wi-Free
                                UPC5F267D4
                                UPC248781946
                                vnet-EC0D8E
                                UPC0040392
                                UPC Wi-Free
                                I (7133) wifi: ap channel adjust o:1,1 n:9,2
                                I (7133) wifi: n:9 2, o:1 0, ap:9 2, sta:9 2, prof:1
                                I (8130) wifi: state: init -> auth (b0)
                                I (8135) wifi: state: auth -> assoc (0)
                                I (8139) wifi: state: assoc -> run (10)
                                I (8155) wifi: connected with livius, channel 9
                                WLAN connection to the router succeeded!
                                connected to socket
                                wifi_imported
                                konfig.config_czas=1
                                ---RTC---
                                (1970, 1, 1, 0, 0, 8, 383520, None)
                                (2017, 6, 2, 21, 31, 15, 563, None)
                                konfig.config_LCD=1
                                konfig.config_termometr=1
                                ---DS18X20---
                                ---termometr---
                                ---termometr: bytearray(b'(\xff;\x17\x83\x16\x04\xa3')
                                

                                but with 1.7.1

                                rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
                                configsip: 0, SPIWP:0x00
                                clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
                                mode:QIO, clock div:2
                                load:0x3fff9010,len:12
                                ho 0 tail 12 room 4
                                load:0x3fff9020,len:388
                                load:0x40078000,len:11412
                                load:0x4009fc00,len:848
                                entry 0x4009fd9c
                                boot
                                28.58889 100493.7 260.5683
                                main
                                free 41424
                                konfig.config_wifi=1
                                wifi_imported
                                konfig.config_czas=1
                                ---RTC---
                                Traceback (most recent call last):
                                  File "main.py", line 13, in <module>
                                  File "/flash/lib/calosc.py", line 23, in <module>
                                  File "/flash/lib/czas.py", line 49, in <module>
                                AttributeError: 'module' object has no attribute 'wlan'
                                MicroPython v1.8.6-640-g585ac892 on 2017-06-02; WiPy with ESP32
                                Type "help()" for more information.
                                >>> 
                                

                                czas.py have

                                import wifi
                                

                                and inside wifi.py is

                                import machine
                                import time
                                from machine import Timer
                                from network import WLAN
                                import socket
                                import binascii
                                import struct
                                import funkcje
                                from machine import Pin
                                import os
                                
                                print('wifi_sta')
                                funkcje.Led(0x00ff00, 100)
                                
                                wlan = WLAN(mode=WLAN.STA_AP)
                                adr = socket.getaddrinfo('192.168.1.102', 9456)
                                sok = None
                                print(wlan)
                                ..........other lines of code
                                

                                and i use in czas.py e.g.
                                wifi.wlan.isconnected()

                                and i got then error that wlan not exists

                                think about people first, then computers

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  jmarcelino @mcook
                                  last edited by

                                  @mcook
                                  not sure if it helps but the latest toolchain is actually https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz

                                  M 1 Reply Last reply Reply Quote 0
                                  • L Offline
                                    livius @daniel
                                    last edited by livius

                                    @daniel
                                    i have found problem :) And now have question.

                                    Is name wifi registered as reserved unit name?
                                    i have in my lib folder wifi.py

                                    but i see that when i call dir it list me some system objects?

                                    >>> dir(wifi)
                                    ['Wifi', 'WLAN', '__name__', 'hexlify', 'sleep', 'Timer', 'exc_info', 'start_new_thread']
                                    

                                    after changing wifi.py to different name and all its references
                                    all work ok

                                    think about people first, then computers

                                    J 1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      jmarcelino @livius
                                      last edited by jmarcelino

                                      @livius
                                      Weird I didn't get any wifi.py on my lib and also nothing after os.mkfs("/flash") Wondering how you got it...

                                      L 1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        jmarcelino
                                        last edited by jmarcelino

                                        @daniel
                                        I was just reading this post about the 4MB pSRAM support https://www.esp32.com/viewtopic.php?f=13&t=2031

                                        As Jeroen explains do we need to build the toolchain from the xtensa-1.22.x-ext_ram_patch branch to compile the Pycom source correctly for the W01/L01 modules?

                                        All seems a bit cutting edge :-) but to get 4MB RAM wow...

                                        1 Reply Last reply Reply Quote 0
                                        • L Offline
                                          livius @jmarcelino
                                          last edited by

                                          @jmarcelino
                                          This is my custom file.
                                          And it worked ok in previous firmware.
                                          but now this name is registered by system for something. I see nothing about in docs and i do not see it in pycom sources, but maybe i miss something in pycom sources

                                          think about people first, then computers

                                          J 1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            jmarcelino @livius
                                            last edited by jmarcelino

                                            @livius
                                            ha sorry misunderstood your comment. But if I do dir(wifi) as you showed I get nothing.

                                            L 2 Replies Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 1 / 4
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom