Problem using STRUCT in API file on Version 18

Hey i have a problem I was using my MangOH red with the newest Firmware provided at: https://mangoh.io/mangoh-red-resources-software which is using legato version 20.04.0
After using the I2C bus to speak to a LCD i noticed that after a few hours of use the I2C bus tends to block itself.

After Looking through a few forum pages it is recommended to update to the newest firmware of the WP provided at https://source.sierrawireless.com/resources/airprime/software/wpx5xx/wpx5xx-firmware-latest-release/#sthash.UpXzxbms.dpbs
to fix the I2C problem.

My Problem now is that the new Firmware uses legato 18.06.4 and in order to see if the I2C problem has been fixed i need to recompile my apps for version 18.06.4. But when compiling i get following error:
/home/reinhard/myLeafWorkspace/CL_Agents/apps/IF_Health.api:4:0: error: missing EOF at u’STRUCT’

In my IF_Health.api file i have a bunch of STRUCT definitions.

I am able to compile the Code for version 20.04.0 without any problems. Is STRUCT not supported for older Versions?

Edit:
Ok i searched through the docs and it seems that the STRUCT option wasn’t yet added on Version 18.

But more important question how do i fix the i2c bus issue? Log tells me the following:

qup_i2c qup_i2c.0: Bus still busy, status 132100
qup_i2c qup_i2c.0: Transaction timed out, SL-AD = 0x27

According to the MangOH forum it seems to be a reocurring problem

“it is recommended to update to the newest firmware of the WP”

Did you try that?

I did that, but now i have the problem using STRUCT in the Api file. (Cause the supposedly newest firmware uses Legato 18 which doesn’t support STRUCT yet)

Which module are you using?

WP8548 on a MangOH red carrier board

Have you compiled and run legato 20 on it?

Thats the Problem! Let me explain:
The newest Firmware Provided for the mangOH red on the official Mango website uses following Versions:

When using this version i can compile without problems but get the error that the I2C blocks itself after a few minutes/hours. (Giving me following message: qup_i2c qup_i2c.0: Bus still busy, status 132100
qup_i2c qup_i2c.0: Transaction timed out, SL-AD = 0x27)

So i looked for a solution for my i2c problem, and found that a possible fix may be using the newest firmware for the WP85 provided at https://source.sierrawireless.com/resources/airprime/software/wpx5xx/wpx5xx-firmware-latest-release/#sthash.UpXzxbms.dpbs
so i switched to this version, but in this version (legato 18.04) it is not possible to use STRUCT in the Api files.

My main problem is actually just that the i2c blocks itself, i would actually prefer using legato 20.

I looked at: WP8548 I2C bus lock up when read ADC2 and ADC3 and there it states that a possible fix may be building my own image using the patch for the i2c. But is there an easier fix?

Two methods:

  1. Download the legato 20 and compile it for wp8548
  2. Modify your app to not using STRUCT

I search in “leaf search” , there is already some package is using legato 20 for WP8548:

│ swi-wp85_3.14.0 │ SDK for WP85 (Release 17 + Legato 20.04.0)
│ swi-wp85_3.15.0 │ SDK for WP85 (Release 17 + Legato 20.08.0)

“I search in “leaf search” , there is already some package is using legato 20 for WP8548”

I know that, but don’t i also need to run legato application framework 20.08 on my device to be able to use it? And there isn’t an official release for that.

Of course you need to compile the app with this package swi-wp85_3.15.0

Not official ,still development phase