C framework for LoPy



  • 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



  • @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.



  • 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



  • @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



  • 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.



  • 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


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.