arjun.a
range data
5aefcf4
raw
history blame
No virus
12.4 kB
Ticket Name: RTOS/TDA2: TDA2xx rvp: network_tx usecase
Query Text:
Part Number: TDA2 Tool/software: TI-RTOS Hello, I am running standard network use case using RVP TDA2X board. Following command of the network use case are working: ./network_ctrl.out --ipaddr 192.168.1.201 --port 5000 --cmd echo "HELLO WORLD 1" => able to see print on console of RVP TDA2X ./network_ctrl.out --ipaddr 192.168.1.201 --port 5000 --cmd sys_reset => board resets Problem: Receive data and display: Target RVP TDA2X side: IPU1-0] Select use-case, [IPU1-0] ---------------- [IPU1-0] 1: Network RX + Display ... [IPU1-1] 2941.901390 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023 [IPU1-1] 2941.901512 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 655360 B (640 KB), Free size = 643296 B (628 KB) [HOST ] 2940.339870 s: ===RxLink_tsk.c tskMain:1518 cmd:0 [HOST ] 2940.343012 s: NETWORK_RX: NETWORK_RX: Server listening (port=29171) !!! [HOST ] 2940.343134 s: IPC_OUT_0 : Create in progress !!! [HOST ] 2940.343195 s: IPC_OUT_0 : Create Done !!! [HOST ] 2941.901909 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023 [HOST ] 2941.901939 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 6291456 B (6144 KB), Free size = 6257664 B (6111 KB) [HOST ] 2942.024431 s: ===RxLink_tsk.c tskRun:1398 cmd:4 [HOST ] 2942.034435 s: ===RxLink_drv.c drvFillData:456 state:1 On Host side tool command: ./network_tx.out --host_ip 192.168.1.101 --target_ip 192.168.1.201 --port 29171 --usetfdtp --verbose --files /c/prj/videos/tulips_yuv420_inter_planar_qcif.yuv Target shows [HOST ] 3547.180229 s: NETWORK_RX: NETWORK_RX: Connected to client (port=29171) !!! On the host, the command is looping, On Target there is not display. I analyzed the code with the debug prints and found that : links_fw/src/rtos/utils_common/src/network_api.c 73 Int32 Network_read(Network_SockObj *pObj, UInt8 *dataBuf, UInt32 *dataSize) 74 { 75 Int32 status = NETWORK_SUCCESS // without semicolon, here error reported. 76 77 #if (( defined(NDK_PROC_TO_USE_IPU1_0) && defined(BUILD_M4_0) ) || \ 78 ( defined(NDK_PROC_TO_USE_IPU1_1) && defined(BUILD_M4_1) ) || \ 79 ( defined(NDK_PROC_TO_USE_IPU2) && defined(BUILD_M4_2) ) || \ 80 ( defined(NDK_PROC_TO_USE_A15_0) && defined(BUILD_A15) )) 81 82 UInt32 tmpDataSize // without semicolon, there is not error reported. Not sure why control is not going inside this block?, is this expected, if not how to fix it. Showconfig show " NDK_PROC_TO_USE=a15_0", attached showconfig output file 83 Int32 actDataSize = 0; 84 85 tmpDataSize = *dataSize; 86 87 while(tmpDataSize > 0U) 88 { 95 Vps_printf("===network_api.c Network_read:%d datasize:%d buf:0x%x\n", 96 __LINE__, tmpdataSize, dataBuf); // This print is not getting printed. 97 98 actDataSize = recv(pObj->connectedSockFd, (void *)dataBuf, tmpDataSize, 0) 99 100 Vps_printf("===network_api.c Network_read:%d datasize:%d buf:0x%x actDataSize:%d \n", 114} 116 #endif 117 118 return status; 119 } Please support in executing the "[IPU1-0] 1: Network RX + Display", let me know if further details required. Regards, KK 7848.showconfig.txt #
# Build Config is [ tda2xx_rvp_bios_all ]
# Build Config file is @ C:/rvp/vsdk33rvp/vision_sdk/configs/tda2xx_rvp_bios_all/cfg.mk
# Build Config .h file is @ C:/rvp/vsdk33rvp/vision_sdk/links_fw/include/config/apps/tda2xx_rvp_bios_all/system_cfg.h
# Build CPUs is @ ipu1_0 ipu1_1 ipu2 a15_0 dsp1 dsp2 eve1 eve2 eve3 eve4
#
# CPUs included in application,
# PROC_IPU1_0_INCLUDE=yes
# PROC_IPU1_1_INCLUDE=yes
# PROC_IPU2_INCLUDE=yes
# PROC_DSP1_INCLUDE=yes
# PROC_DSP2_INCLUDE=yes
# PROC_EVE1_INCLUDE=yes
# PROC_EVE2_INCLUDE=yes
# PROC_EVE3_INCLUDE=yes
# PROC_EVE4_INCLUDE=yes
# PROC_A15_0_INCLUDE=yes
#
# Platform config,
# VSDK_BOARD_TYPE=TDA2XX_RVP [options: TDA2XX_EVM TDA2EX_EVM TDA3XX_EVM TDA3XX_RVP TDA2XX_RVP]
# PLATFORM=tda2xx-rvp
# DUAL_A15_SMP_BIOS=no
# DDR_MEM=DDR_MEM_1024M [options: DDR_MEM_128M DDR_MEM_512M DDR_MEM_1024M]
# NDK_PROC_TO_USE=a15_0 [options: a15_0 ipu1_0 ipu1_1 ipu2 none]
# NSP_TFDTP_INCLUDE=no [options: yes no]
# TDA2EX_ETHSRV_BOARD=no [options: yes no]
# FATFS_PROC_TO_USE=ipu1_0 [options: ipu1_0 none]
# RADAR_BOARD=none [options: TDA3XX_AR12_ALPS TDA3XX_AR12_VIB_DAB_BOOSTER TDA3XX_RADAR_RVP none]
#
# Build config,
# BUILD_OS=Windows_NT [options: Windows_NT Linux]
# BUILD_DEPENDENCY_ALWAYS=no
# BUILD_ALGORITHMS=no
# BUILD_INFOADAS=no
# PROFILE=release [options: debug release]
# KW_BUILD=no
# CPLUSPLUS_BUILD=no
# IPU_PRIMARY_CORE=ipu1_0 [options: ipu1_0 ipu2]
# IPU_SECONDARY_CORE=ipu2 [options: ipu1_0 ipu2]
# A15_TARGET_OS=Bios [options: Bios Linux Qnx]
# BSP_STW_PACKAGE_SELECT=all [options: all vps-iss-dss-only vps-vip-vpe]
#
# Safety Module config,
# RTI_INCLUDE=no
# ECC_FFI_INCLUDE=no
# DCC_ESM_INCLUDE=no
#
# Video Module config,
# IVAHD_INCLUDE=yes
# VPE_INCLUDE=yes
# CAL_INCLUDE=no
# ISS_INCLUDE=no
# ISS_ENABLE_DEBUG_TAPS=no
# WDR_LDC_INCLUDE=no
# DSS_INCLUDE=yes
#
# Open Compute config,
# OPENCL_INCLUDE=no
# TARGET_ROOTDIR=C:/rvp/vsdk33rvp/vision_sdk/apps/src/rtos/opencl
# ENABLE_OPENCV=no
# ENABLE_OPENCV_TESTS=no
# OPENVX_INCLUDE=no
#
# Log config,
# ENABLE_UART_LOG=yes
# ENABLE_NETWORK_LOG=no
# ENABLE_CCS_LOG=no
# CIO_REDIRECT=no
#
# IPC config,
# WORKQ_INCLUDE=no
# IPC_LIB_INCLUDE=no
#
# Surround View config,
# SRV_FAST_BOOT_INCLUDE=no
#
# Other Module config,
# AVB_INCLUDE=no
# DCAN_INCLUDE=yes
# RADAR_INCLUDE=no
# CPU_IDLE_ENABLED=yes
# FAST_BOOT_INCLUDE=no
# DATA_VIS_INCLUDE=no
# HS_DEVICE=no
# ULTRASONIC_INCLUDE=no
#
# Linux config,
# DEFAULT_UBOOT_CONFIG=dra7xx_evm_vision_config
# DEFAULT_KERNEL_CONFIG=ti_sdk_dra7x_release_defconfig
# DEFAULT_DTB=dra7-evm-infoadas.dtb
# CMEM_INCLUDE=no
# IPUMM_INCLUDE=no
# IPU1_EVELOADER_INCLUDE=no
# ROBUST_RVC_INCLUDE=no
# BUILD_ADAM_CAR=no
#
# Alg plugins included in build,
# ALG_autocalibration ALG_dmaSwMs ALG_vpeSwMs ALG_surroundview
#
# Use-cases included in build,
# UC_srv_calibration UC_lvds_vip_single_cam_view UC_lvds_vip_multi_cam_view UC_lvds_vip_8_cam_view UC_lvds_vip_sv_standalone UC_network_rx_tx UC_saveDisFrame
#
#
# CPUs that are NOT required but included in config [ tda2xx_rvp_bios_all ],
#
# WARNING: IPU1_1 can be excluded from application
# WARNING: IPU2 can be excluded from application
# WARNING: DSP2 can be excluded from application
# WARNING: EVE1 can be excluded from application
# WARNING: EVE2 can be excluded from application
# WARNING: EVE3 can be excluded from application
# WARNING: EVE4 can be excluded from application
#
# CPUs that are required but not included in config [ tda2xx_rvp_bios_all ],
#
#
# Edit C:/rvp/vsdk33rvp/vision_sdk/build/configs/tda2xx_rvp_bios_all/cfg.mk to include or exclude CPUs in an application
#
Responses:
Hi KK, In config TFDTP is disabled ( # NSP_TFDTP_INCLUDE=no [options: yes no]) Could you please run your command without --usetfdtp ./network_tx.out --host_ip 192.168.1.101 --target_ip 192.168.1.201 --port 29171 --verbose --files /c/prj/videos/tulips_yuv420_inter_planar_qcif.yuv If you want to use TFDTP, build with # NDK_PROC_TO_USE=ipu1_1 [options: a15_0 ipu1_0 ipu1_1 ipu2 none] # NSP_TFDTP_INCLUDE=yes[options: yes no] & then run the command with --usetfdtp Regards Surya
Hello Krishnakumar, Can you please let me know SDK version you have? Also as mentioned in the original post, the network stack on RVP is not tested on the BIOS. Only Linux network stack is supported. I will confirm if it added in the latest release. e2e.ti.com/.../2534985
Thanks Surya, information provided was helpful, Secondly, I observed the Host tool souce code, i.e: apps/tools/network_tools/network_tx/src/network_tx_main.c 106 int ReadBytes(NetworkRx_CmdHeader *pHeader) 107 { 108 int chId = pHeader->chNum; 109 int bytesRead; 110 111 read_again: 112 bytesRead = fread(gNetworkTx_obj.dataBuf, 1, pHeader->dataSize, gNetworkTx_obj.fd[chId]); 113 if(bytesRead != pHeader->dataSize) // this check 114 { 115 133 goto read_again; 134 } It waits till the requierd bytes are received. I found that in my case, the bytesRead=228096, but the needed HeadDataSize=1382400, Thus not sending data to Target device. After providing YUV file of greater than 1382400 bytes, the network streaming is working okay. But the picture is not seen correctly. 1. Which format do we need to stream? (YUV420, RGB, Grayscale, etc) 2. What are the command parameters for Encoded data tx and rx Thanks for the support, Regards, KK
Hello Prasad, We received the RVP BIOS version from the D3 development team and it is assumed that the network is working with the BIOS. Regards, KK
Hello KK, Thanks for confirming vsdk version. About the number of bytes issue - you need to configure the image height, width and data format types in the use-case main.c file. Currently in the default use-case, these are set to below in vision_sdk\apps\src\rtos\usecases\network_rx_tx\chains_networkRxDisplay.c, in function chains_networkRxDisplay_SetNetworkRxPrm. pObj->captureOutWidth = NETWORK_RX_FRAME_WIDTH; pObj->captureOutHeight = NETWORK_RX_FRAME_HEIGHT; pChInfo->flags = System_Link_Ch_Info_Set_Flag_Data_Format(pChInfo->flags, SYSTEM_DF_YUV420SP_UV); pChInfo->flags = System_Link_Ch_Info_Set_Flag_Scan_Format(pChInfo->flags, SYSTEM_SF_PROGRESSIVE); pChInfo->flags = System_Link_Ch_Info_Set_Flag_Buf_Type(pChInfo->flags, SYSTEM_BUFFER_TYPE_VIDEO_FRAME); Please change these parameters to match your input file.
Hello Prasad, Thank for the inforamtion on Width and heigh and the flag data, we will experiment. For now, we did the following: First, receive data from TI board: Step-1: Target side: Selected option: [IPU1-0] 3: 1CH VIP Capture + Network TX Step-2: Host side: executed the command to receive data: $ ./network_rx.out --host_ip 192.168.1.101 --target_ip 192.168.1.201 --port 29172 --verbose --files ./test_file.yuv Second, transmit same data to the TI board: Step-1: Target side: Selected option: [IPU1-0] 1: Network RX + Display Step-2: Host side: exectued the command to transmit data. $ ./network_tx.out --host_ip 192.168.1.101 --target_ip 192.168.1.201 --port 29171 --verbose --files ./test_file.yuv With this able to see the captured data on Target display output. #1. Could you provide document or info, where we can read aboutthe different Data_Format (SYSTEM_DF_YUV420SP_UV, etc) and Scan_Format (SYSTEM_SF_PROGRESSIVE, etc) #2. Is TFDTP mandatory of the MJPEG streaming? Regards, KK
Hello Prasad, We are able to 1. Receive mjpeg data from TI board and play it on VLC and 2. Transmit same mjpeg data to TI baord and display via TI HDMI output. We can close this ticket. Thanks, KK For sake of other members, looking for similar solution: MJPEG, Compressed format: First: Capture from TI board. Step-1: Target side: Select option: [IPU1-0] 4: 1CH VIP Capture + Encode + Network TX (TDA2x ONLY) Step-2: Host side: exceute command to receive data $ ./network_rx.out --host_ip 192.168.1.101 --target_ip 192.168.1.201 --port 29172 --verbose --files rx-enc-02.mjpeg Second: Stream the same file from Host to TI Board. Step-1: Target side: Select option: [IPU1-0] 2: Network RX + Decode + Display (TDA2x ONLY) Step-2: Host side: execute the command to transmit the captured data. $ ./network_tx.out --host_ip 192.168.1.101 --target_ip 192.168.1.201 --port 29171 --verbose --files ./rx-enc-02.mjpeg Third: Play the captured data using VLC Step-1: GUI: Opening the file from VLC application is show one frame an then seems like stopped. Step-2: Command line: Execution from the command is working: /c/installsw/VideoLAN/VLC/vlc.exe --mjpeg-fps=29 bin/rx-enc-02.mjpeg Note: --mjpeg-fps=28 or above will provide smooth video outout. If not specified the video seems still.
Hello KK, Glad your issue is resolved. If possible you can share use-case parameters for both Rx & Tx to help other members. Thanks.
Hello Prasad, With the information provided by you on the macros, we found: network_rx_tx/chains_networkRxDisplay.c:70:#define NETWORK_RX_FRAME_WIDTH (1280) network_rx_tx/chains_networkRxDisplay.c:71:#define NETWORK_RX_FRAME_HEIGHT ( 720) "./test_file.yuv" captured without Decoder, with parameters of W:1280 and Heigh:720. To play with VLC we can use command line as: $ /c/installsw/VideoLAN/VLC/vlc.exe --rawvid-fps 12 --rawvid-width 1280 --rawvid-height 720 --rawvid-chroma I420 bin/test_file.yuv [02f67d24] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. Thanks for the support, Regards, KK