I have run into an issue with a command command that is talked about in the getting started section of the MM IoT SDK. My specific version of this command is:
pipenv run ./tools/platform/program-configstore.py -v -H localhost -p mm-mm6108-ekh05 write-json ../examples/ping/config.hjson
And in my config.hjson I have set my bcf file to be the mm6108 version (for my MM6108-SKH05 dev board).
The program-configstore.py command blows up with the error:
File "/home/paul/morsemicro/mm-iot-sdk/framework/./tools/platform/program-configstore.py", line 116, in _serialize_key_value_pair
result += struct.pack("<H", len(data)) + data
struct.error: ushort format requires 0 <= number <= (0x7fff * 2 + 1)
Looking at the python code I see that it is trying to encode the length of the data into a 16 bit value. However, the data is the contents of the .mbin file, which in this instance, is 361KB. Hence the encoding format does not support the amount of data in the mm6108.mbin file.
Looking at the morseformware folder in the framework I see that all the other .mbin files are about 1KB in size and so this would not be an issue for any of the other modules. It seems there are two obvious options:
make the mm6108.mbin file smaller
change the len(data) to be 4 bytes instead of 2.
Of course neither of these two options are easily available to me. Does anyone have any workaround for this issue? In particular is one of the smaller .bcf files “close enough” that I can use that to allow me to keep developing, even if the performance is suboptimal?
Perhaps there is room for more clarity in our documentation!
The BCF is used to configure a board/module for its radio design around the MM6108 chip. This is kept separate to the chip firmware (mm6108.mbin), to allow our module vendors to customise their radio modules outside of our reference designs, but still use the same chip firmware we deliver.
mm6108.bin is the MM6108 chip firmware, and not the file which should be passed into this configuration option. In the MM IoT SDK mm6108.mbin will be included during compilation as a data section. Take a look at framework/src/platforms/ mm-mm6108-ekh05/mm_shims/mmhal_wlan_binaries.c for exactly how these binaries are handled in compiled code. GitHub link as I note you were using PlatformIO in the other thread.
For the EKH05 board, we use an Azurewave AW-HM593 module. The mbin file you want to load in this configuration would therefore be bcf_aw_hm593.mbin. Take note of the 4v3 variant of this mbin, this should be used instead if you set the VFEM jumper to 4V3.
It is all working now and, looking at the tiny writing on the AzureWave chip, I can see that this was a discoverable solution (if I had better eyes).
It seems the BCF files are a bit of a mystery and we are actually looking to use the Heltec HT-HC01 module in our final solution simply because we can buy them. All the hobbyists are saying the same BCF file works for that module but I do wonder, from the cautions in all the documentation, whether this will work but be sub-optimal. Does Morse have any information about how compatible the bcf_aw_hm593 file is with the Heltec HT-HC01?