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

latest code(9610792) no video on RPI Window #22

Open
lida2003 opened this issue Jan 23, 2023 · 35 comments
Open

latest code(9610792) no video on RPI Window #22

lida2003 opened this issue Jan 23, 2023 · 35 comments

Comments

@lida2003
Copy link
Contributor

lida2003 commented Jan 23, 2023

latest code(9610792)+ ESP_IDF 4.3 beta 1 + AI Thinker Module (2MB PSRAM)==> build OK
latest code(9610792)+ RPI 3B+ minor OPENGL 2.0 and on wlan1 for TxRx ==> build OK

no video on RPI Window, all black. It seems that ESP32 didn't send any data packet out. Any idea about this?

图片

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4
load:0x3fff0034,len:6220
load:0x40078000,len:15076
load:0x40080400,len:4316
0x40080400: _init at ??:?

entry 0x40080674
I (29) boot: ESP-IDF v4.3-beta1 2nd stage bootloader
I (29) boot: compile time 14:47:29
I (29) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (42) qio_mode: Enabling default flash chip QIO
E (45) qio_mode: Failed to set QIE bit, not enabling QIO mode
I (51) boot.esp32: SPI Speed      : 80MHz
I (56) boot.esp32: SPI Mode       : DIO
I (60) boot.esp32: SPI Flash Size : 4MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label            Usage          Type ST Offset   Length
I (81) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (89) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (96) boot:  2 factory          factory app      00 00 00010000 00100000
I (104) boot: End of partition table
I (108) boot_comm: chip revision: 3, min. application chip revision: 0
I (115) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=14094h ( 82068) map
I (149) esp_image: segment 1: paddr=000240bc vaddr=3ffb0000 size=03b70h ( 15216) load
I (155) esp_image: segment 2: paddr=00027c34 vaddr=40080000 size=00404h (  1028) load
I (155) esp_image: segment 3: paddr=00028040 vaddr=40080404 size=07fd8h ( 32728) load
I (175) esp_image: segment 4: paddr=00030020 vaddr=400d0020 size=73454h (472148) map
I (322) esp_image: segment 5: paddr=000a347c vaddr=400883dc size=146ech ( 83692) load
I (368) boot: Loaded app from partition at offset 0x10000
I (368) boot: Disabling RNG early entropy source...
I (379) psram: This chip is ESP32-D0WD
I (380) spiram: Found 16MBit SPI RAM device
I (380) spiram: SPI RAM mode: flash 80m sram 80m
I (385) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (392) cpu_start: Pro cpu up.
I (396) cpu_start: Starting app cpu, entry point is 0x40081340
0x40081340: call_start_cpu1 at /home/daniel/Work/esp-sdk/esp-idf-v4.3-beta1/components/esp_system/port/cpu_start.c:143

I (0) cpu_start: App cpu up.
I (653) spiram: SPI SRAM memory test OK
I (661) cpu_start: Pro cpu start user code
I (661) cpu_start: cpu freq: 240000000
I (661) cpu_start: Application information:
I (664) cpu_start: Project name:     air_firmware
I (669) cpu_start: App version:      47ba7e7-dirty
I (675) cpu_start: Compile time:     Jan 23 2023 14:47:18
I (681) cpu_start: ELF file SHA256:  017c16ca42493aa1...
I (687) cpu_start: ESP-IDF:          v4.3-beta1
I (692) heap_init: Initializing. RAM available for dynamic allocation:
I (699) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (705) heap_init: At 3FFB8000 len 00028000 (160 KiB): DRAM
I (712) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (718) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (724) heap_init: At 4009CAC8 len 00003538 (13 KiB): IRAM
I (731) spiram: Adding pool of 2048K of external SPI memory to heap allocator
I (739) spi_flash: detected chip: gd
I (743) spi_flash: flash io: qio
I (748) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
Initializing...
MEMORY at start:
Heap summary for capabilities 0x00000004:
  At 0x3f800000 len 2097151 free 2094999 allocated 0 min_free 2094999
    largest_free_block 1048576 alloc_blocks 0 free_blocks 1 total_blocks 1
  At 0x3ffae6e0 len 6432 free 156 allocated 4124 min_free 156
    largest_free_block 0 alloc_blocks 38 free_blocks 0 total_blocks 38
  At 0x3ffb8000 len 163840 free 132404 allocated 29284 min_free 131436
    largest_free_block 131072 alloc_blocks 25 free_blocks 2 total_blocks 27
  At 0x3ffe0440 len 15072 free 12920 allocated 0 min_free 12920
    largest_free_block 8192 alloc_blocks 0 free_blocks 1 total_blocks 1
  At 0x3ffe4350 len 113840 free 111688 allocated 0 min_free 111688
    largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
  Totals:
    free 2352167 allocated 33408 min_free 2351199 largest_free_block 1048576
I (955) gpio: GPIO[33]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
MEMORY after fec:
Heap summary for capabilities 0x00000004:
  At 0x3f800000 len 2097151 free 2029463 allocated 65536 min_free 2029463
    largest_free_block 1048576 alloc_blocks 256 free_blocks 1 total_blocks 257
  At 0x3ffae6e0 len 6432 free 156 allocated 4124 min_free 156
    largest_free_block 0 alloc_blocks 38 free_blocks 0 total_blocks 38
  At 0x3ffb8000 len 163840 free 42548 allocated 119140 min_free 42548
    largest_free_block 32768 alloc_blocks 72 free_blocks 1 total_blocks 73
  At 0x3ffe0440 len 15072 free 12920 allocated 0 min_free 12920
    largest_free_block 8192 alloc_blocks 0 free_blocks 1 total_blocks 1
  At 0x3ffe4350 len 113840 free 111688 allocated 0 min_free 111688
    largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
  Totals:
    free 2196775 allocated 188800 min_free 2196775 largest_free_block 1048576
I (1030) wifi_init: tcpip mbox: 32
I (1033) wifi_init: udp mbox: 6
I (1037) wifi_init: tcp mbox: 6
I (1041) wifi_init: tcp tx win: 5744
I (1045) wifi_init: tcp rx win: 5744
I (1049) wifi_init: tcp mss: 1440
I (1053) wifi_init: WiFi IRAM OP enabled
I (1058) wifi_init: WiFi RX IRAM OP enabled
I (1063) wifi_init: WiFi SLP IRAM OP enabled
MEMORY After WIFI:
Heap summary for capabilities 0x00000004:
  At 0x3f800000 len 2097151 free 2029463 allocated 65536 min_free 2029463
    largest_free_block 1048576 alloc_blocks 256 free_blocks 1 total_blocks 257
  At 0x3ffae6e0 len 6432 free 156 allocated 4124 min_free 156
    largest_free_block 0 alloc_blocks 38 free_blocks 0 total_blocks 38
  At 0x3ffb8000 len 163840 free 38516 allocated 123172 min_free 38444
    largest_free_block 32768 alloc_blocks 79 free_blocks 2 total_blocks 81
  At 0x3ffe0440 len 15072 free 12920 allocated 0 min_free 12920
    largest_free_block 8192 alloc_blocks 0 free_blocks 1 total_blocks 1
  At 0x3ffe4350 len 113840 free 111688 allocated 0 min_free 111688
    largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
  Totals:
    free 2192743 allocated 192832 min_free 2192671 largest_free_block 1048576
Initialized
I (1145) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1154) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1163) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1173) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1182) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1191) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1201) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1210) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1219) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1229) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1238) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1248) sccb: pin_sda 26 pin_scl 27

I (1253) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1506) camera: Detected OV2640 camera
I (1507) camera: Line width (for DMA): 6400 bytes
I (1507) camera: DMA buffer size: 3200, DMA buffers per line: 2
I (1511) camera: DMA buffer count: 8
I (1515) camera: DMA buffer total: 25600 bytes
I (1520) camera: Allocating DMA buffer #0, size=3200
I (1526) camera: Allocating DMA buffer #1, size=3200
I (1532) camera: Allocating DMA buffer #2, size=3200
I (1537) camera: Allocating DMA buffer #3, size=3200
I (1543) camera: Allocating DMA buffer #4, size=3200
I (1549) camera: Allocating DMA buffer #5, size=3200
I (1554) camera: Allocating DMA buffer #6, size=3200
I (1560) camera: Allocating DMA buffer #7, size=3200
MEMORY Before Loop:
Heap summary for capabilities 0x00000004:
  At 0x3f800000 len 2097151 free 2029463 allocated 65536 min_free 2029463
    largest_free_block 1048576 alloc_blocks 256 free_blocks 1 total_blocks 257
  At 0x3ffae6e0 len 6432 free 156 allocated 4124 min_free 156
    largest_free_block 0 alloc_blocks 38 free_blocks 0 total_blocks 38
  At 0x3ffb8000 len 163840 free 1120 allocated 160568 min_free 1108
    largest_free_block 256 alloc_blocks 113 free_blocks 3 total_blocks 116
  At 0x3ffe0440 len 15072 free 632 allocated 12288 min_free 632
    largest_free_block 512 alloc_blocks 2 free_blocks 1 total_blocks 3
  At 0x3ffe4350 len 113840 free 111688 allocated 0 min_free 111688
    largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
  Totals:
    free 2143059 allocated 242516 min_free 2143047 largest_free_block 1048576
WLAN S: 0, R: 0, E: 196, D: 0, % : 2 || FPS: 2, D: 191855 || D: 0, E: 0
WLAN S: 0, R: 0, E: 3331, D: 0, % : 0 || FPS: 40, D: 3202853 || D: 0, E: 0
WLAN S: 0, R: 0, E: 2163, D: 0, % : 0 || FPS: 40, D: 2074085 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1980, D: 0, % : 0 || FPS: 40, D: 1895269 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1977, D: 0, % : 0 || FPS: 40, D: 1886976 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1973, D: 0, % : 2 || FPS: 40, D: 1885556 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1970, D: 0, % : 0 || FPS: 40, D: 1879612 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1974, D: 0, % : 0 || FPS: 39, D: 1883401 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1972, D: 0, % : 0 || FPS: 40, D: 1879624 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1973, D: 0, % : 0 || FPS: 40, D: 1879807 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1966, D: 0, % : 0 || FPS: 40, D: 1872319 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1965, D: 0, % : 0 || FPS: 40, D: 1869919 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1970, D: 0, % : 0 || FPS: 39, D: 1874858 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1969, D: 0, % : 0 || FPS: 40, D: 1873980 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1964, D: 0, % : 0 || FPS: 40, D: 1869010 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1960, D: 0, % : 0 || FPS: 40, D: 1864735 || D: 0, E: 0
WLAN S: 0, R: 0, E: 1949, D: 0, % : 0 || FPS: 39, D: 1859572 || D: 0, E: 0

GS log

$ sudo -E DISPLAY=:0 ./gs
(I) src/PI_HAL.cpp: 125: Initializing pigpio
(I) src/PI_HAL.cpp: 283: Drivers: 4
(I) src/PI_HAL.cpp: 286: Driver 0: x11
(I) src/PI_HAL.cpp: 286: Driver 1: wayland
(I) src/PI_HAL.cpp: 286: Driver 2: RPI
(I) src/PI_HAL.cpp: 286: Driver 3: dummy
(I) src/PI_HAL.cpp: 295: Mode 0: 1280x720
(I) src/Comms.cpp: 718: Radiocap header size: 11, IEEE header size: 24
(I) src/Comms.cpp: 581: Opening interface wlan1 in monitor mode
(I) src/Comms.cpp: 282: DLT_IEEE802_11_RADIO Encap
(I) src/Video_Decoder.cpp: 160: SDL window: 19615824
(I) src/Video_Decoder.cpp: 160: SDL window: 19615824
(I) src/Video_Decoder.cpp: 160: SDL window: 19615824
(I) src/Video_Decoder.cpp: 160: SDL window: 19615824
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0

WLAN1 channel is 11, which is the same as esp32. And tcpdump, there is data monitored.

$ sudo iwlist wlan1 channel
wlan1     13 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Current Frequency:2.462 GHz (Channel 11)
$ sudo tcpdump -i wlan1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan1, link-type IEEE802_11_RADIO (802.11 plus radiotap header), capture size 262144 bytes
15:22:38.691693 2541643608us tsft 1.0 Mb/s 2462 MHz 11b -80dBm signal antenna 0 Beacon (floor 1) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.709409 2541661947us tsft 1.0 Mb/s 2462 MHz 11b -84dBm signal antenna 0 Beacon (ChinaNet-v2JP) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 13, PRIVACY
15:22:38.713555 2541665472us tsft 1.0 Mb/s 2462 MHz 11b -76dBm signal antenna 0 Beacon (ChinaNet-5MGg) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.721623 2541675706us tsft 6.0 Mb/s 2462 MHz 11g -75dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.728075 2541679512us tsft 1.0 Mb/s 2462 MHz 11b -80dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.747875 2541699642us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11
15:22:38.756944 2541708343us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (Qch001) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.791406 2541743178us tsft 1.0 Mb/s 2462 MHz 11b -68dBm signal antenna 0 Beacon (201) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.820293 2541772212us tsft 1.0 Mb/s 2462 MHz 11b -76dBm signal antenna 0 Beacon (ChinaNet-5MGg) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.823272 2541774912us tsft 1.0 Mb/s 2462 MHz 11b -80dBm signal antenna 0 Beacon (Suzuki) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.859365 2541810746us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (Qch001) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.902208 2541854135us tsft 1.0 Mb/s 2462 MHz 11b -80dBm signal antenna 0 Beacon (floor 1) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.914196 2541866741us tsft 1.0 Mb/s 2462 MHz 11b -82dBm signal antenna 0 Beacon (ChinaNet-v2JP) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 13, PRIVACY
15:22:38.926427 2541880513us tsft 6.0 Mb/s 2462 MHz 11g -76dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11, PRIVACY
15:22:38.996435 2541948358us tsft 1.0 Mb/s 2462 MHz 11b -84dBm signal antenna 0 Beacon (floor 1) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.005062 2541957299us tsft 1.0 Mb/s 2462 MHz 11b -42dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.020661 2541972578us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (ChinaNet-5MGg) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.022960 2541975281us tsft 1.0 Mb/s 2462 MHz 11b -84dBm signal antenna 0 Beacon (ChinaNet-Sagy) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.043833 2541996065us tsft 1.0 Mb/s 2462 MHz 11b -44dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.046977 2541998771us tsft 1.0 Mb/s 2462 MHz 11b -80dBm signal antenna 0 Probe Response (AutoLab) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.078085 2542030322us tsft 1.0 Mb/s 2462 MHz 11b -44dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.086695 2542038940us tsft 1.0 Mb/s 2462 MHz 11b -42dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.089178 2542041423us tsft 1.0 Mb/s 2462 MHz 11b -46dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.100275 2542052518us tsft 1.0 Mb/s 2462 MHz 11b -46dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.102850 2542055080us tsft 1.0 Mb/s 2462 MHz 11b -42dBm signal antenna 0 Probe Response (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 6, PRIVACY
15:22:39.111415 2542062406us tsft 1.0 Mb/s 2462 MHz 11b -68dBm signal antenna 0 Probe Response (201) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] CH: 11, PRIVACY
15:22:39.117168 2542070875us tsft 1.0 Mb/s 2462 MHz 11b -48dBm signal antenna 0 Probe Request () [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
15:22:39.118423 2542072177us tsft 1.0 Mb/s 2462 MHz 11b -76dBm signal antenna 0 Data IV:ff65 Pad 20 KeyID 2
15:22:39.135954 2542087872us tsft 1.0 Mb/s 2462 MHz 11b -76dBm signal antenna 0 Beacon (ChinaNet-5MGg) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.142066 2542094292us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (CMCC-pf4h) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 9, PRIVACY
15:22:39.148839 2542100270us tsft 1.0 Mb/s 2462 MHz 11b -74dBm signal antenna 0 Probe Response (ChinaNet-5MGg) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] CH: 11, PRIVACY
15:22:39.149133 2542103433us tsft 1.0 Mb/s 2462 MHz 11b -48dBm signal antenna 0 Acknowledgment RA:24:7e:51:98:eb:40 (oui Unknown)
15:22:39.150365 2542104086us tsft 1.0 Mb/s 2462 MHz 11b -54dBm signal antenna 0 Probe Request () [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
15:22:39.158854 2542110593us tsft 1.0 Mb/s 2462 MHz 11b -76dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11
15:22:39.166534 2542117923us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (Qch001) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.182186 2542133951us tsft 1.0 Mb/s 2462 MHz 11b -84dBm signal antenna 0 Beacon (301) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.200996 2542152757us tsft 1.0 Mb/s 2462 MHz 11b -68dBm signal antenna 0 Beacon (201) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.239988 2542191423us tsft 1.0 Mb/s 2462 MHz 11b -80dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.259881 2542211637us tsft 1.0 Mb/s 2462 MHz 11b -74dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11
15:22:39.262823 2542216557us tsft 1.0 Mb/s 2462 MHz 11b -52dBm signal antenna 0 Probe Request () [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
15:22:39.268944 2542220329us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (Qch001) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.284569 2542236341us tsft 1.0 Mb/s 2462 MHz 11b -82dBm signal antenna 0 Beacon (301) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.303396 2542255170us tsft 1.0 Mb/s 2462 MHz 11b -68dBm signal antenna 0 Beacon (201) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.320627 2542273234us tsft 1.0 Mb/s 2462 MHz 11b -44dBm signal antenna 0 Beacon (AutoConnect) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 6, PRIVACY
15:22:39.336028 2542290106us tsft 6.0 Mb/s 2462 MHz 11g -74dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.362288 2542314036us tsft 1.0 Mb/s 2462 MHz 11b -76dBm signal antenna 0 Beacon () [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 11
15:22:39.371368 2542322741us tsft 1.0 Mb/s 2462 MHz 11b -72dBm signal antenna 0 Beacon (Qch001) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.386981 2542338745us tsft 1.0 Mb/s 2462 MHz 11b -84dBm signal antenna 0 Beacon (301) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
15:22:39.431089 2542382991us tsft 1.0 Mb/s 2462 MHz 11b -74dBm signal antenna 0 Beacon (ChinaNet-5MGg) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY

@lida2003
Copy link
Contributor Author

two wifi cards, still nothing.

$ sudo -E DISPLAY=:0 ./gs
(I) src/PI_HAL.cpp: 125: Initializing pigpio
(I) src/PI_HAL.cpp: 283: Drivers: 4
(I) src/PI_HAL.cpp: 286: Driver 0: x11
(I) src/PI_HAL.cpp: 286: Driver 1: wayland
(I) src/PI_HAL.cpp: 286: Driver 2: RPI
(I) src/PI_HAL.cpp: 286: Driver 3: dummy
(I) src/PI_HAL.cpp: 295: Mode 0: 1280x720
(I) src/Comms.cpp: 718: Radiocap header size: 11, IEEE header size: 24
(I) src/Comms.cpp: 581: Opening interface wlan1 in monitor mode
(I) src/Comms.cpp: 282: DLT_IEEE802_11_RADIO Encap
(I) src/Comms.cpp: 581: Opening interface wlan2 in monitor mode
(I) src/Comms.cpp: 282: DLT_IEEE802_11_RADIO Encap
(I) src/Video_Decoder.cpp: 160: SDL window: 28891200
(I) src/Video_Decoder.cpp: 160: SDL window: 28891200
(I) src/Video_Decoder.cpp: 160: SDL window: 28891200
(I) src/Video_Decoder.cpp: 160: SDL window: 28891200
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0

@lida2003
Copy link
Contributor Author

lida2003 commented Jan 24, 2023

Really strange thing.

  1. No video string
  2. Camera received gs, but gs can receive streaming video intermittently
  3. Just run for a little bit long time, gs received no packet any more......

图片
图片
图片

@lida2003
Copy link
Contributor Author

lida2003 commented Jan 24, 2023

Much more stable with 4.3 (56ee43ec5ea813809fc1a9da1cc644559b4ea975) still no video.

$ git log -n 1
commit 56ee43ec5ea813809fc1a9da1cc644559b4ea975 (HEAD, origin/release/v4.3)
Merge: 0d48889e81 b44da528db
Author: Jiang Jiang Jian <[email protected]>
Date:   Tue Jan 17 19:56:03 2023 +0800

    Merge branch 'bugfix/sta_add_config_for_wpa3_transition_disable_v4.3' into 'release/v4.3'

    esp_wifi:Add wifi station config for enabling transition_disbale feature

    See merge request espressif/esp-idf!21332

图片

NOT stable with 4.4 (9ee3c8337d3c4f7914f62527e7f7c78d7167be95 ) still no video.

commit 9ee3c8337d3c4f7914f62527e7f7c78d7167be95 (HEAD -> release/v4.4, origin/release/v4.4)
Merge: 221df10ced a744595440
Author: Jiang Jiang Jian <[email protected]>
Date:   Fri Dec 23 10:39:38 2022 +0800

    Merge branch 'bugfix/avoid_ftm_initiator_mode_on_softap_v4.4' into 'release/v4.4'

    Avoid ftm initiator mode on softap (Backport v4.4)

    See merge request espressif/esp-idf!21757

图片

@lida2003
Copy link
Contributor Author

OK, might be RF signal issue.

Just focused on black screen issue. Any idea?

$ sudo -E DISPLAY=:0 ./gs
(I) src/PI_HAL.cpp: 125: Initializing pigpio
(I) src/PI_HAL.cpp: 283: Drivers: 4
(I) src/PI_HAL.cpp: 286: Driver 0: x11
(I) src/PI_HAL.cpp: 286: Driver 1: wayland
(I) src/PI_HAL.cpp: 286: Driver 2: RPI
(I) src/PI_HAL.cpp: 286: Driver 3: dummy
(I) src/PI_HAL.cpp: 295: Mode 0: 1280x720
(I) src/Comms.cpp: 718: Radiocap header size: 11, IEEE header size: 24
(I) src/Comms.cpp: 581: Opening interface wlan1 in monitor mode
(I) src/Comms.cpp: 282: DLT_IEEE802_11_RADIO Encap
(I) src/Video_Decoder.cpp: 160: SDL window: 16305032
(I) src/Video_Decoder.cpp: 160: SDL window: 16305032
(I) src/Video_Decoder.cpp: 160: SDL window: 16305032
(I) src/Video_Decoder.cpp: 160: SDL window: 16305032
(I) src/main.cpp: 104: RX len: 1470, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 7350, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 2940, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 2940, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 2940, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 1470, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 5880, RSSI: -49, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 0, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 5880, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 7350, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 2940, RSSI: -49, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 1470, RSSI: 0, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 8820, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 1470, RSSI: -50, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 214620, RSSI: -46, Latency: 87/87/87
(I) src/Video_Decoder.cpp: 333: Texture: 2
(I) src/Video_Decoder.cpp: 333: Texture: 3
(I) src/Video_Decoder.cpp: 333: Texture: 4
(E) src/Video_Decoder.cpp: 349: GL error 1280 in glBindBuffer(GL_PIXEL_UNPACK_BUFFER, output.pbo)file src/Video_Decoder.cpp line 349
(E) src/Video_Decoder.cpp: 362: GL error 1280 in glBufferData(GL_PIXEL_UNPACK_BUFFER, pbo_size, nullptr, GL_STREAM_DRAW)file src/Video_Decod                            er.cpp line 362
(E) src/Video_Decoder.cpp: 386: GL error 1280 in glBindTexture(GL_TEXTURE_2D, output.textures[i])file src/Video_Decoder.cpp line 386
(E) src/Video_Decoder.cpp: 389: GL error 1281 in glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, (void*)of                            fset)file src/Video_Decoder.cpp line 389
(E) src/Video_Decoder.cpp: 389: GL error 1281 in glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, (void*)of                            fset)file src/Video_Decoder.cpp line 389
(E) src/Video_Decoder.cpp: 389: GL error 1281 in glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, (void*)of                            fset)file src/Video_Decoder.cpp line 389
(E) src/Video_Decoder.cpp: 395: GL error 1280 in glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)file src/Video_Decoder.cpp line 395
(I) src/main.cpp: 104: RX len: 637980, RSSI: -47, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 627690, RSSI: -46, Latency: 0/0/0
(I) src/main.cpp: 104: RX len: 186690, RSSI: -49, Latency: 15/15/15
(I) src/main.cpp: 104: RX len: 8820, RSSI: -50, Latency: 49/49/49
(I) src/main.cpp: 104: RX len: 4410, RSSI: -49, Latency: 2/124/63
(I) src/main.cpp: 104: RX len: 2940, RSSI: -50, Latency: 2/2/2
(I) src/main.cpp: 104: RX len: 4410, RSSI: 0, Latency: 148/183/166
(I) src/main.cpp: 104: RX len: 10290, RSSI: -50, Latency: 10/38/24
(I) src/main.cpp: 104: RX len: 1470, RSSI: -50, Latency: 170/170/170
(I) src/main.cpp: 104: RX len: 5880, RSSI: -50, Latency: 60/188/124

@lida2003
Copy link
Contributor Author

Does it have something to do with OpenGL ES version?

图片

@lida2003
Copy link
Contributor Author

lida2003 commented Jan 24, 2023

Tried my laptop(ubuntu) , still no video.

图片

Why there is no latency first? runing for quite a long time, the latency shows.

图片

@whstudio123
Copy link
Contributor

whstudio123 commented Jan 31, 2023

I struggled with these codes all day and I have some new findings: When gl_flush() in PI_HAL.cpp is turned on, it can "work normally". Then I read the code of the official demo of imgui and our code line by line. Are there any bugs nearby? (Because I noticed there are some location differences with the official demo)
2023-01-31-225441_1920x1080_scrot
2023-01-31-225432_1920x1080_scrot
2023-01-31-225651_1920x1080_scrot

BTW:In order to facilitate debugging and modification, I changed it to window mode.The program can only transmit at very low resolution and frame rate.Anyone know why?I guess there is something about the maxrate of monitor mode of my card.Now with tcpdump,i can see esp32 sending,but all the rate is 1.0Mbps.(But according to our code , the rate is 54Mbps.)I also curious about how a 1.0Mbps card could recieve the 54Mbps packet?

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 1, 2023

The good news is that there is an image with glFlush(), although not 30 FPS at 800x600.

:)

session004_segment000.mp4

@whstudio123
Copy link
Contributor

Not bad.So....Do you have a try ? is there a wrong url you upload? I think you want to upload your screenshoot instead.hiahia
image

@whstudio123
Copy link
Contributor

whstudio123 commented Feb 1, 2023

And I found that the card type is soooo important. Because i setup two different cards in two computers and tcpdump them .One is RTL8812AU (TP-LINK T4U).The other is EDUP EP-N8508GS.
Suprisingly I found the EDUP EP-N8508GS captured well but T4U not.(Howerer T4U and RTL8812au cards are well known by OpenHD or ZE-BroardCast players.) EDUP EP-N8508GS only has low speed sniff and injection.Maybe thats why i can only achieved very very low frame rate.
It's quite strage that RTL8812AU works bad.The card only capture soooo little packages from esp32 but receive others' traffic well.I can makesure i have switched to monitoe mode and chosen the right channel.
Which card do you use ?Could you share some infos?

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 1, 2023

Not bad.So....Do you have a try ? is there a wrong url you upload? I think you want to upload your screenshoot instead.hiahia

Well, That's @jeanlemotan 's test video. I have the same video quality as you do.

@rottaran
Copy link

rottaran commented Feb 1, 2023

And I found that the card type is soooo important. Because i setup two different cards in two computers and tcpdump them .One is RTL8812AU (TP-LINK T4U).

You need to install a special driver for these RTL chipsets. For example https://github.com/morrownr/8812au or https://github.com/aircrack-ng/rtl8812au The in-kernel driver barely works.

@whstudio123
Copy link
Contributor

Actually,i do have installed a special driver.And i have some progress now .However it is not for this issue.I will open another issue if we wanna to share and interact.

@whstudio123
Copy link
Contributor

We need to back to the gl_flush() code and the window fresh process. Why could this magic happen?(I am a beginner to opengl and imgui.)

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 1, 2023

You need to install a special driver for these RTL chipsets

@rottaran @jeanlemotan

How about following wifi card?It has monitor mode, but I'm NOT sure if it'll casue performance issue?

08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)

Actually:

daniel@daniel-ThinkPad-SL410:~/Work/inav$ lspci |grep Realtek
08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)

$ lsmod |grep rtl
rtl8xxxu              151552  0
rtl8192cu             110592  0
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        81920  1 rtl8192cu
rtlwifi               114688  3 rtl8192c_common,rtl_usb,rtl8192cu
mac80211             1249280  5 iwldvm,rtl_usb,rtl8192cu,rtlwifi,rtl8xxxu
btrtl                  24576  1 btusb
bluetooth             688128  27 btrtl,btintel,btbcm,bnep,btusb,rfcomm
cfg80211              970752  5 iwldvm,rtlwifi,iwlwifi,mac80211,rtl8xxxu


$ dmesg |tail
[19061.302086] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[19061.302091] usb 2-2: Product: 802.11n WLAN Adapter
[19061.302096] usb 2-2: Manufacturer: Realtek
[19061.302100] usb 2-2: SerialNumber: 00e04c000001
[19061.302788] rtl8192cu: Chip version 0x10
[19061.379285] rtl8192cu: Board Type 0
[19061.379534] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[19061.379579] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[19061.379626] ieee80211 phy2: Selected rate control algorithm 'rtl_rc'
[19061.600418] rtl8192cu 2-2:1.0 wlx14cf920bea04: renamed from wlan0

@JulesThuillier
Copy link
Contributor

Hello !
I am having the same dirty video as you.... And the controls are unusable, can you guys move the sliders ?

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 1, 2023

And the controls are unusable, can you guys move the sliders ?

NO

@whstudio123
Copy link
Contributor

move

No, I can't move the slides either.

@whstudio123
Copy link
Contributor

whstudio123 commented Feb 1, 2023

New progress. Now i get about 10fps with low but affordable (for me) video.
The key is channel ,data rate and card.

First,tcpdump do shows the real data rate. That means when it shows 1.0Mbps .The packet is 1.0Mbps modulation. To get affordable video, you must increase data rate.( I increased them to 24Mbps) Must double check them.

Second,the maximum data rate do has a relationship with card type and driver. Make an experiment for example, my EDUP card can only allow 1.0Mbps monitor. So when i send 24Mbps packet , The card still shows other packets in 1.0Mbps and capture nothing of my 24Mbps packet.

Third,data rate is NOT higher is better because it maybe over the card maximum monitor rate.I make another experiment to explain this. My t4u card could receive 54Mbps esp32 packets but it drops some packets.When it comes to 24Mbps ,it works well.And i learned from a paper that monitor speed is almost all quite low . Card above 20Mbps is a quite good card for monitor.( If anyone find some cards which have a super fast injection rate (above 30Mbit data per second ) pls tell me.)

The rate adjustment API in air_firmware may have bugs. I change IDF version , write something hardcoded and successfully adjust rate( can be really seen and dump in 24Mbps).

Things get better step by step. I will post some procedures after I entirely figure out the api .:)

@JulesThuillier
Copy link
Contributor

I am going to work on those issues today, can you share some of your progress ? (especially where you changed the data rate in the air firmware).

@whstudio123
Copy link
Contributor

I am going to work on those issues today, can you share some of your progress ? (especially where you changed the data rate in the air firmware).

I will make an detail experiment about the api in two hours, double check and post the result.

@whstudio123
Copy link
Contributor

The experiment comes.I use IDF-4.4.3.

use internal API:
6ecbe4ef162f317321da02cfe7305db

The result:
image

use esp_wifi_config_80211_tx_rate() API:
b87d693e607980506719d4ef65c0705

The result:
image
(Pay attention to the raw data , we could also see the JFIF header which means jpeg.haha~)
ATTENTION! Version matters!
I checked ESP32 API doc version by version and find that we could officially adjust the rate of 802.11 injection only when using IDF-4.4.2 or newer.
IDF-4.4.2 and above says:
https://docs.espressif.com/projects/esp-idf/en/v4.4.2/esp32/api-guides/wifi.html#wi-fi-80211-packet-send
image

IDF-4.4.1 and below says:
https://docs.espressif.com/projects/esp-idf/en/v4.4.1/esp32/api-guides/wifi.html#wi-fi-80211-packet-send
7af13bcf43fc601e6207900c7742ed4

I also find something in ESP-FAQ about the internal api:
https://docs.espressif.com/projects/espressif-esp-faq/zh_CN/latest/software-framework/wifi.html
f1f7f84a6d44daa8818e925ad5a9866

So, Maybe ESP-FAQ is a little bit of confusing."To set and fix the Wi-Fi sending rate" may only just about "wifi"(we normally heared from) but not 802.11 raw packet.
No matter what the ESP-FAQ says,just following the API doc and using the official API to adjust 802.11 rate without a problem.
I will make a PR and note we should use at least IDF-4.4.2 version.

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 2, 2023

at least IDF-4.4.2 version

Hummm.... @jeanlemotan 's video use esp-idf-v4.3-beta1. It seems IDF version depends.

Anyway, it has been made a great progress :)

@whstudio123
Copy link
Contributor

whstudio123 commented Feb 2, 2023

at least IDF-4.4.2 version

Hummm.... @jeanlemotan 's video use esp-idf-v4.3-beta1. It seems IDF version depends.

Anyway, it has been made a great progress :)

Yes.In todays' v4.3.1 doc ,rate adjustment is officially not support.
I also do the experiment in IDF-4.3.2 which is close enough to jeanlemotan's version.
I have two esp32-cam . One flash internal API+ IDF-4.3.2 ,the other flash esp_wifi_config_80211_tx_rate() + IDF-4.4.3.
The result is the internal api cannot adjust the rate in IDF-4.3.2. It even loss a lot of packets in tcpdump. And the chip get crazy hot (sucks more than 500mA)
However,when using esp_wifi_config_80211_tx_rate() + IDF-4.4.3, only sucks about 250mA and packet works well.
So ,as it is not working at all for me . Just forget about the internal api , move to higher idf ,follow the API doc and use the official API to adjust 802.11 rate without a problem.

@whstudio123
Copy link
Contributor

Install a lot of IDF this week 😃
mmexport1675346917112.png

@rottaran
Copy link

rottaran commented Feb 2, 2023

whstudio123, can you try esp_wifi_config_80211_tx_rate(ESP_WIFI_IF, true, WIFI_PHY_RATE_MCS0_LGI)? This is index 14 in the rates array. My suspicion is, that it does not, unless you set the channel bandwidth correctly:

ESP_ERROR_CHECK(esp_wifi_set_bandwidth(ESP_WIFI_IF, WIFI_BW_HT20));
ESP_ERROR_CHECK(esp_wifi_set_channel(11, WIFI_SECOND_CHAN_NONE));

My memory might be wrong. I thought that the bitrate was adjusted automatically. But I could not find the code in main.cpp.

@whstudio123
Copy link
Contributor

All right,i will try it now.
I write some ideas on your "esp32_bridge_broadcast" repo.Could you plz have a look?

@whstudio123
Copy link
Contributor

whstudio123 commented Feb 2, 2023

Just change 10 to 14 and other code are stayed the same.
image

IMG_20230202_223727.jpg

@rottaran
Copy link

rottaran commented Feb 2, 2023

interesting. It seems to work without changes then. Still don't understand why it did not work in my own software. maybe there is a hidden firmware difference between ESP32 and ESP32-S3 too

@whstudio123
Copy link
Contributor

Maybe.I am using ESP32.

@whstudio123
Copy link
Contributor

move

No, I can't move the slides either.

New progress.Only one line change in PI_HAL.cpp could let us use mouse:
image

@jeanlemotan
Copy link
Owner

Finally I managed to get some free time and compile the GS & Air firmware and test.
I used initially the IDF 5.0, but I got some compile errors in the camera component, and after reading the migration document I decided to go back to 4.X. I think it will take some serious work to port the camera component to 5.0 since they changed the low level drivers and ATM I don't see any advantage.
So back to IDF 4.4.4
The air firmware worked but only sent a few seconds of data, after which it stopped sending. It till received fine, but no video was sent. Then I remember that I spend a significant amount of time to tweak the sdkconfig to free as much memory as possible and speed up the drivers by placing callbacks in IRAM etc, so after 2h of tweaking and testing, I got the air config to send continuously. The new sdkconfig is committed now.

As for the GS, I didn't get anything rendered except for the imgui window borders. I tested in X11 and there is clearly an issue with the rendering, but I'll have to debug tomorrow more.

It should be trivial to fix though.

@whstudio123
Copy link
Contributor

Finally I managed to get some free time and compile the GS & Air firmware and test. I used initially the IDF 5.0, but I got some compile errors in the camera component, and after reading the migration document I decided to go back to 4.X. I think it will take some serious work to port the camera component to 5.0 since they changed the low level drivers and ATM I don't see any advantage. So back to IDF 4.4.4 The air firmware worked but only sent a few seconds of data, after which it stopped sending. It till received fine, but no video was sent. Then I remember that I spend a significant amount of time to tweak the sdkconfig to free as much memory as possible and speed up the drivers by placing callbacks in IRAM etc, so after 2h of tweaking and testing, I got the air config to send continuously. The new sdkconfig is committed now.

As for the GS, I didn't get anything rendered except for the imgui window borders. I tested in X11 and there is clearly an issue with the rendering, but I'll have to debug tomorrow more.

It should be trivial to fix though.

Yes.DO NOT DEL the sdkconfg !!!! There are serval settings especially about IRAM and wifi stacks.

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 6, 2023

Yes.DO NOT DEL the sdkconfg !!!! There are serval settings especially about IRAM and wifi stacks.

Actually, I didn't find anything special between sdkconfig(auto generated) and git version.

If this project is truely sensitvie to some default settings, please try "sdkconfig.defaults"

@jeanlemotan
Copy link
Owner

My bad, I messed up the initial commit. Fixed in 29fd749

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

5 participants