This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

stream msg_ctrl : continuous non stop messages received

Other Parts Discussed in Thread: DM388

Hi All

S/W: IPNC RDK Ver 3.8

Platform : DM388

In the IPNC RDK, there is a message  control thread which sends/receives  messages to/from sys_server. Whenever I make  some  changes in the GUI, the webserver  passes  these params  to msg_ctrl thread thru' web server & sys_server. My problem is, some times  I receive  continuous  non stopping  messages  in Msg_CTRl()  thread  in ipnc_mcfw/demos/mcfw_api_demos/stream/stream.c  file. I did  verify that  these  messages  are  not  originated  from sys_server. I am at loss   to find  from where  these  messages  are coming. This  causes  the  streaming  to stop.

The messages  are MSG_CMD_SET_IRIS, MSG_CMD_SET_IFRAME. I have added  few  PTZ commands. It is  working  normally. But, at times I have  problems  with these  messages  also, Especially when I  do  some stress  tests  on GUI.

Can  someone provide  some hints like  where  to check ?

Best Regards

JK

  • Hello,

    I will notify the IPNC team for help.

    BR

    Margarita

  • Hi,

    What changes do you make in the GUI?

    Do you add new messages?

    When you add new messages make sure to clean the sys info data in the nand:

    >cd /opt/ipnc

    >flash_eraseall /dev/mtd5

    regards,

    Anand

  • Hi Anand,

    I haven't  made  any changes  in the GUI. I have  ported  my SVC code  into Appro's PTZ  code  and  using  the  default GUI  to control the P/T/Z.

    There  is  no  issues  with AVC. No new messages  are added. I have  erased  the mtd5 partition, as you  suggested. But  still   the messages  are coming

    continuously.As I understand, these  messages  are  to be originated  from sys_server (which gets  message  from webserver <-- GUI). But I have  verified  no

    messages  are send  from GUI/Webserver/sys_server during the problem time. Msg_CTRL()  is  receiving  messages  continuously  as  in an infinite loop.

    Incidently, I have  seen  similar issue  with Box camera  also. But at that  time  I just  blocked  those commands. (MSG_CMD_SET_IRIS  and  force IDR cmds),

    though , I haven't  tried erasing /dev/mtd5.

    Best Regards

    JK

  • Hi,

    All the messages do not originate from the WEB gui alone there are some messages sent from the system server process also.
    Check if any of the SetIRIS() calls in the '..\ipnc_rdk\ipnc_app\sys_server\src\system_control.c' file is getting hit continuously.

    regards,
    Anand
  • Hi  Anand,

    The  SetIRIS()  is  called only once. It is not hitting  continuously.

    But I see, the msgsnd()  in the response section of Msg_CTRL()  is called  repeatedly  with the  same msgbuf.cmd  forever, causing the the problem, I suppose.

    See the  below code:

    if (msgbuf.Src != 0)

    {

    msgbuf.Des = msgbuf.Src;

    msgbuf.Src = MSG_TYPE_MSG1;

    msgsnd(qid,&msgbuf,sizeof(msgbuf)-sizeof(long),0);

    }

    I do not completely  understand this mechanism. Is  this  msgsnd()  is  received  in the msgrcv()  inside the while() loop of Msg_CTRL ?

    If so, where is the problem ?

    Best Regards

    JK

  • Hi,

    This code snippet sends the ack for the received message.After sending the ack it goes and waits for the next message.
    When you say you are getting the IRIS message continuously, can you print the value of 'msgbuf.Src' for the message received in the Msg_CTRL() handler?

    regards,
    Anand
  • Dear  Anand,

    msgbuf.Src = 1;  when the messages  are arriving  continuously.

    Best Regards

    JK

  • Hi,

    If 'msgbuf.Src = 1' for the incoming message in the Msg_CTRL() handler then it is originating from the ipnc_rdk binary itself.

    Pl. check if you are sending any message in the ipnc rdk process.

    This condition will get into infinite loop because you keep sending the ack back to the same message box.

    regards,

    Anand

  • Hi Anand,

    No  messages  are  send  in the ipnc_rdk process. There is  something wrong in the  sys_server itself. I noticed  that while  sending the  messages  from sys_server(ApproDrvMsg.c) itself, the msgbuf.Src =1, instead of the actual value. This  causes  msgbuf.Src = 1  in stream.c  and then  it falls in the infinite loop.

    Best Regards

    JK

  • Hi,

    The messages sent from the system server have source id = 7 (SYS_MSG_TYPE = MSG_TYPE_MSG7) and not 1.

    Can you point me to any of the messages sent in the 'ApproDrvMsg.c' file have source id = 1 (MSG_TYPE_MSG1)?

    regards,

    Anand

  • Hi  Anand,

    I could  find the  exact reason now. In the Init_StreamEnv()  function in stream_enc_ctrl.c, there is WaitStreamReady(). This was not returning the expected value , hence causing  ApproDrvExit()  with 7. So the  system server messages  are no more  sent properly. After commenting this, things  are  working  as  expected.

    Thanks  a lot  Anand. You clues  really  helped. Greatly appreciate it.

    Best regards

    JK

  • Hi,

    If your issue is resolved pl. mark the thread as 'Answered'.

    regards,
    Anand