Open doutordre opened 1 year ago
Hello @doutordre
Thanks a lot, for checking the detailed documentation and the issues before raising the issue. Much appreciated. I understand your issue, that some APs you are not able to connect and some you are not able to connect. The question pops to me, are you able to connect the same AP in these two environments?
[ ] Can you please confirm if you can connect to hotspot in home environment but same hotspot you cannot connect to in office environment?
[ ] Actually, I suspect your office has some noise in the channels you are using. Typically, running microwave oven, High bluetooth traffic near or in between ESP and AP might cause very high interference.
[ ] Anyway, Can you please re-configure your office AP (altogether some different AP in same office environment), to radiate in 40MHz and 'automatic' channel selection?
[ ] Error, '201' you get is basically, ESP-IDF is getting REASON_NO_AP_FOUND
error. See https://bbs.espressif.com/viewtopic.php?t=4604 & https://github.com/espressif/esp-idf/issues/7954 some of the similar issues faced by ESP users.
[ ] Is your AP is having good signal strength at ESP (Station mode: ESP is connecting to AP)? They should not be very close (as it might result in signal saturation) and should also not be very far (might result in weak signal)
Hi @mantriyogesh, Thank you for your prompt reply.
I looked further at this and found out why I couldn't connect to my office (corporate) network: they use EAP as security so obviously the wpa.conf file had to reflect this. I'm not very experienced in Linux or networks, so I wasn't aware of this fact. I'll have to work this out with our IT department. I found this out because I was able to connect to my office's Guest network!
In any case, I haven't been able to connect to mobile hotspots. It doesn't work either in my office or my home. As I was suspicious my mobile phone (Xiaomi A2 lite) was at fault I generated a mobile hotspot on my laptop called "pc_test". The problem persists, but with a different error code. The logs are as follows
I'll have a look at the thread you linked and search the espressif foruns in the meantime. Many thanks
Can you please take Wi-Fi sniffer log? (it should be easy on laptops. Check Wi-Fi monitor mode if Linux) Possibly in open security mode? If this issue is not experienced on open mode, please make sure M1-M4 are captured in the capture for your security mode.
Hi @doutordre , Any update on this?
Hi @mantriyogesh,
I have attempted connecting the ESP32 to my mobile hotspot as a private network with WPA2-Personal security and as an open network. It failed and gave a very similar output as the logs above detail.
My laptop runs Windows so I have made a log with Wireshark of a connection to my mobile hotspot as an open network. I don't know what we're looking for so I have run it without any filters applied. The logs are in attachment
Let me know if this is of any help. open_network_test.txt private_network_test.txt
Hello,
I'm having trouble connecting my RPi CM3+, hosting an ESP32 through SDIO, to any AP at my office or to mobile hotspots. I can connect to my home AP without problems.
I also had some trouble earlier with signal integrity which was fixed by following #26
To demonstrate, below are the dmesg and ESP32 outputs when I attempt to connect to my mobile phone hotspot "test".
dmesg
``` [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.15.61-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (2 [ 0.000000] random: crng init done [ 0.000000] Machine model: Raspberry Pi Compute Module 3 Plus Rev 1.0 [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x000000001ec00000, size 256 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] On node 0, zone DMA: 19456 pages in unavailable ranges [ 0.000000] percpu: Embedded 28 pages/cpu s77272 r8192 d29224 u114688 [ 0.000000] pcpu-alloc: s77272 r8192 d29224 u114688 alloc=28*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) [ 0.000000] CPU features: detected: ARM erratum 843419 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 238896 [ 0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=Compositet [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 665492K/970752K available (11520K kernel code, 1956K rwdata, 4140K rodata, 3840K init, 974K bss, 43116K ) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 38040 entries in 149 pages [ 0.000000] ftrace: allocated 149 pages with 4 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: bcm2836_arm_irqchip_handle_irq [ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns [ 0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns [ 0.000356] Console: colour dummy device 80x25 [ 0.001285] printk: console [tty1] enabled [ 0.001372] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800) [ 0.001436] pid_max: default: 32768 minimum: 301 [ 0.001644] LSM: Security Framework initializing [ 0.001929] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.001999] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.003715] cgroup: Disabling memory control group subsystem [ 0.007599] rcu: Hierarchical SRCU implementation. [ 0.009061] EFI services will not be available. [ 0.009842] smp: Bringing up secondary CPUs ... [ 0.011390] Detected VIPT I-cache on CPU1 [ 0.011486] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.013357] Detected VIPT I-cache on CPU2 [ 0.013427] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.015068] Detected VIPT I-cache on CPU3 [ 0.015126] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.015340] smp: Brought up 1 node, 4 CPUs [ 0.015494] SMP: Total of 4 processors activated. [ 0.015528] CPU features: detected: 32-bit EL0 Support [ 0.015559] CPU features: detected: 32-bit EL1 Support [ 0.015593] CPU features: detected: CRC32 instructions [ 0.056674] CPU: All CPU(s) started at EL2 [ 0.056821] alternatives: patching kernel code [ 0.058802] devtmpfs: initialized [ 0.080745] Enabled cp15_barrier support [ 0.080828] Enabled setend support [ 0.080874] KASLR enabled [ 0.081155] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.081226] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.093089] pinctrl core: initialized pinctrl subsystem [ 0.094319] DMI not present or invalid. [ 0.095309] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.106508] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations [ 0.107040] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.108535] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.108724] audit: initializing netlink subsys (disabled) [ 0.109173] audit: type=2000 audit(0.108:1): state=initialized audit_enabled=0 res=1 [ 0.110058] thermal_sys: Registered thermal governor 'step_wise' [ 0.110389] cpuidle: using governor menu [ 0.110952] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.111264] ASID allocator initialised with 32768 entries [ 0.111535] Serial: AMBA PL011 UART driver [ 0.125472] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [ 0.152749] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-08-26T14:04:36, variant start [ 0.156775] raspberrypi-firmware soc:firmware: Firmware hash is 102f1e848393c2112206fadffaaf86db04e98326 [ 0.217228] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1 [ 0.222780] vgaarb: loaded [ 0.223415] SCSI subsystem initialized [ 0.223772] usbcore: registered new interface driver usbfs [ 0.223877] usbcore: registered new interface driver hub [ 0.223996] usbcore: registered new device driver usb [ 0.224562] usb_phy_generic phy: supply vcc not found, using dummy regulator [ 0.224903] usb_phy_generic phy: dummy supplies not allowed for exclusive requests [ 0.225437] pps_core: LinuxPPS API ver. 1 registered [ 0.225474] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo GiomettiESP32 output
``` ets Jul 29 2019 12:21:46 rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT) configsip: 271414342, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:6680 load:0x40078000,len:14848 load:0x40080400,len:3792 entry 0x40080694 I (28) boot: ESP-IDF v4.4.1-472-gc9140caf8c-dirty 2nd stage bootloader I (28) boot: compile time 21:33:21 I (29) boot: chip revision: 3 I (33) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (40) boot.esp32: SPI Speed : 40MHz I (44) boot.esp32: SPI Mode : DIO I (49) boot.esp32: SPI Flash Size : 4MB I (54) boot: Enabling RNG early entropy source... I (59) boot: Partition Table: I (62) boot: ## Label Usage Type ST Offset Length I (70) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (77) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (85) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (92) boot: 3 factory factory app 00 00 00010000 00100000 I (100) boot: 4 ota_0 OTA app 00 10 00110000 00100000 I (107) boot: 5 ota_1 OTA app 00 11 00210000 00100000 I (115) boot: End of partition table I (119) boot: Defaulting to factory image I (124) boot_comm: chip revision: 3, min. application chip revision: 0 I (131) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=15e00h ( 89600) map I (172) esp_image: segment 1: paddr=00025e28 vaddr=3ffbdb60 size=0553ch ( 21820) load I (181) esp_image: segment 2: paddr=0002b36c vaddr=40080000 size=04cach ( 19628) load I (189) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=769dch (485852) map I (365) esp_image: segment 4: paddr=000a6a04 vaddr=40084cac size=181d4h ( 98772) load I (406) esp_image: segment 5: paddr=000bebe0 vaddr=50000000 size=00010h ( 16) load I (420) boot: Loaded app from partition at offset 0x10000 I (421) boot: Disabling RNG early entropy source... I (432) cpu_start: Pro cpu up. I (433) cpu_start: Starting app cpu, entry point is 0x4008121c I (0) cpu_start: App cpu up. I (449) cpu_start: Pro cpu start user code I (449) cpu_start: cpu freq: 240000000 I (449) cpu_start: Application information: I (453) cpu_start: Project name: network_adapter I (459) cpu_start: App version: 293978e I (464) cpu_start: Compile time: Jul 20 2022 21:33:02 I (470) cpu_start: ELF file SHA256: 573ea08fdc881889... I (476) cpu_start: ESP-IDF: v4.4.1-472-gc9140caf8c-dirty I (483) heap_init: Initializing. RAM available for dynamic allocation: I (490) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (496) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM I (502) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (508) heap_init: At 3FFD1498 len 0000EB68 (58 KiB): DRAM I (514) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (521) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (527) heap_init: At 4009CE80 len 00003180 (12 KiB): IRAM I (534) spi_flash: detected chip: generic I (538) spi_flash: flash io: dio W (542) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (556) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (570) FW_MAIN: ********************************************************************* I (576) FW_MAIN: ESP-Hosted Firmware version :: 1.0.1 I (584) FW_MAIN: Transport used :: SDIO I (590) FW_MAIN: ********************************************************************* I (596) FW_MAIN: Supported features are: I (600) FW_MAIN: - WLAN over SDIO I (604) FW_BT: - BT/BLE I (606) FW_BT: - HCI Over SDIO I (610) FW_BT: - BT/BLE dual mode I (612) FW_MAIN: Capabilities: 0x1d I (624) system_api: Base MAC address is not set I (624) system_api: read default base MAC address from EFUSE I (628) BTDM_INIT: BT controller compile version [5688ed5] I (632) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (966) FW_MAIN: ESP Bluetooth MAC addr: 30-83-98-d6-62-2e I (966) FW_SDIO_SLAVE: Using SDIO interface I (1836) FW_MAIN: Start Data Path I (1968) FW_SDIO_SLAVE: last reset cause: 1x I (1968) FW_MAIN: Initial set up done I (2158) FW_MAIN: INIT Interface command I (2162) wifi:mode : sta (30:83:98:d6:62:2c) I (2164) wifi:enable tsf I (2164) FW_CMD: Wifi Sta mode set I (2188) FW_MAIN: Get MAC command I (2190) FW_CMD: 0x3ffe3a18 30 83 98 d6 62 2c |0...b,| I (31490) FW_MAIN: Scan request I (32776) FW_MAIN: STA connect request I (32776) FW_CMD: Attempting secured connection I (32776) FW_CMD: test, channel: 6 I (34038) FW_CMD: STA Disconnect event: 201 I (34038) FW_CMD: cleanup_ap_bssid I (34052) FW_MAIN: Delete key request I (34072) FW_MAIN: Delete key request I (34082) FW_MAIN: Delete key request I (34100) FW_MAIN: Delete key request I (34110) FW_MAIN: Delete key request I (34120) FW_MAIN: Delete key request I (34140) FW_MAIN: Scan request I (35426) FW_MAIN: STA connect request I (35426) FW_CMD: Attempting secured connection I (35426) FW_CMD: test, channel: 6 I (36688) FW_CMD: STA Disconnect event: 201 I (36688) FW_CMD: cleanup_ap_bssid I (36712) FW_MAIN: Delete key request I (36732) FW_MAIN: Delete key request I (36740) FW_MAIN: Delete key request I (36750) FW_MAIN: Delete key request I (36770) FW_MAIN: Delete key request I (36780) FW_MAIN: Delete key request I (36788) FW_MAIN: Scan request I (38076) FW_MAIN: STA connect request I (38076) FW_CMD: Attempting secured connection I (38076) FW_CMD: test, channel: 6 I (39338) FW_CMD: STA Disconnect event: 201 I (39338) FW_CMD: cleanup_ap_bssid I (39362) FW_MAIN: Delete key request I (39380) FW_MAIN: Delete key request I (39390) FW_MAIN: Delete key request I (39410) FW_MAIN: Delete key request I (39418) FW_MAIN: Delete key request I (39438) FW_MAIN: Delete key request I (39458) FW_MAIN: Scan request I (40748) FW_MAIN: STA connect request I (40748) FW_CMD: Attempting secured connection I (40748) FW_CMD: test, channel: 6 I (42010) FW_CMD: STA Disconnect event: 201 I (42010) FW_CMD: cleanup_ap_bssid I (42024) FW_MAIN: Delete key request I (42042) FW_MAIN: Delete key request I (42052) FW_MAIN: Delete key request I (42072) FW_MAIN: Delete key request I (42082) FW_MAIN: Delete key request I (42100) FW_MAIN: Delete key request I (42110) FW_MAIN: Scan request ```Note that at my office there are many hidden APs when I scan with iwlist. When I'm back I'll post the logs here.