Hiya,
So there is the content of the project:
[ul]
[li]Here is the .c file:
COMPONENT_INIT
{
// Open the serial port.
int fd1 = open("/dev/ttyHSL1", O_RDWR|O_NONBLOCK);
LE_ERROR_IF(fd1 == -1, "HSL1 open failed with errno %d (%m)", errno);
}
[/li]
[li]And here is the .adef file:
executables:
rs232 ( "rs232.c" )
import:
[rw] "/dev/ttyHSL1" "/dev/"
processes:
envVars:
LE_LOG_LEVEL = DEBUG
run: (rs232)
[/li]
[li]And here is the output when I start the app
[quote]
13:55:33 INFO | supervisor[835]/supervisor T=main | proc.c StartProc() 849 | Starting process rs232 with pid 2539
13:55:33 INFO | supervisor[2539]/supervisor T=main | proc.c StartProc() 823 | Execing ‘rs232’
13:55:33 INFO | serviceDirectory[840]/serviceDirectory T=main | serviceDirectory.c DispatchClientToServer() 540 | Client (pid 2539) connected to server 844 for service (LogControlProtocol:LogClient).
13:55:33 DBUG | rs232[2539]/default T=main | _main.c main() 33 | == Log sessions registered. ==
13:55:33 DBUG | rs232[2539]/default T=main | _main.c main() 42 | == Starting Event Processing Loop ==
13:55:33 =ERR= | rs232[2539]/default T=main | rs232.c _default_Init_Function() 433 | HSL1 open failed with errno 13 (Permission denied)[/quote][/li][/ul]
The file ttyHSL1 is imported into the sandbox correctly
Here it is
[quote]root@swi-mdm9x15:/var/volatile/tmp/legato/sandboxes/RS232/dev# ls -al
drwx—r-x 2 root root 100 May 26 13:55 .
drwx-----x 7 root root 140 May 26 13:55 …
srw-rw-rw- 1 root root 0 Jan 1 1970 log
crw-rw-rw- 1 root root 1, 3 Jan 1 1970 null
crw-rw---- 1 root dialout 249, 1 Jan 1 1970 ttyHSL1[/quote]
Thanks for the help,
Regards