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

Fix ESP32-C3 development mode #90

Merged
merged 1 commit into from
Dec 1, 2022
Merged

Fix ESP32-C3 development mode #90

merged 1 commit into from
Dec 1, 2022

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Nov 30, 2022

This should address the issue reported in #88

Additionally

  • updated embedded-io to 0.3.1
  • improve mkbindings.bat
  • don't report StaDisconnected as connected anymore

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a small fix to the delay impl

src/tasks.rs Outdated Show resolved Hide resolved
@ImUrX
Copy link
Contributor

ImUrX commented Nov 30, 2022

May I ask why StaDisconnected counted as connected before?

@jessebraham
Copy link
Member

Still working in release for me, but using dev I'm getting an exception:

is wifi started: Ok(true)
Start Wifi Scan
[...]
Call wifi_connect
wifi_set_configuration returned Ok(())
Ok(EnumSet(Client))
wifi_connect Ok(())
Wait to get connected
Ok(true)
Wait to get an ip address
Exception 'Store/AMO access fault' mepc=420164d4, mtval=0
TrapFrame { ra: 420164c0, t0: 6080000, t1: 400015c0, t2: 3aaaa, t3: dfffffff, t4: bfffffff, t5: 80000000, t6: 80100, a0: 0, a1: 90c, a2: 33333333, a3: 4, a4: 3c0d17a8, a5: 4201bcb2, a6: deadbeef, a7: fff, s0: 3fc89150, s1: 0, s2: 7, s3: 8a4, s4: 0, s5: 3fcdf930, s6: 3fce0000, s7: fff00000, s8: 60034000, s9: 60033000, s10: 3fce0000, s11: 0, gp: 0, tp: 0, sp: 3fc890c0, pc: 420164d4, mstatus: 1881, mcause: 7, mtval: 0 }
0x4201a280
0x4201a280 - malloc
    at /Users/jesse/Work/esp-wifi/src/wifi/os_adapter.rs:843
0x4201bcc6
0x4201bcc6 - esp_wifi::wifi::os_adapter::wifi_malloc
    at /Users/jesse/Work/esp-wifi/src/wifi/os_adapter.rs:1635
0x40040ccc
0x40040ccc - r_lld_ext_adv_dynamic_aux_pti_process
    at ??:??

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Nov 30, 2022

Still working in release for me, but using dev I'm getting an exception:

is wifi started: Ok(true)
Start Wifi Scan
[...]
Call wifi_connect
wifi_set_configuration returned Ok(())
Ok(EnumSet(Client))
wifi_connect Ok(())
Wait to get connected
Ok(true)
Wait to get an ip address
Exception 'Store/AMO access fault' mepc=420164d4, mtval=0
TrapFrame { ra: 420164c0, t0: 6080000, t1: 400015c0, t2: 3aaaa, t3: dfffffff, t4: bfffffff, t5: 80000000, t6: 80100, a0: 0, a1: 90c, a2: 33333333, a3: 4, a4: 3c0d17a8, a5: 4201bcb2, a6: deadbeef, a7: fff, s0: 3fc89150, s1: 0, s2: 7, s3: 8a4, s4: 0, s5: 3fcdf930, s6: 3fce0000, s7: fff00000, s8: 60034000, s9: 60033000, s10: 3fce0000, s11: 0, gp: 0, tp: 0, sp: 3fc890c0, pc: 420164d4, mstatus: 1881, mcause: 7, mtval: 0 }
0x4201a280
0x4201a280 - malloc
    at /Users/jesse/Work/esp-wifi/src/wifi/os_adapter.rs:843
0x4201bcc6
0x4201bcc6 - esp_wifi::wifi::os_adapter::wifi_malloc
    at /Users/jesse/Work/esp-wifi/src/wifi/os_adapter.rs:1635
0x40040ccc
0x40040ccc - r_lld_ext_adv_dynamic_aux_pti_process
    at ??:??

Seems it ran out of memory (malloc got a null pointer) - interesting

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Nov 30, 2022

May I ask why StaDisconnected counted as connected before?

I have no idea - doesn't make any sense at all

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Nov 30, 2022

@jessebraham maybe 2df9af7 can prevent that crash you are seeing - in any case it's the right thing to do in code

@jessebraham
Copy link
Member

I no longer get an exception, but it just prints Disconnected over and over now 😁

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Nov 30, 2022

It needs a few tries in dev mode ... Just Ctrl+R until it works ... Or until you get too bored

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Dec 1, 2022

README is now clearer about the fact that it is not really expected to work in dev-builds

There are a few other improvements here - so if it works for release builds, we should get this in

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the original changes + some notes on how build esp-wifi in release always, this LGTM.

@bjoernQ bjoernQ merged commit 34b5d0d into main Dec 1, 2022
@bjoernQ bjoernQ deleted the esp32c3-dev-mode-fix branch December 1, 2022 11:54
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

Successfully merging this pull request may close these issues.

4 participants