Mksys can't bind to non-existent server app 'wifiService'

Ok, now I can tell you for sure that when I try to compile basic stuff on release 16 I get these errors that I don’t understand what they depend on. When I compile the same things on FW 13 or 13.1 these errors are not there. What could it depend on?

Why don’t you use R13?
I suggest you staying on what is working

ok but I have a problem on FW13: to implement the connection I need the two libraries below and it doen’t find them: how can I solve this issue?

Are you referring to the wifi sample code on legato 19.2.0?

Yes I am using 19.02.0 Legato that is coherent with FW13

I don’t see the sample is using these .h file

I compiled by myself this simple code. Is there a simil code version for Legato 19.02.0…without the libraries I can’t do anything :disappointed_relieved:
// WiFiAppComponent.c
//
// Specifies the main source file of the component. Add initialization and event registrations to
// the files COMPONENT_INIT functions.

// Include the core framework C APIs.
#include “legato.h”

// Include your component’s API interfaces.
#include “interfaces.h”
#include “le_wifiDefs_interface.h”
#include “le_wifiClient_common.h”

#define MAX_SSID_BYTES 8
#define NBR_OF_PINGS “5”
le_result_t result;
le_wifiClient_NewEventHandlerRef_t WiFiEventHandlerRef = NULL;
le_wifiClient_AccessPointRef_t accessPointRef = NULL;

static void AskForIpAddress
(
void
)
{
int16_t systemResult;
char tmpString[512];

// DHCP Client
snprintf( tmpString,
        sizeof( tmpString ),
        "PATH=/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin;"
        "/sbin/udhcpc -R -b -i wlan0"
        );

systemResult = system( tmpString );
// Return value of -1 means that the fork() has failed (see man system).
if ( 0 == WEXITSTATUS( systemResult ) )
{
    LE_INFO("le_wifiClient_Connect DHCP client: %s", tmpString);
}
else
{
    LE_ERROR( "le_wifiClient_Connect DHCP client %s Failed: (%d)", tmpString, systemResult );
}

}

static void TestToPingGooglesDNS
(
void
)
{
int16_t systemResult;
char tmpString[512];

// PING
snprintf( tmpString,
        sizeof( tmpString ),
        "ping -c " NBR_OF_PINGS " 8.8.8.8"
);


LE_INFO("pinging 8.8.8.8 5x times: %s", tmpString);
systemResult = system( tmpString );
// Return value of -1 means that the fork() has failed (see man system).
if ( 0 == WEXITSTATUS( systemResult ) )
{
    LE_INFO("le_wifiClient_Connect Ping: %s", tmpString);
}
else
{
    LE_ERROR( "le_wifiClient_Connect Ping %s Failed: (%d)", tmpString, systemResult );
}

}

//static le_wifiClient_AccessPointRef_t MyHandleScanResult
static void MyHandleScanResult
(
void
)
{
LE_INFO(“ECCOCI”);
uint8_t ssid[MAX_SSID_BYTES];

size_t ssidNumElements = MAX_SSID_BYTES;
le_wifiClient_AccessPointRef_t accessPointRef = le_wifiClient_GetFirstAccessPoint();

 
while( NULL != accessPointRef )
{
    LE_INFO("ECCOCIwhile");
     result = le_wifiClient_GetSsid( accessPointRef, ssid, &ssidNumElements );
     if (( result == LE_OK ) && ( memcmp( ssid, "", ssidNumElements) == 0 ))
     {
          LE_INFO("WiFi Client found.");
           printf("Found:\tSSID:\t\"%.*s\"\tStrength:%d\tRef:%p\n",
                                (int)ssidNumElements,
                                (char*) &ssid,
                                le_wifiClient_GetSignalStrength(accessPointRef),
                                accessPointRef);
            
          break;
        
     }
     else {
         LE_INFO("WiFiClient not found");
     }
     LE_INFO("Scegli un'altra rete!!!");
     accessPointRef = le_wifiClient_GetNextAccessPoint();
     
     //le_wifiClient_Connect ( accessPointRef );
}
//return accessPointRef;

result = le_wifiClient_SetSecurityProtocol( accessPointRef, LE_WIFICLIENT_SECURITY_WPA2_PSK_PERSONAL );

result = le_wifiClient_SetPassphrase ( accessPointRef, "");
if (result != LE_OK){
    LE_INFO("Controllare i parametri.");
}
result = le_wifiClient_Connect ( accessPointRef );
 if (result == LE_OK)
{
    LE_INFO("Mi sto connettendo...");
}
else {
    LE_INFO("Non riesco a connettermi.");
}

}

static void EventHandler
(

le_wifiClient_Event_t clientEvent,
void* contextPtr

)
{

switch( clientEvent )
{

     case LE_WIFICLIENT_EVENT_CONNECTED:
     {
         LE_INFO("WiFi Client Connected.");
         AskForIpAddress();
         TestToPingGooglesDNS();
     }
     break;
     case LE_WIFICLIENT_EVENT_DISCONNECTED:
     {
         LE_INFO("WiFi Client Disconnected.");
     }
     break;
     case LE_WIFICLIENT_EVENT_SCAN_DONE:
     {
         LE_INFO("WiFi Client Scan is done.");
          MyHandleScanResult();
          
        
     }
     break;
     default:
        LE_INFO( "ERROR Unknown event");
    break;
}

}

static void MyInit
(
void
)
{

le_result_t result = le_wifiClient_Start();
    if ( LE_OK == result )
{
    LE_INFO("WiFi Client started.");
    
    WiFiEventHandlerRef = le_wifiClient_AddNewEventHandler( EventHandler, NULL);

    LE_INFO ("prova");
    
}
else if ( LE_BUSY == result )
{
    LE_INFO("ERROR: WiFi Client already started.");
}
else
{
    LE_INFO("ERROR: WiFi Client not started.");
}

}

// This function is called only once on startup. Place your initialization and event registration
// here.
COMPONENT_INIT
{
// Write in the log that this component has started.
LE_INFO(“Component WiFiAppComponent started.”);
le_wifiClient_Scan();
MyInit();

/*sleep(5);
le_wifiClient_Stop();
*/
}

No idea as i don’t see such thing in legato 19.2

Suggest you using the sample app to do modification.

Good luck!

sorry @jyijyi I do not want to be controversial, but unfortunately I have to dirlk (and this highlights all the paucity of this HW). If I am a new Legato user and I go to the Internet, to learn how to program in this environment, I find ONLY the Legato reference manual of version 16, as well as the Legato IO getting started of 16, which explains programming and libraries to use. (I didn’t invent anything). The manuals of the 13 are not even found on the net. That is why I have programmed the latest version according to. At this point, how can you expect to do a port on an old version if there are no manuals to understand how programming takes place in it? Are we kidding? Where am I wrong?

Not sure if you have enough technical skill to upgrade everything to R16…
e.g. mangoh layer
MQTT
CAN interface
WIFI
etc…

That is why I suggest you staying on R13 as everything seems to be quite OK to you.
Changing your WIFI app is much more easier.

BTW, I don’t see problem to “make wp76xx” on swi-wp76_4.7.0 inside leaf shell.
I can compile out the legato.cwe.

(lsh:swi-wp76_4.7.0) owner@ubuntu:~/leaf/leaf-data/swi-wp76_4.7.0/wp76-legato$ ls ./build/wp76xx/legato.cwe -l
lrwxrwxrwx 1 owner owner 23 May 28 09:32 ./build/wp76xx/legato.cwe -> legato-squashfs.ubi.cwe

Good luck!

Ok @jyijyi but I have already done my project in FW16! I can run correctly wifi, Mqtt, GPS, positioning, etc. So, on FW 16 I have only to make available gpioexpanderservicegreen and mux tools, in order to activate iot2 for can bus (I did It for FW13). That’s all :grin:. If I can run gpio and mux on FW16 my project Is completed

Hei @jyijyi Surprisingly I managed to get GPIO, MUX and CAN to work on version 16 (I also tried on the board!), But I still have a problem: when I run these apps the Legato Hierarchy View disappears and this problem occurs (also if on the board all works):

Do you think this could be a dependancies problem? If nothing else, by doing so, I’m limited to adding and removing apps from my Legato, so I don’t have full control over my project. But the good thing is that it even works on the latest version of Legato !!! :grin:

Hei @jyijyi I think I solved the problem. CAN drivers start correctly also on the latest legato version, BUT they have to be started before WiFi (I don’t know why) I can run all on FW16. the only problem I have left is the fact that when I generate the CAN drivers in the FW16, even if they work on the board, the dependency tree on VSCode disappears and therefore it becomes difficult to work. I will try to do the same. Thanks for the support

hi,
need a calrification i have downloaded the SWI version as wp76-4.7.0 but when i query the legto version it showning response as

root@swi-mdm9x28-wp:~# legato version
19.11.2_72a30ed2ee7f18d8029917647e529c3c

when i query the leaf version its Legato 20.04.0
│ Included │ swi-vscode-support_200624 │ VS Code features support for legacy SDKs │
│ swi-wp76_4.7.0 │ SDK for WP76 (Release 13.3 + Legato 20.04.0) │

why the legato versions are different

Did you download the fw image of wp76-4.7.0 to module?

yes i installed to the module

Then it means you did not install successfully.

let know the steps to install or any reference

one more this in which legato version wifi is present inbuild in interface, baz in legato version 19.11.2 i was not able to provide bining for wifi services

you can scp this file to module and use “fwupdate download xxx.spk” to upgrade FW:

/home/owner/leaf/leaf-data/swi-wp76_4.7.0/wp76-image/9999999_9907152_SWI9X07Y_02.28.03.05_00_GENERIC_002.073_000-full.spk