Ssh tunnel : permission denied

Thanks, that seemed to work other than producing a few warning messages. There’s a lot of output now in ~/.leaf/wp76-legato_20.04.0-202004151904/build/wp76xx including a .update file but I’m not clear what the purpose of all these files is. I’m assuming to update Legato now we just install the .update file but just wanted to confirm that first, that it’s not the legato.cwe file or something else for example?

Also the OP said he “followed instruction to build legato and update my board” - I can’t find this documented anywhere other than in the KConfig section there’s something about configuring Legato but it doesn’t seem to describe the whole process. Is this documented somewhere else? To complete the Legato customizing process now do we just need to install the .update file produced by make wp76xx?

Thanks.

you should install the legato.cwe

in case you just need the application .update file, you don’t need to do “make wp76xx”, you can use VSCODE to build your application, the binary output will be .update file.

The solution that worked for Kumikomi doesn’t work for us for some reason. So we tried completely disabling SMACK using the menuConfig tool, and with it disabled we lose all internet connectivity. Even pinging doesn’t work. We can establish a cell connection (using cm data connect) so that’s not the issue. Any reason why disabling SMACK would have this effect?

How did you modify for Kumikomi’s solution?

how about adding the script in one of these admin application and rebuild the legato.cwe:

root@swi-mdm9x28-wp:~# grep “admin w” /legato/smack/load2
app.secStore admin w
app.powerMgr admin w
app.dataConnectionService admin w
app.avcService admin w

We modified the file leafWorkspace/leaf-data/current/wp76-legato/framework/daemons/linux/supervisor/app.c adding our application name to the frameworkAppList char* array, then added it as an additional if condition in the section immediately below along with the admin apps. Then rebuilt legato using “make clean” and “make clean wp76xx” from the leaf shell in the $LEGATO_ROOT directory. Then installed the resulting legato.cwe produced in the leafWorkspace/leaf-data/current/wp76-legato/build directory using fwupdate.

The update process seems to work because after this change had no effect, we tried the same process after disabling SMACK using menuConfig and there was indeed a LEGATO_DISABLED file produced in the /legato directory as there’s supposed to be.

Regarding adding a script, what we are trying to do is establish a reverse ssh tunnel directly from our c program using system() (which sounds like more or less the same thing the OP was trying to do, which they got to work apparently).

what did you see on this command after modifying the legato cwe?

root@swi-mdm9x28-wp:~# cat  /legato/smack/load | grep "admin w"
app.secStore admin w
app.powerMgr admin w
app.avcService admin w