johnhastech - 2020-05-26

Hi there,

I am developing a file browser for an ifm display (CR1059). The display OS is embedded linux (yocto).

I have used the CAA file library with success, however, I can see there is a limitation when using this library. To open a file or directory you must enter the file path, but this is limited to 255 characters. Therefore it would only be possible to browse files and directories if the complete filepath is <= 255 characters.

Because of this, I have been trying a different method using the SysProcess library. When using PuTTY, it is possible to browse directories very easily using the following commands:

'cd /this/file/path' - Changes directory
'ls -l' - Lists files and folders with extended information
'cd ..' - Goes back one directory

This method enables almost limitless file browsing. My problem is that I can't seem to use these commands with the SysProcess library in my Codesys project. If I change the directory, no error occurs, however, when using the command 'pwd' to print the working directory I can see the command has not worked. I thought that perhaps this was because I hadn't logged in to the terminal as I would usually do with PuTTY, so I used the command below and entered the password on successful execution.

'su root'

When issuing the command 'whoami', it reports back that the active user is indeed 'root', but unfortunately the afore mentioned commands still don't work.

The CODESYSControl.cfg file in the device has SysProcess configured for all commands:

[SysProcess]
Command=AllowAll

My project info:

Device - ifm Electronic GmbH CR1059 5" display (https://www.ifm.com/gb/en/product/CR1059)
OS - Embedded Linux 4.14 (Yocto)
Codesys - SP15 Patch 1 
SysProcess - 3.5.7.0

If there is a better way to achieve this, I would be very grateful for ideas and solutions!

Best regards,

John