You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Hi all,
I'm having 2 troubles regarding calling Data Model paths.
- I'm running my demon program on RDK OS, armv7 Broadcom based (Vantiva CGA437 box).
When calling dmcli I always get 102 error: "Ccsp msg bus internal error 102".
BUT, when I've compiled a small 'main' program with the same code, it works perfectly fine.
Here's the code:
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <errno.h>
#include <rbus.h>
int main(int argc, char *argv[])
{
int ret = -1;
FILE *pipe = NULL;
char buffer[256] =
Unknown macro: {0}
;
char cmd[] = "dmcli eRT getv Device.DeviceInfo.SerialNumber";
pipe = popen(cmd, "r");
if(NULL == pipe)
Unknown macro: { printf("Pipe is NULL. popen() failed. Error}
while (NULL != fgets(buffer, sizeof(buffer), pipe))
Unknown macro: { printf("buffer}
pclose(pipe);
return ret;
}
Also running "dmcli eRT getv Device.DeviceInfo.SerialNumber" through shell command or through system() will fail.
I've no clue about the implementation of dmcli, so I'm here for some help.
Should I call the dmcli in different manner? Is there something my demon does not correctly? - I have another problem trying to use librbus.
When I try to rbus_open(), the program immediately inflates in its VSZ by 18MB. That's way too much.
Here's the program:
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <rbus.h>
rbusHandle_t handle;
int main(int argc, char *argv[])
{
rbus_open(&handle, "mytest");
while (true) {
sleep(100);
}
}
The VSZ here 22100KB. Once I remove the rbus_open() it'll be 4684KB.
Please advice, is there any compilation that should be different? Some flags?