Coding in C C++
-
Dear All,
I've actually bought the WiPy and SiPy because I thought it was like an ESP32, but more professional and feature-packed. To be honest, I don't like Python and it's not yet in my team's toolchain, so I'd absolutely prefer to develop in C and C++ as we do have a lot of shared libs.
AFAIK the Python stuff is based on a fork of esp-idf, so it should basically no problem to compile with esptool and include pycom-specific libs like Sigfox, correct?
-
Hello @derchris did you manage to get sigfox working ?
I'm in the same situation as you and I wonder where to start to use sigfox in c
any hint appreciated.
-
@jmarcelino Ah, unterstood :)
I think I‘m almost there... just the references to Sigfox API are missing. Are these included in the static lib at all?
-
@derchris
I'm just explaining why you won't find the source files.Plugging directly into C library should work, but you will need to have activated your SiPy in advance (via the firmware update) so you have the ID and PAC assigned and stored in the protected flash region, otherwise you won't have access to the network.
-
@jmarcelino and is that a problem? I'm personally fine using closed source for commercial projects
-
@derchris
The Sigfox libraries are closed source since they contain Sigfox proprietary code which Pycom is not allowed to distribute.
-
@derchris interesting. Yes, that's a branch on github which I did not look into before. The most recent update seems to be from March.
-
@robert-hh funny, just googled for the .c and found it: https://github.com/pycom/pycom-micropython-censis/blob/master/esp32/sigfox/modsigfox.c
The commit message says " esp32: Build sigfox.a library with all the files that cannot be open …"
-
@derchris Right, the Lora chip is the SX1272, and it was mentioned in the new announcement being used for sigfox too. Interesting that one finds modsigfox_api.c and modsigfox.h in the source tree, but not modsigfox.c and libsigfox.c. So not all is open source. But as far as I remember, the SiPy was not financed by a kickstarter campaign.
-
@robert-hh thanks for the reply! Well, I see a modsigfox.a lib with a header, so at least this should be C-compatible. From extracting the info it seems more like it is a TI CC1120
Ah and I really like the board and pycom, it's just me not wanting to add another layer of possible problems with Python
-
@derchris You can obviously use the espressif IDF for coding the ESP32 part. Using the sigfox code from SiPy could be a little bit tricky, since the interfaces are made for the python environment. Maybe you find other libraries for that chip, which is told to be a Semtech SX1272. Good luck.
The WiPy is software-wise pretty standard, like many other ESP32 modules. The biggest advantage is the external antenna connector and maybe a better production quality. Newer versions with 4 MB RAM may be more unique.