Low Level Messaging API

Hi Forum,

Anyone out there know how to get the low-level messaging api working ? I’m using legato 16.10.1. There is a previous question on this here, and I get the same problem when trying it. After doing everything as instructed in the api guide, I get a “missing binding” error, sdir list shows the client as unbound and trying to open a session gives an “LE_NOT_PERMITTED” error.

I couldn’t find any detail in the api guide on what binding is needed and how it’s defined. It can’t be the IPC binding that’s missing surely, that defeats the purpose of using low-level messaging, low level messaging should remove the dependency on IPC and api files in the adef file.

I also thought that with low-level messaging a binding is created at run-time when a session is created and there isn’t anything to specify in the adef, cdef files. Besides, there is no api file to specify in the cdef.

Anyone able to shed some light on low level messaging ?


It would be helpful if you attached the program which is giving you the error.

Are you trying to communicate with a client or server that uses API files? Or are both ends using the low-level messaging API directly?

Hi @kdunwoody,

Actually I got this working yesterday. Both ends are using the low-level messaging directly, there are no api files.

What threw me was the line in the documentation that says:

very late (runtime) discovery and binding of parties

I interpreted that to mean that you wouldn’t need to have a binding in the client’s adef file, but it turns out that you do. And the syntax of the binding is different to the IPC api style bindings. I used

*.ClientName -> ServerProcess.ServerInterface

The asterisk is neccessary and the clue to the names came from sdir list when it warned about the missing binding.

The reason I wanted to use low-level messaging was to reduce dependency between applications and it does do exactly that: if the server process doesn’t exist, doesn’t start or dies, the client can carry on doing other stuff (as long as it hasn’t opened a session etc). So it works fine. It would have been helpful if there was a bit of documentation about adding the binding to the adef file, either in the low-level messaging document or in the definition files section, but it’s all good now, thanks :slightly_smiling_face:

If all you need is for the app to continue even if the server isn’t running, you could try adding [optional] to the client API (see http://legato.io/legato-docs/latest/defFilesCdef.html#defFilesCdef_requiresApiOptions), which I think should do what you want.

Yeah, that would require an api file though, which was something I wanted to avoid. What I was trying to do was minimize dependencies on both sides and keep the messaging as flexible as possible, on a project level and runtime level. It seemed easier to do that with a shared header file than an api file, although I do appreciate that underneath it’s the same.