Runtime failure when client tries to connect to service

if i excute ~/legato_framework/legato/apps/sample/gpioCf3Demo gpioCf3Demo application, I faced this error… (WP7702)

please help solve this problem!! and how can i excute sample gpio application , such as turn on LED. I have using IOT#0.

May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c avcApp_SetSwUpdateState() 3013 | No update is going on. CurrentObj9 = null
May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c avcApp_SetSwUpdateResult() 2948 | No update is going on. CurrentObj9 = null
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 697 | Found 16 object 9 instances
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 698 | obj9ListLen; 216 obj9List: </lwm2m/9/0>,</lwm2m/9/2>,</lwm2m/9/3>,</lwm2m/9/4>,</lwm2m/9/5>,</lwm2m/9/8>,</lwm2m/9/9>,</lwm2m/9/10>,</lwm2m/9/11>,
May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | serviceDirectory[1209]/serviceDirectory T=main | serviceDirectory.c DispatchToServer() 734 | Client (uid 1045 β€˜appLED_test’, pid 9948) disagrees with server (uid 0 β€˜root’, pid 1644) on max message size (28 vs. 24) of se
May 2 05:17:00 swi-mdm9x28-wp user.emerg Legato: EMR | UNKNOWN[9948]/framework T=main | messagingSession.c ReceiveSessionOpenResponse() 699 | Unexpected server response: -6 (LE_FAULT).
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1134]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process β€˜LED_test’ (PID: 9948) has exited with exit code 1.
May 2 14:17:00 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[1134]/supervisor T=main | app.c app_SigChildHandler() 4064 | Process β€˜LED_test’ in app β€˜LED_test’ faulted: Ignored.
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1134]/supervisor T=main | app.c app_StopComplete() 4751 | app β€˜LED_test’ has stopped.
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1134]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application β€˜LED_test’ has stopped.
May 2 14:17:02 swi-mdm9x28-wp user.err kernel: [ 4064.480644] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:2 tx:1) mode:FIFO slv_addr:0x55 MSTR_STS:0x091343c8 OPER:0x00000010
May 2 14:17:02 swi-mdm9x28-wp user.err kernel: [ 4064.495462] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:2 tx:1) mode:FIFO slv_addr:0x55 MSTR_STS:0x091343c8 OPER:0x00000010
^C

Hi SeongBeom27,
Maybe Legato framework version and app version mis-match, are you building app with exact same framework version running on WP?
Would you please share below to confirm?

legato version
app info LED_test

Thx

hello lotam, thanks for your advice!!

After I check version, i will reply again

If the app and regato framework have different versions, do you know how to make them the same?

When I update wp7702 firmware,

http://mangoh.io/uploaded-documents/Reference/mangOH%20Yellow/Discover/Getting%20Started/41113347%20mangOH%20Yellow%20GSG%20-%20HTML5-Responsive%20HTML5/#t=41113347_mangOH_Yellow_GSG_-_HTML5%2FInstall_Leaf_and_MangOH_Software%2FInstall_Leaf_and_Build_mangOH_Software.hmtmtmt.

I have updated it through leaf install to the above site.
( For your information, I don’t use Octave. )

@jchitty can you look at this? thx

hello asyal,
Which part should I look at?

I was asking @jchitty to help you on this.
The way to solve this issue is to take the app, add it to your sdef and rebuild system.
Did you do that?

This indicates that you indeed have a mismatch between your client app and the server of some API that your client app is trying to use. This can happen if you build your app using mkapp. You should use mksys (or the mangOH Makefile, which uses mksys).

mkapp only builds a single app, so it cannot make sure that all the apps can work together. mksys builds all the apps and it can also make sure that all the apps have their required APIs connected to compatible servers.

After you run mksys (or make yellow), you will have a .update file that you can install on your device using the update command-line tool. This should resolve this problem for you.

–Jen

mangoh@mangoh-vm:~/mangOH_work$ mksys -t wp77xx yellow.sdef
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** ERROR:
/home/mangoh/mangOH_work/apps/YellowSensorToCloud/components/fileUtils/Component.cdef:9:13: error: Unexpected subsection name β€˜headerDir’ in β€˜provides’ section.

if I command "mksys -t wp77xx yellow.sdef " and β€œmake yellow_wp77xx”
In addition to this, many paths continue to cause these problems in .cdef files.

You are using an old version of the mangOH source code. YellowSensorToCloud has been renamed YellowSensor 5 months ago. I also see that you are not using the leaf shell, which probably means that your shell environment is not configured correctly either.

There are some instructions for getting going with mangOH Yellow development on the mangOH wiki here: https://github.com/mangOH/mangOH/wiki/Building-the-Legato-"system"-(apps)-for-mangOH-Yellow

I hope this helps get you going.

–Jen

hi jchitty,

I don’t use Octave. I think all the recent versions are versions that use Octave, right?

Yes, by default the Octave apps are included in the latest releases for mangOH Yellow, but you don’t have to use them. Just set OCTAVE=0 when you are building. For example,

make yellow OCTAVE=0

Or, you can set the variable in your leaf shell environment so that it is automatically set to 0 whenever you are in that particular leaf workspace. Do this with the leaf env command as follows:

leaf env workspace --set OCTAVE=0

(Look in yellow.sdef to see where that OCTAVE variable is checked.)

Thanks jchitty. I sovled this problem. so, I use make yellow OCTAVE =0 , when I bulild system.

I’d like to ask you one thing…!!

Can I get a simple sample example, such as a lead output example or a switch example using a gpio pin, not a GPIO_demo app inside the mangoh yellow.

Hi,

I’m glad the build is working for you now.

Sorry, but I’m not sure what you are asking for in this new question. Also, it seems like a change in topic. Try starting a new topic with a very clearly defined request.

1 Like

@jchitty I have a similar problem, but I am currently building using leaf shell and mksys command.
Nov 6 14:00:51 fx30s user.err Legato: =ERR= | serviceDirectory[1221]/serviceDirectory T=main | serviceDirectory.c DispatchToServer() 713 | Client (uid 0 β€˜root’, pid 1999) disagrees with server (uid 0 β€˜root’, pid 1330) on protocol ID of service 'mqttClientAws.mqttCl

This is my system definition:
#include β€œ$LEGATO_ROOT/default.sdef”

apps:
{
handleJSON.adef
mqttClientAws.adef
canReadout.adef
}

appSearch:
{
$CURDIR/…/handleJSON
$CURDIR/…/mqttClientAws
$CURDIR/…/canReadout
}

interfaceSearch:
{
$CURDIR/…/Interfaces
}

moduleSearch:
{
$CURDIR/linux_kernel_modules/can_common
$CURDIR/linux_kernel_modules/can_9x07
}

kernelModules:
{
mcp251x.mdef
can_iot.mdef
}

Where I have included the default.sdef so it should build all those packages with the currently set environment. This is the leaf env in my machine:

Workspace: /home/xxxxx/legatoWorkspace/legatoAF β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•‘
β”‚ Profile: FX30S2 [current] (sync) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Packages β”‚ Identifier β”‚ Description β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Included β”‚ swi-fx30-catm_2.0.0 β”‚ SDK for FX30-CATM (Release R11.0.0.007 + Legato 18.09.4) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

And this is on my FX30S target device:
18.09.4_92d7161e103930183c97876ec59c9990_modified

Also information about the app I am trying to use from my client app:
modemService
status: running
running processes:
modemDaemon[1330] (1330, 1459, 1468, 1471, 1475, 1477, 1478, 1480, 1488, 1489, 1492, 1495, 1498, 1509, 1560, 1565, 1567, 1696)
rSimDaemon[1331] (1331)
app.name: modemService
app.md5: 2336e1f571c9b0ac792925dde8f8d610
app.version:
legato.version: 18.09.4

I can bind the mqttClientAws.mqttClientAwsComponent.le_info -> modemService.le_info module but if I try to bind any of the following two modules I will get the error:
mqttClientAws.mqttClientAwsComponent.le_data -> dataConnectionService.le_data
mqttClientAws.mqttClientAwsComponent.le_mdc -> modemService.le_mdc

This is the adef for the app which is trying to use the modemService:
start: auto
sandboxed: false
version: 5.0

executables:
{
mqttClientAws = ( mqttClientAwsComponent )
}

processes:
{
run:
{
(mqttClientAws)
}
//faultAction: restart
}

bindings:
{
mqttClientAws.mqttClientAwsComponent.le_info -> modemService.le_info
mqttClientAws.mqttClientAwsComponent.le_data -> dataConnectionService.le_data
mqttClientAws.mqttClientAwsComponent.le_mdc -> modemService.le_mdc
}

extern:
{
mqttClientAws = mqttClientAws.mqttClientAwsComponent.mqttClientAws
}

I have also tried to re-clonethe legato-af github in case of any changes with the code for the new firmware, didn`t fix the issue.

can you attach your sample app here?

Hmm… This type of error should not be possible if both the client and the server apps are being built fresh as part of an mksys build.

Perhaps try doing a make clean. I wonder if there’s a dependency issue that’s resulting in something not getting rebuilt that should be rebuilt.

Is the modemService being provided to you as a pre-built .app file, perhaps? (Sorry, I’m not very familiar with the FX30 Legato distribution.)

The good news is, the mechanism for ensuring compatible interfaces is working. :wink: It may not feel good right now, but without that check, things would fail in potentially much more bizarre ways.

–Jen

Yes, I prefer having this problem instead of the application crashing for unknown reasons, but I would also like this to get this to work… :slight_smile:

This is the TestApp which I am using, reduced to the bone.
myTestSystem.sdef (99 Bytes)
TestApp.tar.xz (744 Bytes)

The modemService I believe is pre-built and installed with the firmware, I have removed the modemService from the target to avoid that the new built is not installed.
The modemService app which is used by my system is the one from the github, I did clone again the whole repository to prevent that there was an update issue.

Where should I run the make clean command? Is this for the leaf environment or the system?

I tried to compiled your TestApp with Developer Studio on Wp77 R9 package, I changed the component.cdef as follows:


requires:
{
api:
{
modemServices/le_info.api
modemServices/le_mdc.api
// $HOME/legatoWorkspace/legato-af/interfaces/modemServices/le_info.api
// $HOME/legatoWorkspace/legato-af/interfaces/le_data.api
// $HOME/legatoWorkspace/legato-af/interfaces/modemServices/le_mdc.api
}
}


I can now compile the application.