Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp-host-fg RTSP failed #545

Open
3 tasks done
zsy118 opened this issue Nov 21, 2024 · 19 comments
Open
3 tasks done

esp-host-fg RTSP failed #545

zsy118 opened this issue Nov 21, 2024 · 19 comments

Comments

@zsy118
Copy link

zsy118 commented Nov 21, 2024

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

The host linux nt98566 connects to the ESP32c6 through the main sdio, and the esp32c6 is used as the wifi soc. When testing the RTSP push stream, the pull stream through the vlc fails. It is ok for us to use 8189wifi rtsp for the same machine. So the problem is with the esp32c6 wifi

Actual behavior (suspected bug)

1732154277748
1732154510972
1f0eddb36b478a657df68036bcb9a68
0e364594608c4c45e0dc66fd02a3917

Error logs or terminal output

No response

Steps to reproduce the behavior

command

Project release version

esp_host_fg

System architecture

other (details in Additional context)

Operating system

Linux

Operating system version

linux kernel4.19.91

Shell

sh

Additional context

No response

@mantriyogesh
Copy link
Collaborator

Can you please state the procedure to reproduce?

Also please attach the logs from both sides in text format.

Esp: idf.py monitor or minicom
Host: 1. dmesg from system bootup
2. Commands fired

So in general, the connectivity is established and able to test throughput but fail on the streaming test?

@zsy118
Copy link
Author

zsy118 commented Nov 21, 2024

dmesg:hd_common_init
process id 0 _isf_init 0
venc init: config tile cut if w>1280 (LL slow)
csi_platform_clk_enable....
csi_open:CSI HW reset!
vdoprc0 init: stripe LV1 = cut w>1280, GDC = on, 2D_LUT off after cut (LL slow)
vprc: enable one-buf func at path 0, (3ndr_ref=1) (max_strp=3)
WRN:_isf_vdoprc_oport_do_new() vdoprc0.out[0]! Start single blk mode => blk_id=8 5fe6fc0 addr=85fe7000
WRN:_isf_vdoprc_oport_do_new() vdoprc0.out[0]! Start single blk mode-2 => blk_id =8652dfc0 addr=8652e000
========== AE_CBMSG_PREVIEWSTABLE ==========
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)
SDIO1 nvt_mmc_abort_data R sts 0x452 (CMD53)

esp32 log:dx(0, stop:8)), snr:79, ampduState:wait operational
I (113260) wifi:ifidx:0, rssi:-14, nf:-93, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:144, he:0, vht:0, ht:1
I (113270) wifi:(ht)max.RxAMPDULenExponent:3(65535 bytes), MMSS:5(4 us)
I (113346) wifi:connected with MyWifi, aid = 1, channel 5, BW20, bssid = e4:67:1 e:1e:e5:00
I (113347) wifi:security: WPA2-PSK, phy:11bgn, rssi:-14, cipher(pairwise:0x3, gr oup:0x3), pmf:0,
I (113352) wifi:pm start, type: 1, twt_start:0

I (113356) wifi:pm start, type:1, aid:0x1, trans-BSSID:e4:67:1e:1e:e5:00, BSSID[ 5]:0x0, mbssid(max-indicator:0, index:0), he:0
I (113368) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us t o 307200 us
I (113376) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 1 0, mt_time: 10000
I (113384) wifi:[ADDBA]TX addba request, tid:0, dialogtoken:1, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x0)
I (113395) wifi:[ADDBA]TX addba request, tid:7, dialogtoken:2, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x20)
I (113406) wifi:[ADDBA]TX addba request, tid:5, dialogtoken:3, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x0)
I (113418) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (113424) slave_ctrl: Manual Wi-Fi connected, no event raised
I (113430) slave_ctrl: connected to ap SSID:'MyWifi', password:'MyWifiPass@123'
I (113430) wifi:[ADDBA]RX addba response, status:0, tid:0/tb:1(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
I (113447) wifi:[ADDBA]RX addba response, status:0, tid:7/tb:1(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
I (113456) wifi:[ADDBA]RX addba response, status:0, tid:5/tb:1(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
I (113466) slave_ctrl: req_connect_ap_handler:653 Set resp to Success
I (162441) slave_ctrl: Stop Heatbeat
I (162442) slave_ctrl: Stopping HB timer
W (181480) wifi:idx:0, ifx:0, tid:0, TAHI:0x10000e5, TALO:0x1e1e67e4, (s sn:2, win:64, cur_ssn:2), CONF:0xc0000005
I (254436) wifi:[ADDBA]TX addba request, tid:6, dialogtoken:4, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x0)
I (254449) wifi:[ADDBA]RX addba response, status:0, tid:6/tb:0(0xa1), bufsize:64 , batimeout:0, txa_wnd:64

@mantriyogesh
Copy link
Collaborator

I will wait for rest of the ilogs.

@zsy118
Copy link
Author

zsy118 commented Nov 21, 2024

▒?▒!▒V▒▒ I (59514) NETWORK_ADAPTER: Start Data Path
I (59806) NETWORK_ADAPTER: Initial set up done
I (59806) slave_ctrl: event ESPInit
I (59807) main_task: Returned from app_main()
I (110434) slave_ctrl: HB timer started for 20 sec

I (110495) wifi:mode : sta (40:4c:ca:55:bc:14)
I (110495) wifi:enable tsf
I (110495) slave_ctrl: station mode set
I (110496) slave_ctrl: Get station mac address
I (110500) slave_ctrl: mac [40:4c:ca:55:bc:14]
W (110505) wifi:Password length matches WPA2 standards, authmode threshold chang es from OPEN to WPA2
I (113217) wifi:new:<5,0>, old:<1,0>, ap:<255,255>, sta:<5,0>, prof:1, snd_ch_cf g:0x0
I (113218) wifi:(connect)dot11_authmode:0x3, pairwise_cipher:0x3, group_cipher:0 x3
I (113221) wifi:state: init -> auth (0xb0)
I (113228) wifi:state: auth -> assoc (0x0)
I (113235) wifi:state: assoc -> run (0x10)
I (113235) wifi:(trc)phytype:CBW20-SGI, snr:79, maxRate:144, highestRateIdx:0
W (113240) wifi:(trc)band:2G, phymode:3, highestRateIdx:0, lowestRateIdx:11, dat aSchedTableSize:14
I (113248) wifi:(trc)band:2G, rate(S-MCS7, rateIdx:0), ampdu(rate:S-MCS7, schedI dx(0, stop:8)), snr:79, ampduState:wait operational
I (113260) wifi:ifidx:0, rssi:-14, nf:-93, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:144, he:0, vht:0, ht:1
I (113270) wifi:(ht)max.RxAMPDULenExponent:3(65535 bytes), MMSS:5(4 us)
I (113346) wifi:connected with MyWifi, aid = 1, channel 5, BW20, bssid = e4:67:1 e:1e:e5:00
I (113347) wifi:security: WPA2-PSK, phy:11bgn, rssi:-14, cipher(pairwise:0x3, gr oup:0x3), pmf:0,
I (113352) wifi:pm start, type: 1, twt_start:0

I (113356) wifi:pm start, type:1, aid:0x1, trans-BSSID:e4:67:1e:1e:e5:00, BSSID[ 5]:0x0, mbssid(max-indicator:0, index:0), he:0
I (113368) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us t o 307200 us
I (113376) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 1 0, mt_time: 10000
I (113384) wifi:[ADDBA]TX addba request, tid:0, dialogtoken:1, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x0)
I (113395) wifi:[ADDBA]TX addba request, tid:7, dialogtoken:2, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x20)
I (113406) wifi:[ADDBA]TX addba request, tid:5, dialogtoken:3, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x0)
I (113418) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (113424) slave_ctrl: Manual Wi-Fi connected, no event raised
I (113430) slave_ctrl: connected to ap SSID:'MyWifi', password:'MyWifiPass@123'
I (113430) wifi:[ADDBA]RX addba response, status:0, tid:0/tb:1(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
I (113447) wifi:[ADDBA]RX addba response, status:0, tid:7/tb:1(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
I (113456) wifi:[ADDBA]RX addba response, status:0, tid:5/tb:1(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
I (113466) slave_ctrl: req_connect_ap_handler:653 Set resp to Success
I (162441) slave_ctrl: Stop Heatbeat
I (162442) slave_ctrl: Stopping HB timer
W (181480) wifi:idx:0, ifx:0, tid:0, TAHI:0x10000e5, TALO:0x1e1e67e4, (s sn:2, win:64, cur_ssn:2), CONF:0xc0000005
I (254436) wifi:[ADDBA]TX addba request, tid:6, dialogtoken:4, bufsize:64, A-MSD U:0(not supported), policy:1(IMR), ssn:0(0x0)
I (254449) wifi:[ADDBA]RX addba response, status:0, tid:6/tb:0(0xa1), bufsize:64 , batimeout:0, txa_wnd:64
rtsp-tcp.zip

@zsy118
Copy link
Author

zsy118 commented Nov 21, 2024

Test video
e91cd81bb36471411824c74b03092b27.zip

@mantriyogesh
Copy link
Collaborator

Video is completely blurr, cannot make out anything apart from vlc trying something.
Can you send the steps to reproduce?

Also you have attached pcap capture. Can you please help to point to the observations or conclusions you have?
Packet number you see the problem, the ip address, who is who, etc

@mantriyogesh
Copy link
Collaborator

There are only esp side logs attached. no host side logs attached.

Please attach as text file:

  1. The procedure steps you have run, along with their outputs on terminal
  2. dmesg from system bootup, till issue is observed

What is exact issue? From esp logs, it doesn't show any issue. So I fail to understand where exactly the problem is.

From pcap I suppose you are able to set up tcp connection.
Is the video started and then stopped, or it is not at all starting?
Is the problem of networking or some crash has happened at host or kernel panic or something else?

@zsy118
Copy link
Author

zsy118 commented Nov 21, 2024

Network ok, host ok. I did a comparison test with the 8189 network card and the esp32c6. esp32c6 network speed problem found
esp32c6,
0e364594608c4c45e0dc66fd02a3917
8189fs
1732164742403

@mantriyogesh
Copy link
Collaborator

So, is it only speed? Or you face some disconnection?

@zsy118
Copy link
Author

zsy118 commented Nov 21, 2024

TCP communication test: Ubuntu (192.168.0.103) as client,
arm linux used 8189 (192.168.0.100) and arm linux used esp32c6 (192.168.0.102) as servers for comparison testing

@mantriyogesh
Copy link
Collaborator

We have some fixes done on https://gitlab.espressif.cn:6688/app-frameworks/esp_hosted_mcu (for microprocessors) to bump the throughput, but they are not synced to Linux repo yet. I can change and get back on this by end of week.

Also please note the 8089 is esp32 based processor with SDIO.
For fair comparison, I think better to use esp32 as SDIO with ESP-Hosted-FG.

Notable differences: ESP32 is dual-core , 240MHz. C6 is single code, 160MHz processor.

@jinhe1314
Copy link

hi mantriyogesh.
I'm a colleague of zsy118,I don't think it's a throughput issue, the bandwidth is sufficient from the ipref test.In the pcap file to see the re-transmission of too much, not yet much data is transmitted on the stream cut off.

@mantriyogesh
Copy link
Collaborator

Oh I see.

@jinhe1314 , are the tcp retransmissions only happening with RTSP / vlc or also observed with pure iperf as well?

@jinhe1314
Copy link

yes ,only RTSP

@mantriyogesh
Copy link
Collaborator

Okay, this is very interesting.

Obviously, the throughput is also concerning for me. but I understood that it is not a blocker for you right now. I will check this in lower priority than the RTSP..

Can you please state the reproducing steps, or some patch, which I can try to easily test on my side?
As it should be generic to try this test case, I will have better control if I reproduce it at my end.

@mantriyogesh
Copy link
Collaborator

Any steps please?

@mantriyogesh
Copy link
Collaborator

Hello @zsy118 , @jinhe1314 I have got the doc,
Build LIVE555 Streaming Media server.docx

to reproduce the steps.

We will reproduce this behaviour on Raspberry Pi and come back to this.

Just confirming before starting to debug this problem, if the issue is still experienced.

@mantriyogesh
Copy link
Collaborator

mantriyogesh commented Dec 4, 2024

Also, as per the feedback from internal support team, the issue was also getting reproduced on Raspberry Pi + hosted set-up at your side, if I am not wrong.

@jinhe1314
Copy link

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants