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.

TDA4VM: Failed to send message from R5F(MCU2_0) to A72 using remote_service

Part Number: TDA4VM


Hi

We can successfully send messages to R5F on A72,but cannot send message from R5F to A72 using remote_service.

My test method is as follows:

1)A72

We develop two apps on A72, send app and rec app.

Send app is used to actively send messages to remote_service named CSP_REMOTE_SERVICE_NAME_A72_TO_R5F registered on R5F.

Rec app is used to registers remote_service named CSP_REMOTE_SERVICE_NAME_R5F_TO_A72 at A72 and receive messages sent by R5F.

2)R5F

On the R5F side, the remote_service named CSP_REMOTE_SERVICE_NAME_A72_TO_R5F is registered to receive messages sent by A72.

If R5F receive messages by remote_service named CSP_REMOTE_SERVICE_NAME_A72_TO_R5F, immediately send a message to A72 through the remote_service named CSP_REMOTE_SERVICE_NAME_R5F_TO_A72 .

If rec app receives the message by remote_service named CSP_REMOTE_SERVICE_NAME_R5F_TO_A72 , it means that R5F actively sends a message to A72. This remote channel is available.

But after testing, the message sent by send app can be received at R5F , but the message sent by R5F cannot be received at rec app.

When R5F sends a message to A72, the following message will be prompted:

[  328.069853] virtio_rpmsg_bus virtio4: msg received with no recipient

I have attached the source code of the two apps and the code added at R5F.

Please TI experts give me some advices. Thanks!

ipc-test.zip

  • Hi,

    I think remote services are disabled in the Linux application, can you try enable macro APP_ENABLE_REMOTE_SERVICE_RECEIVE_TASK in the file ti-processor-sdk-rtos-j721e-evm-08_00_00_12\vision_apps\utils\remote_service\src\app_remote_service_linux.c? 

    Regards,

    Brijesh

  • Hi

    According to your suggestion, I will prompt the following error message after the rec app runs:

    failed to open eptdev /dev/rpmsg18
    REMOTE_SERVICE: ERROR: Count not start Remote Server

    kernel log:

    [ 416.612947] rpmsg_chrdev virtio3.rpmsg_chrdev.-1.21: idr_alloc failed: -28
    [ 416.619834] rpmsg rpmsg5: failed to open rpmsg-char-2-1195
    [ 498.519605] rpmsg_chrdev virtio0.rpmsg_chrdev.-1.21: idr_alloc failed: -28
    [ 498.526494] rpmsg rpmsg18: failed to open rpmsg-char-6-1206

    I found the msg code at SDK_ROTS\vision_apps\utils\remote_service\src\app_remote_service_linux.c.

    #ifdef APP_ENABLE_REMOTE_SERVICE_RECEIVE_TASK
        if(status==0)
        {
            uint32_t i;
    
            for(i=0; i<APP_IPC_CPU_MAX; i++)
            {
                if(appIpcIsCpuEnabled(i) && i != appIpcGetSelfCpuId())
                {
                    uint32_t host_port_id = prm->rpmsg_rx_endpt;
    
                    obj->rx_fds[i] = appIpcCreateTxCh(i, prm->rpmsg_rx_endpt, &host_port_id, &obj->rcdev[i]);
    
                    obj->rx_local_endpt[i] = host_port_id;
    
                    if (obj->rx_fds[i] < 0)
                    {
                        printf ("REMOTE_SERVICE: ERROR: Count not start Remote Server \n");
                        status = -1;
                        break;
                    }
    				printf ("[HIRAIN]REMOTE_SERVICE: Start Remote Server \n");
                }
            }
    
            if (status == 0)
            {
                status = appRemoteServiceCreateRpmsgRxTask(obj);
                if(status!=0)
                {
                    printf("REMOTE_SERVICE: ERROR: appRemoteServiceCreateRpmsgRxTask failed !!!\n");
                }
            }
            else
            {
                /* Server will not run, but it is ok */
                status = 0;
            }
        }
    #endif

  • Hi hao luo,

    I am checking with our team why remote service is not getting enabled. I am suspecting that it might already be enabled by some other module.., but let me check and confirm..

    Regards,

    Brijesh

  • Hi hao luo,

    We currently dont have plan for implementing this new feature. I would suggest using other mechanism like IPC to talk to A72 from R5F.

    Regards,

    Brijesh

  • Hi Brijesh Jadav,

    OK, so would you please give me some more references or details?

    Thanks

  • Hi hao luo,

    One other way is to use IPC. You could send dummy message from A72 to R5F to notify the port and then R5F can use this port to send the message..  But again this is a notify, the framework around it to send complete message is not available, so needs to be implemented.

    Regards,

    Brijesh