Issue when using YellowSensor

Hello,

I am currently trying to adapt the RedSensorToCloud apps to mangOH Yellow. Based on the same mechanism as for mangOH Red, I created to apps : YellowSensor and YellowCloud.
When I tried to update the system on my mangOH, something went wrong when starting the YellowSensor app. I couldn’t tell what happened since I used the exact same components as the YellowSensor sample project.
Here’s what my logread -f tells me :
Sans titre (98.4 KB)

And here is my YellowSensor app :
start: manual

executables:
{
    yellowSensor = ( $CURDIR/../components/sensors/light 
                     $CURDIR/../components/sensors/imu )
}

processes:
{
    run:
    {
        ( yellowSensor )
    }

    envVars:
    {
	LE_LOG_LEVEL = DEBUG
    }

    faultAction: restart
}

extern:
{
    yellowSensor.light.light
    yellowSensor.periodicSensor.dhubIO

    yellowSensor.imu.imu
    yellowSensor.imu.temperature
}


bindings:
{
    yellowSensor.light.dhubIO -> dataHub.io
    yellowSensor.periodicSensor.dhubIO -> dataHub.io
    yellowSensor.imu.dhubIO -> dataHub.io
}

The first issue seems to be your light sensor failing.

From your log file:

Jan  6 00:17:55 swi-mdm9x28-wp user.emerg Legato: *EMR* | yellowSensor[2079]/light T=main | lightSensor.c _light_COMPONENT_INIT() 78 | Assert Failed: 'LocalIioContext'
Jan  6 02:17:55 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[1095]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process 'yellowSensor' (PID: 2079) has exited with exit code 1.

This seems to be triggering cascading faults. :frowning:

Problem is : I am using the sample YellowSensor project, the exact same components and .c files. That’s why I don’t get why it is failing. I tried to dig into the Libiio library but didn’t find much to help me. The “Assert Failed” is because of the iio_create_local_context that returns NULL when there’s an error…

LocalIioContext = iio_create_local_context();
LE_ASSERT(LocalIioContext);