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.

Wireless network card always stop work after running the application

 

DVSDK 4.02

memmap: linux 55M+128M, cmem 34M, dsplink 39M (as the loadmodule-rc show), because the total memory is 256M, I allocate the last 128M to linux

 network card chip: rt3070

wireless card driver module: rt3070.ko

I use the default h264enc to encode the raw data and  use card to send with sendto(),at first it works fine ,but after some time(30~150s),the network card stop work.

The error of sendto()  is invalid argument.

Maybe the memory map is not suitable,or any other reason.Who can help me.

  • Hi Shilv,

    Is it a custom board? Could you provide more detailed log (using logcat command) from appearing the issue.

    What is the bitrate of the encoded h264 stream?

    BR

    Tsvetolin Shulev


  • I use ./encode > log.txt to store the application print message

    following is the message printed by kernel (out of the log.txt):

    ub 1-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
    usb 1-1: USB disconnect, address 2
    Bulk In Failed. Status=-108, BIIdx=0x1, BIRIdx=0x1, actual_length= 0x0
    #
    RTUSB_VendorRequest failed(-19),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x1000,pAd->Flags=0x30080102
    CMDTHREAD_RESET_BULK_IN: Cannot do bulk in because flags(0x30080102) on !
    ISPCTRL: <1>isp_buf_queue: queue 28 vb 0, mmu 00001000
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: <1>isp_wait: wait 0
    ISPCTRL: <1>isp_buf_process: finish 28 mmu 00001000
    ISPCTRL: HS_VS_IRQ
    ISPCTRL: CCDC_VD0_IRQ
    ISPCTRL:
    rtusb_disconnect: unregister usbnet usb-ehci-omap.0-1
    RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
    Retry count exhausted or device removed!!!
    Retry count exhausted or device removed!!!
    Retry count exhausted or device removed!!!
    Retry count exhausted or device removed!!!
    ERROR!!! RF read R1=0xC00676EC fail, i[100], k[0]
    Retry count exhausted or device removed!!!
    Retry count exhausted or device removed!!!
    Retry count exhausted or device removed!!!
    Retry count exhausted or device removed!!!
    ISPCTRL: <1>isp_buf_queue: queue 29 vb 1, mmu 00097000
    ISPCTRL: HS_VS_IRQ
    ISPCTRL: CCDC_VD1_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: HS_VS_IRQ
    ISPCTRL:
    ISPCTRL: <1>isp_wait: wait 0
    ISPCTRL: <1>isp_buf_process: finish 29 mmu 00097000
    ISPCTRL: HS_VS_IRQ
    ISPCTRL: CCDC_VD0_IRQ
    ISPCTRL:
    ISPH3A: H3A disabled
    ISPHIST: histogram disabled
    ov9640 ioctl_s_power set power santd
    board_omap3evm_camera ov9640_power_set in
    board_omap3evm_camera ov9640_power_set set power ostand by
    ov9640 ioctl_s_power set power off
    board_omap3evm_camera ov9640_power_set in
    board_omap3evm_camera ov9640_power_set set power off
    ISPCTRL: isp_put: old 1
    ISPCCDC: Saving context
    ISPHIST: Saving context
    ISPH3A: Saving context
    ISPCTRL: isp_put: new 0
    root@dm37x-evm:/usr/share/ti/dvsdk-demos# ---> RTMPFreeTxRxRingMemory
    <--- RTMPFreeTxRxRingMemory
    RTUSB disconnect successfully

    I think the bitrate of the encoded h264 stream is not the reason, because I have used the same send code and same card to send file on very high bitrate,the card works well.

    It is a board desinged by my lab members.

    Best Regards

    Shenshilv

  • Sometimes It will reprot the kernel panic. If I disabled the encode part in the code, just send some fixed data in a buffer,the card won't reprot the error.

    So I think it has relationship with the encoder. Maybe I set error parameter to the encoder.

    the VIDENC1_Params and VIDENC1_DynamicParams is as follow:

    {                                   /* VIDENC1_Params */
                sizeof(VIDENC1_Params),          /* size */
                XDM_DEFAULT,                            /* encodingPreset */
                IVIDEO_STORAGE,                      /* rateControlPreset */
                0,                                                      /* maxHeight (set at runtime) */  // 480
                VGA_WIDTH,                                 /* maxWidth */                  // 640
                30000,                                            /* maxFrameRate */
                4096000,                                        /* maxBitRate */
                XDM_BYTE,                                   /* dataEndianness */
                1,                                                     /* maxInterFrameInterval */
                XDM_YUV_422ILE,                      /* inputChromaFormat */ 
                IVIDEO_PROGRESSIVE,            /* inputContentType */
                XDM_CHROMA_NA                     /* reconChromaFormat */
            },
            {                                                   /* VIDENC1_DynamicParams */
                sizeof(IVIDENC1_DynamicParams), /* size */
                0,                                            /* inputHeight (set at runtime) */    // 480
                 VGA_WIDTH,                      /* inputWidth */                    //640
                30000,                                 /* refFrameRate */
                30000,                                 /* targetFrameRate */
                4000000,                             /* targetBitRate */
                30,                                         /* intraFrameInterval */ 
                XDM_ENCODE_AU,          /* generateHeader */
                0,                                           /* captureWidth */
                IVIDEO_NA_FRAME,          /* forceFrame */    
               1,                                             /* interFrameInterval */
               0                                               /* mbDataFlag */

    }

    The red parameter is which I am wondering:

     1.rateControlPreset ,this version encoder doesn't support IVIDEO_LOW_DELAY, which means CBR,I have to set IVIDEO_STORAGE(VBR),is it OK?

    2. The camera output framerate is 30fps,but I used while loop in my code, the input of encoder cannot reach 30fps. Can the value of framerate be 30fps?

    3.How to determine the value of bitrate?

    Need your help.

    BR

    Shenshilv

  • The problem of kernel hanging have been sloved by changing the kernel verion.

    But the problem of wireless USB NIC stopping working have not been sloved.

    I removed the capturing and sending part , and the application only has the H264 encoder, after running the encode application for 5~10min, " the network is unreachable"

    It shows that the running of encoder has an impact on USB wireless NIC.

    Who can help me ?

    BR 

    Shenshilv