Page 1 of 1

esp32-s2 - usb+wifi scan problem?

Posted: Fri Jun 10, 2022 5:21 pm
by Fachinelli
hello, this question is about a problem i'm getting when using usb and trying to scan the nearby wifi with the esp32-s2 saola board.
i'm currently trying to scan wifi while using the usb as cdc(tinyusb library).
When i scan without usb working i always get all the wifis in the area.
When i scan with the usb working, sometimes i get some wifis, sometimes i get none, sometimes i get 1...
i tried using esp-idf release v4.4 and now i'm trying with master, still same problem.
i tried changing tasks priorities, changing scan time, enabling usb when phy init(getting: undefined reference to `phy_bbpll_en_usb', so i think this config does not work for esp32-s2 board)...

Any idea for the reason of this problem?

Re: esp32-s2 - usb+wifi scan problem?

Posted: Mon Jun 13, 2022 1:05 pm
by Fachinelli
It seems that this just happens when i send something trough USB...
if i comment these two lines, USB + wifi works, even if i'm receiving things trough USB.

tinyusb_cdcacm_write_queue((tinyusb_cdcacm_itf_t)itf, ucDataBuffer, size);
tinyusb_cdcacm_write_flush((tinyusb_cdcacm_itf_t)itf, SEND_WAIT_TIME);