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

    C framework for LoPy

    Scheduled Pinned Locked Moved Enhancements
    lorawanc frameworkesp32
    7 Posts 4 Posters 4.3k 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.
    • K Offline
      karolalexander
      last edited by

      Hi Pycom team,

      Can you provide a simple C development framework with LoRaWan library ?

      Python is great, but limit control over the Hardware.
      I already tried to use micropython and esp-idf from your Github. But, last version of both provide compilation errors (older version are okay). Also have some difficult to extract the LoRaWan stack itself.

      Regards,
      Alexander the lopy lover

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

        Hey Alexander,

        It's a bit wasteful but actually easy to add your own C functions into MicroPython environment then just use Python to call them. That way you have less limitations.

        Have you tried it?

        By the way the source compiles just fine, just make sure you're using the pycom-micropython-sigfox tree (not the old pycom-micropython!) and follow all the steps in the ESP32 README

        1 Reply Last reply Reply Quote 0
        • K Offline
          karolalexander
          last edited by

          Hi Jose,

          Thank you

          Yes, it's a bit tricky

          Compilation now okay, but when loading on the board, LoPy don't give prompt >>> and command are not interpreted.

          Reasons I want a C framework is that my customer need reliability. Currently, the micropython is often evolving and we don't know how the Lopy behave in long use. With C we have all the reported experience of the esp32 community, that limit risks to that we allready know.

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

            @karolalexander
            I ha dnot problem in building and flashing. Please make yourself sure, that you build for LoPy:

            make BOARD=LOPY TARGET=boot
            make BOARD=LOPY TARGET=app
            make BOARD=LOPY flash

            1 Reply Last reply Reply Quote 0
            • K Offline
              karolalexander
              last edited by karolalexander

              Hi Robert,

              Thank you

              After redownloading from the github and trying again compilation => Everything work well
              It just seem like my versions of pycom-esp-idf and micropython were from different date. Or another mistake i did somewhere ...

              I'm still with the idea of a C framework for LoPy. It may be easier to port some code of esp32 and using the hardware functionality. Also many parts of the documentation are not yet implemented or not explicit (for example: access to I2C and SPI second ports)

              EDIT: Also, the FreeRTOS by itself, need some time to take hand on. The micropython implementation over it become even more complex to understand and by the way to make modification/adding module

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

                @karolalexander
                Have a look at the code for Lua ESP32 + LoRaWAN (Whitecat project). Should run on the LoPy and might be more to your liking:

                https://github.com/whitecatboard/Lua-RTOS-ESP32

                In particular they ported the LMIC library for LoRaWAN which is older and less featured than Semtech's but simpler to understand (no HALs) so you might be able to borrow some of the code from there.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  panel123 Banned @karolalexander
                  last edited by panel123

                  This post is deleted!
                  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