# Ledservice bind no \<root\>.ma\_led

**URL:** <https://mangoh.discourse.group/t/ledservice-bind-no-root-ma-led/4904>\
**Category:** mangOH Red\
**Created:** [July 22, 2020, 4:29pm UTC](https://mangoh.discourse.group/t/ledservice-bind-no-root-ma-led/4904 "2020-07-22T16:29:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![philippesurbayrole](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@philippesurbayrole](https://mangoh.discourse.group/u/philippesurbayrole)\
**Post date:** [July 22, 2020, 4:29pm UTC](https://mangoh.discourse.group/t/ledservice-bind-no-root-ma-led/4904/1 "2020-07-22T16:29:16Z")

</div>

On MangOH red :

```auto
Firmware Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
Bootloader Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
legato version 20.04.0_73c525f681f777a978c4e5500b796c47

```

I use the leaf profile mangoh-red-wp77xx\_06.0 package for the cross compilation on my ubuntu 20.04.

I’ve make a simple program to blink the led with de api ledservice ( my .adef )

```auto
components:
{
}
executables:
{
    wClientExe = ( wClient )
}
start: manual
processes:
{
    run:
    {
        ( wClientExe )
    }
}
bindings:
{
    wClientExe.wClient.ma_led -> ledService.ma_led
}

```

I’ve make a .sdef to be sure to have the ledservice

```auto
#include $LEGATO_ROOT/default.sdef
g any other sections.
buildVars:
{
    // Define a base directory for your project.
    MY_SYSTEM_DIR = $CURDIR
}
interfaceSearch:
{
    // Your project's search paths.
    ${MY_SYSTEM_DIR}/interfaces

    // Legato API search paths.
    ${LEGATO_ROOT}/interfaces
    ${LEGATO_ROOT}/interfaces/airVantage
    ${LEGATO_ROOT}/interfaces/atServices
    ${LEGATO_ROOT}/interfaces/logDaemon
    ${LEGATO_ROOT}/interfaces/modemServices
    ${LEGATO_ROOT}/interfaces/portService
    ${LEGATO_ROOT}/interfaces/positioning
    ${LEGATO_ROOT}/interfaces/secureStorage
    ${LEGATO_ROOT}/interfaces/wifi
}

appSearch:
{
    ${MY_SYSTEM_DIR}/apps
    ${MY_SYSTEM_DIR}/mangOH/apps/LedService/
}

// Directories where components are searched.
componentSearch:
{
    ${MY_SYSTEM_DIR}/components
}

moduleSearch:
{
    ${MY_SYSTEM_DIR}/modules
}

apps:
{
    wClient
    ledService
}

```

But my program have lots errors when i start it  
When i remove the led api, it work fine

The problem seems to be that the ma\_led not present, the `sdir list | grep ma_led` return

```auto
wClient.wClientExe.wClient.ma_led -> <root>.ma_led
[pid 1734] wClient.wClientExe.wClient.ma_led WAITING for <root>.ma_led (protocol ID = '3dd2be270c89a5a489f7b63c8ff381b3')

```

So where my problem ?

Thanks

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [July 24, 2020, 2:56am UTC](https://mangoh.discourse.group/t/ledservice-bind-no-root-ma-led/4904/2 "2020-07-24T02:56:28Z")

</div>

How about change to one of the followings in your simple program adef file?

Test1:

* * *

bindings:  
{  
wClientExe.wClient.ma\_led -\> ledService.ledServiceComponent.ma\_led  
}

* * *

Test2:

* * *

bindings:  
{  
wClientExe.wClient.ma\_led -\> ledService.ledService.ledServiceComponent.ma\_led  
}

* * *

---

<div class="post-metadata">

**Author:** ![philippesurbayrole](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@philippesurbayrole](https://mangoh.discourse.group/u/philippesurbayrole)\
**Post date:** [July 24, 2020, 1:25pm UTC](https://mangoh.discourse.group/t/ledservice-bind-no-root-ma-led/4904/3 "2020-07-24T13:25:34Z")

</div>

Hello

I found a solution, but why now it work, it’s a mystery !

I change my leaf profile :

- swi-vscode-support: 200624
- swi-wp77: 3.4.0 ( not the mangoh-red-wp77xx\_06.0 package !)

I build from scratch de mangOH git ( [GitHub - mangOH/mangOH: Primary mangOH git repository](https://github.com/mangOH/mangOH) ), and update my board.

And miraculously, the line in “sdir” appeared :

> root@swi-mdm9x28-wp:~# sdir list | grep led  
> \<root\>.ma\_led (protocol ID = ‘3dd2be270c89a5a489f7b63c8ff381b3’, max message size = 16 bytes)

I modify my .adef file, with this bindings:

> bindings:  
> {  
> wClientExe.wClient.ma\_led → **\<root\>**.ma\_led  
> }

And, now it don’t crash on app start !
