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

    Delete Pycom Firmware from Lopy and use it as native ESP32 platform?

    Scheduled Pinned Locked Moved Comments & Feedback
    c++ arduino
    9 Posts 4 Posters 3.2k Views 4 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.
    • V Offline
      Verkehrsrot
      last edited by

      Is it possible to clear the Pycom Bootloader/Firmware on a Lopy, and use it as native ESP32 platform? I would like to program it with my familiar toolchain (C++, using PlatformIO IDE) using either ESP-IDF or ESP32 Arduino framework.

      Currently i'm developing on chinaboards with similar features (ESP32, Wifi, LoRa, Bluetooth) like Heltec Lora-32 and TTGO, but those chinaboards have too many quality issues. That's why i want to try LoPy, but i need to get my C++ code based on LMiC from arduino framework running on the LoPy. So no Python wanted.

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

        @verkehrsrot After a flash erase it's a ESP32 module with an additional LoRa chip connected to GPIO5, 19 and 27. You can always switch between the firmware versions. A LoPy4 has additional PSRAM.
        Take care to enabel the WiFi antenna. On Lopy, the switch is connected to GPIO16, on LoPy4 to GPIO12.

        V 1 Reply Last reply Reply Quote 0
        • V Offline
          Verkehrsrot
          last edited by

          Thank you for your reply! That's good news, looks like i can get rid of that crappy china boards this way.

          Do you know how to add the Lopy board to PlatformIO? Unfortunately it's not in the board list yet.

          Is it useful to buy a Lopy4 instead of a Lopy? Price is nearly the same, but i don't need Sigfox, since i am using LoRa with TheThingsNetwork.

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

            @verkehrsrot I do not know PlatformIO so I cannot tell what to do. I would just use a similar board.
            As for LoPy vs Lopy4, go for LoPy4. It has a larger flash and the external RAM, and supports Low Power modes. And it is the actual device. I do not expect LoPy's to me manufactured again after the devices on stock have bee sold.

            1 Reply Last reply Reply Quote 0
            • V Offline
              Verkehrsrot @robert-hh
              last edited by

              @robert-hh said in Delete Pycom Firmware from Lopy and use it as native ESP32 platform?:

              Take care to enabel the WiFi antenna. On Lopy, the switch is connected to GPIO16, on LoPy4 to GPIO12.

              Sure that GPIO16 is the Wifi antenna switch, and NOT the LoRa RX/TX switch?

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

                @verkehrsrot Pretty sure. Look into the Pin-Outs for LoPy; https://docs.pycom.io/chapter/datasheets/development/lopy.html
                and LoPy4:
                https://docs.pycom.io/chapter/datasheets/development/lopy4.html
                or the source code around https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/main.c#L132

                1 Reply Last reply Reply Quote 0
                • sebS Offline
                  seb
                  last edited by

                  On the LoPy, SiPy and WiPy2 the WiFi antenna select is on GPIO16, on the LoPy4, GPy, FiPy and WiPy 3.0 its connected to GPIO21.

                  There is a currently a bug in the firmware where all modules are using GPIO16, this is being fixed in the next release.

                  1 Reply Last reply Reply Quote 0
                  • V Offline
                    Verkehrsrot
                    last edited by Verkehrsrot

                    I found the c++ code for switching the wifi antenna here:

                    antenna.c

                    Implemented this in my c++ application, and it works.

                    Thank you for helping on this.

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      gouach
                      last edited by

                      @Verkehrsrot did you manage to get lopy4 work with platformio ? if yes how did you access teh sigfox or lora functions from cpp ?
                      thanks for your hints

                      1 Reply 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 / 1
                      • First post
                        Last post

                      Pycom on Twitter

                      Pycom