Code Monkey home page Code Monkey logo

Comments (6)

MabezDev avatar MabezDev commented on July 4, 2024 1

Success!! PR incoming :)

from esp-wifi.

bjoernQ avatar bjoernQ commented on July 4, 2024

Wow that is disappointing ... 😞

Here is my full log output:

About to make the first call ...
Start!
pp rom version: 9387209
net80211 rom version: 9387209
I (37) wifi:wifi driver task: 02, prio:253, stack:6656, core=0
I (116) wifi:wifi firmware version: 131fc6b
I (136) wifi:wifi certification version: v7.0
I (158) wifi:config NVS flash: disabled
I (180) wifi:config nano formating: disabled
I (206) wifi:Init data frame dynamic rx buffer num: 32
I (229) wifi:Init management frame dynamic rx buffer num: 32
I (255) wifi:Init management short buffer num: 32
I (274) wifi:Init dynamic tx buffer num: 32
I (301) wifi:Init static tx FG buffer num: 2
I (326) wifi:Init static rx buffer size: 2212
I (360) wifi:Init static rx buffer num: 10
I (383) wifi:Init dynamic rx buffer num: 32
D (420) wifi:clear blacklist
I (439) wifi:set country: cc=CN schan=1 nchan=13 policy=1
esp_wifi_init_internal returned 0
Call wifi_start
V (597) wifi:ht20 freq=2412, chan=1
I (620) wifi:set rx active PTI: 0, rx ack PTI: 0, and default PTI: 0
D (643) wifi:filter: set rx policy=0
I (681) wifi:mode : sta (84:f7:03:3a:81:c4)
I (722) wifi:enable tsf
D (737) wifi:filter: set rx policy=1
D (755) wifi:connect status 0 -> 0
I (781) wifi:Set ps type: 0
wifi_start returned 0
V (807) wifi:get ap num=0
Found 0 APs.
...
calling esp_wifi_scan_get_ap_records
V (838) wifi:scan number 0
printing 0 records
MAC address is [84, f7, 3, 3a, 81, c4]
Call wifi_connect
D (879) wifi:clear blacklist
D (902) wifi:Start wifi connect
D (917) wifi:connect status 0 -> 0
D (938) wifi:connect chan=10
D (954) wifi:connect status 0 -> 1
D (977) wifi:filter: set rx policy=3
D (995) wifi:clear scan ap list
D (1011) wifi:start scan: type=0x8400, priority=2, cb=0x420b7f18 [cnx_start_handoff_cb:??:??], arg=0x0, ss_state=0x01, time=1392674, index=9
V (1055) wifi:inter_channel_timeout: arg=0x0, ss_state=0x01
D (1078) wifi:perform scan: ss_state=0x09, chan<10,0>, dur<0,120>
V (1111) wifi:change: chan<10,0>, dur<0,120>
V (1134) wifi:ht20 freq=2457, chan=10
V (1160) wifi:enter start op, arg=0x3fc9019c
V (1179) wifi:scan operation: state=0x03, chan<10,0>, arg=0x3fc9019c, status=0
V (1213) wifi:scan specific ssid=EasyBox-A50D00
V (1235) wifi:start max timer
wifi_connect returned 0
D (1280) wifi:rsn valid: gcipher=1 ucipher=3 akm=5
D (1306) wifi:profile match: ss_state=0x07
V (1326) wifi:scan histroy table is not full yet, add
V (1344) wifi:add ssid=EasyBox-A50D00, chan=10 to scan history
D (1374) wifi:scan end: arg=0x0, status=0, ss_state=0x07
D (1401) wifi:find first mathched ssid, scan done
V (1416) wifi:back home chan=<1,0>, current chan=<10,0>
V (1442) wifi:ht20 freq=2412, chan=1
D (1464) wifi:filter: set rx policy=4
D (1482) wifi:first chan=1
V (1498) wifi:scan_done: arg=0x0, status=0, cur_time=1880284, scan_id=128, scan state=00
V (1531) wifi:call scan_done cb, arg=0x0
D (1550) wifi:handoff_cb: status=0
V (1568) wifi:best bss has set.
D (1581) wifi:ap found, mac=9c:80:df:a5:0d:78
V (1618) wifi:bssid=9c:80:df:a5:0d:78, LR=0
D (1659) wifi:new_bss=0x3fc90318, cur_bss=0x0, new_chan=<10,0>, cur_chan=1
D (1689) wifi:filter: set rx policy=5
I (1707) wifi:new:<10,0>, old:<1,0>, ap:<255,255>, sta:<10,0>, prof:1
V (1741) wifi:ht20 freq=2457, chan=10
D (1763) wifi:connect_op: status=0, auth=5, cipher=3
D (1783) wifi:auth mode is not none
D (3714) wifi:connect_bss: auth=1, reconnect=0
I (3736) wifi:state: init -> auth (b0)
D (3763) wifi:start 1s AUTH timer
D (3781) wifi:clear scan ap list
D (3848) wifi:recv auth: seq=2, status=0
I (3868) wifi:state: auth -> assoc (00)
D (3894) wifi:restart connect 1s timer for assoc
D (3928) wifi:recv assoc: type=0x10
D (3950) wifi:filter: set rx policy=6
I (3969) wifi:state: assoc -> run (10)
D (3995) wifi:start 10s connect timer for 4 way handshake
V (4723) wifi:wpa_psk start
V (4749) wifi:wpa_psk handle succeed
V (4791) wifi:wpa_psk start
V (4820) wifi:wpa_psk handle succeed
I (4851) wifi:connected with EasyBox-A50D00, aid = 6, channel 10, BW20, bssid = 9c:80:df:a5:0d:78
I (4899) wifi:security: WPA2-PSK, phy: bgn, rssi: -56
D (4921) wifi:remove all except 9c:80:df:a5:0d:78 from rc list
D (4959) wifi:clear blacklist
D (4974) wifi:filter: set rx policy=7
I (4996) wifi:pm start, type: 0
I (5012) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 0, mt_pti: 25000, mt_time: 10000
D (5041) wifi:Send sta connected event
Start busy loop on main
D (5057) wifi:Listening to port 4321 for greeting, please connect to the port
connect status 1 -> 5
D (5116) wifi:obss scan is disabled
D (5207) wifi:start obss scan: obss scan is stopped
I (5398) wifi:BcnInt:102400, DTIM:1
D (5514) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (5702) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (5870) wifi:update trc
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP config: Config { address: Some(Cidr { address: Address([192, 168, 2, 121]), prefix_len: 24 }), router: Some(Address([192, 168, 2, 1])), dns_servers: [Some(Address([192, 168, 2, 1])), None, None] }
Assigned a new IPv4 address: 192.168.2.121/24
Default gateway: 192.168.2.1
DNS servers:
- 192.168.2.1
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
DHCP Error: Unrecognized
Send and close.
Listening to port 4321 for greeting, please connect to the port

Maybe comparing both logs reveal anything?
Will try it with another AP

from esp-wifi.

bjoernQ avatar bjoernQ commented on July 4, 2024

Ah I'm a fool: Please change line https://github.com/bjoernQ/esp32c3-wifi-rs/blob/062cb1aa81a0b0faf8e7f0f4c857dd97b05cbe7a/src/wifi/mod.rs#L425 to channel 0 and try again

from esp-wifi.

MabezDev avatar MabezDev commented on July 4, 2024

No change unfortunately (again tried on three different AP's)

MAC address is [7c, df, a1, 42, d2, f4]
Call wifi_connect
D (925) wifi:clear blacklist
D (948) wifi:Start wifi connect
D (963) wifi:connect status 0 -> 0
D (985) wifi:connect chan=1
D (1003) wifi:connect status 0 -> 1
D (1023) wifi:filter: set rx policy=3
D (1042) wifi:clear scan ap list
D (1057) wifi:start scan: type=0x8400, priority=2, cb=0x420b4ab8, arg=0x0, ss_state=0x01, time=1441356, index=0
V (1101) wifi:inter_channel_timeout: arg=0x0, ss_state=0x01
D (1127) wifi:perform scan: ss_state=0x09, chan<1,0>, dur<0,120>
V (1158) wifi:change: chan<1,0>, dur<0,120>
V (1184) wifi:enter start op, arg=0x3fc9019c
V (1203) wifi:scan operation: state=0x03, chan<1,0>, arg=0x3fc9019c, status=0
V (1237) wifi:scan specific ssid=Mabez
V (1259) wifi:start max timer
wifi_connect returned 0
D (1398) wifi:scan end: arg=0x0, status=0, ss_state=0x03
V (1427) wifi:hint scan, stop scan
V (1442) wifi:back home chan=<1,0>, current chan=<1,0>
D (1466) wifi:filter: set rx policy=4
D (1484) wifi:first chan=1
V (1503) wifi:scan_done: arg=0x0, status=0, cur_time=1886908, scan_id=128, scan state=00
V (1537) wifi:call scan_done cb, arg=0x0
D (1555) wifi:handoff_cb: status=0
D (1574) wifi:clear rc list
D (1589) wifi:clear blacklist
D (1601) wifi:send disconnect event
D (1616) wifi:connect status 1 -> 3
D (1637) wifi:disable connect timer
D (1653) wifi:clear scan ap list

from esp-wifi.

bjoernQ avatar bjoernQ commented on July 4, 2024

That strange - from your logs it looks like it just tries to scan channel 1 and gives up then - it should scan up to 13 channels I guess (nchan in country config)

from esp-wifi.

MabezDev avatar MabezDev commented on July 4, 2024

It's very strange, it still only scans channel 1 even if I supply wifi_scan_method_t_WIFI_ALL_CHANNEL_SCAN in the wifi config for connect 🤔.

from esp-wifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.