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

bandwidth && tx power #21

Open
sysytwl opened this issue Jan 12, 2025 · 3 comments
Open

bandwidth && tx power #21

sysytwl opened this issue Jan 12, 2025 · 3 comments

Comments

@sysytwl
Copy link

sysytwl commented Jan 12, 2025

Hi:
I did a bit of research and find:

  1. TX power of ESP32 will drop when we increase the bandwidth. 11mbps would be the best option for my view. (20dbm, need to solve the low bandwidth problem)
  2. as they said on official web esp_wifi_set_promiscuous_rx_cb(packet_received_cb)will have huge impact on total through put as the CPU need to process every packet, instead of the driver (the filer is done by CPU).
    there is a function esp_err_t esp_wifi_internal_reg_rxcb(wifi_interface_t ifx, wifi_rxcb_t fn); which works for ESP32 MAC and 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF only. (guess: done by hardware, no test, It is used by esp ip layer)
/**
  * @brief     The WiFi RX callback function
  *
  *            Each time the WiFi need to forward the packets to high layer, the callback function will be called
  */
typedef esp_err_t (*wifi_rxcb_t)(void *buffer, uint16_t len, void *eb);

/**
  * @brief     Set the WiFi RX callback
  *
  * @attention 1. Currently we support only one RX callback for each interface
  *
  * @param     wifi_interface_t ifx : interface
  * @param     wifi_rxcb_t fn : WiFi RX callback
  *
  * @return
  *     - ESP_OK : succeed
  *     - others : fail
  */
esp_err_t esp_wifi_internal_reg_rxcb(wifi_interface_t ifx, wifi_rxcb_t fn);
  1. ESP CAM lib loop is running on core 0, however the blocking call back is on core 1
  2. need to increase the buffer size for WiFi in sdkconfig -> https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#how-to-improve-wi-fi-performance
  3. add support for gamepads on gs. My rog z1 120hz screen can achieve 40-50ms latency without vsync, week FEC, 7.0-7.2 mbps, mtk mt7921e chipset
  4. linux appimage version? was trying to run on steamos on rog z1 but lack of libs
  5. CIF 60 FPS mode for fpv is still necessary
  6. FCS is done by wifi hardware (last 4 bytes, u also said in main rx call back fun), no needed to add crc in my view. Most wifi card will drop the packet if FCS is not correct. (no ideals for modified driers) -> https://en.wikipedia.org/wiki/IEEE_802.11
@RomanLut
Copy link
Owner

image
How do you measure output power?

@sysytwl
Copy link
Author

sysytwl commented Jan 13, 2025

21 dbm (Decibel-milliwatts) -> 0.126 W or 126mW
also with the same code, different speed: 11mbps costs 2.4W in total, 54mbps costs 1.4W

@RomanLut
Copy link
Owner

When comparing 11 Mbps and 24 Mbps, the TX power difference is approximately -2 dBm, with a 2.6 dBm reduction in receiver sensitivity for 24 Mbps.

For reliable Wi-Fi communication, the signal must maintain a +7 dB margin above the noise floor. Given a typical field noise level of -88 to -90 dBm, signals below -83 dBm are generally unreliable. As a result, my preferred choice is 24 Mbps (MCS2). Reducing the speed to 11 Mbps does not provide a great range advantage based on my tests.

Currently, I can only achieve about 35% of the theoretical bandwidth. At 24 Mbps, I see a throughput of 6 MBps. At 11 Mbps, the throughput drops to 2-3 MBps, which is insufficient for good-quality streaming.

image

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

2 participants