Comments (14)
I think I know what is wrong and how to fix it ..... Hopefully will be able to do the fix on Monday
from esp-wifi.
Oh, that's bad
Maybe it's "just" something like in cda6146
There were some ROM functions which should not get used and it should use the replacement contained in the driver
from esp-wifi.
Seems like the driver contains a lot of replacements for ROM functions. I tried to remove most of these (not the ones which are unlikely to be involved) but it didn't help unfortunately
r_hci_register_vendor_desc_tab
r_bt_bb_isr
r_ke_task_schedule
r_llc_loc_con_upd_proc_continue
r_llc_rem_con_upd_proc_continue
r_llc_hci_command_handler
r_lld_llcp_rx_ind_handler
r_lld_con_sched
r_lld_con_stop
r_lld_per_adv_sched
r_lld_scan_process_pkt_rx
r_lld_scan_process_pkt_rx_adv_rep
r_llm_le_features_get
r_bt_rf_coex_conn_phy_coded_data_time_limit_en_get
r_rf_txpwr_cs_get
r_rf_txpwr_dbm_get
r_bt_rtp_get_txpwr_idx_by_act
r_rwble_isr
r_sch_arb_event_start_isr
r_sch_plan_set
r_sch_prog_end_isr
r_btdm_task_post
r_btdm_task_post_from_isr
r_btdm_task_recycle
r_register_esp_vendor_cmd_handler
rom_phy_xpd_rf
rom_pbus_xpd_tx_on
read_hw_noisefloor
rom_index_to_txbbgain
rom_txbbgain_to_index
coex_bt_release
coex_bt_request
coex_event_duration_get
coex_status_get
coex_wifi_release
coex_core_pti_get
coex_core_release
coex_core_request
coex_core_status_get
coex_hw_timer_disable
coex_hw_timer_enable
coex_hw_timer_set
coex_schm_interval_set
coex_schm_lock
coex_schm_unlock
esf_buf_alloc
esf_buf_alloc_dynamic
esf_buf_recycle
ic_ebuf_alloc
ic_ebuf_recycle_rx
ic_ebuf_recycle_tx
ic_get_trc
ic_interface_enabled
ic_mac_deinit
ic_mac_init
ic_reset_rx_ba
GetAccess
is_lmac_idle
lmacAdjustTimestamp
lmacDiscardAgedMSDU
lmacDiscardMSDU
lmacEndFrameExchangeSequence
lmacIsIdle
lmacIsLongFrame
lmacMSDUAged
lmacPostTxComplete
lmacProcessAllTxTimeout
lmacProcessCollisions
lmacProcessRxSucData
lmacReachLongLimit
lmacReachShortLimit
lmacRecycleMPDU
lmacReleaseTxopQueue
lmacRequestTxopQueue
lmacRxDone
lmacSetTxFrame
lmacTxFrame
pm_allow_tx
pm_check_state
pm_disable_dream_timer
pm_disable_sleep_delay_timer
pm_dream
pm_enable_active_timer
pm_enable_sleep_delay_timer
pm_is_in_wifi_slice_threshold
pm_is_waked
pm_keep_alive
pm_local_tsf_process
pm_mac_sleep
pm_mac_wakeup
pm_on_beacon_rx
pm_on_data_rx
pm_on_tbtt
pm_parse_beacon
pm_process_tim
pm_rx_beacon_process
pm_rx_data_process
pm_set_beacon_filter
pm_sleep
pm_sleep_for
pm_tbtt_process
pm_tx_data_done_process
pp_hdrsize
pp_post
pp_process_hmac_waiting_txq
ppAMPDU2Normal
ppAssembleAMPDU
ppCalFrameTimes
ppCalSubFrameLength
ppCalTxAMPDULength
ppCheckTxAMPDUlength
ppDequeueRxq_Locked
ppDequeueTxDone_Locked
ppDequeueTxQ
ppDisableQueue
ppEmptyDelimiterLength
ppEnqueueRxq
ppEnqueueTxDone
ppGetTxframe
ppGetTxQFirstAvail_Locked
ppMapTxQueue
ppMapWaitTxq
ppProcessRxPktHdr
ppProcessTxQ
ppProcessWaitingQueue
ppProcTxDone
ppProcTxSecFrame
ppRecordBarRRC
ppRecycleAmpdu
ppRecycleRxPkt
ppResortTxAMPDU
ppResumeTxAMPDU
ppRxFragmentProc
ppRxPkt
ppRxProtoProc
ppSearchTxframe
ppSearchTxQueue
ppSelectNextQueue
ppSubFromAMPDU
ppTask
ppTxPkt
ppTxProtoProc
ppTxqUpdateBitmap
RC_GetBlockAckTime
rc_get_trc
rc_get_trc_by_index
rcAmpduLowerRate
rcClearCurAMPDUSched
rcClearCurSched
rcClearCurStat
rcGetAmpduSched
rcGetSched
rcLowerSched
rcSetTxAmpduLimit
rcTxUpdatePer
rcUpdateAckSnr
rcUpdateRate
rcUpdateRxDone
rcUpdateTxDone
rcUpdateTxDoneAmpdu2
rcUpSched
rssi_margin
rx11NRate2AMPDULimit
TRC_AMPDU_PER_DOWN_THRESHOLD
TRC_AMPDU_PER_UP_THRESHOLD
trc_calc_duration
trc_isTxAmpduOperational
trc_onAmpduOp
TRC_PER_IS_GOOD
trc_SetTxAmpduState
trc_tid_isTxAmpduOperational
trcAmpduSetState
config_is_cache_tx_buf_enabled
wDev_AppendRxBlocks
wdev_bank_load
wdev_bank_store
wdev_csi_len_align
wDev_DiscardFrame
wDev_GetNoiseFloor
wDev_IndicateAmpdu
wDev_IndicateFrame
wdev_mac_reg_load
wdev_mac_reg_store
wdev_mac_sleep
wdev_mac_special_reg_load
wdev_mac_special_reg_store
wdev_mac_wakeup
wDev_ProcessFiq
wDev_ProcessRxSucData
wDevCheckBlockError
wdevProcessRxSucDataAll
hal_mac_is_dma_enable
hal_mac_is_low_rate_enabled
hal_mac_tx_get_blockack
hal_mac_tx_set_ppdu
mac_tx_set_duration
mac_tx_set_plcp0
mac_tx_set_htsig
mac_tx_set_plcp1
mac_tx_set_plcp2
ieee80211_crypto_decap
ieee80211_crypto_encap
ampdu_dispatch
ampdu_dispatch_all
ampdu_dispatch_as_many_as_possible
ampdu_dispatch_movement
ampdu_dispatch_upto
ieee80211_ampdu_reorder
ieee80211_ampdu_start_age_timer
ieee80211_decap
wifi_get_macaddr
wifi_rf_phy_disable
ieee80211_align_eb
ieee80211_classify
ieee80211_copy_eb_header
ieee80211_encap_esfbuf
ieee80211_is_tx_allowed
ieee80211_output_pending_eb
ieee80211_output_process
ieee80211_recycle_cache_eb
ieee80211_search_node
ieee80211_set_tx_desc
ieee80211_set_tx_pti
wifi_is_started
scan_start
sta_input
chm_is_at_home_channel
cnx_node_is_existing
cnx_node_search
aes_encrypt
md5_vector
MD5Final
MD5Init
MD5Update
hmac_md5
hmac_md5_vector
from esp-wifi.
So if I remove the function from rom_functions.x and it links, it should be OK?
from esp-wifi.
Probably those functions could be removed from rom_functions.x ..... but in my tests with your code it didn't change anything unfortunately.
From the crash it seems that the crash is in the rom's memcpy which got called from r_GF_Jacobian_Point_Addition256 (also rom) which probably got called from something in libbtdm_app.a
from esp-wifi.
But in my stack
Probably those functions could be removed from rom_functions.x ..... but in my tests with your code it didn't change anything unfortunately.
From the crash it seems that the crash is in the rom's memcpy which got called from r_GF_Jacobian_Point_Addition256 (also rom) which probably got called from something in
libbtdm_app.a
On my esp32c3 I get a different stack (see above).
I do not know very well to decode that stack, so maybe I am wrong.
from esp-wifi.
it's also in your exception message .... unfortunately, espflash doesn't know about the rom code and decodes the addresses wrong - I get the exact same crash
I really have no idea what is going on there. The r_GF_Jacobian_Point_Addition256
is most likely used in crypto but I don't see why any crypto is needed for a BLE scan.
I also tested on ESP32-C2 and there it works fine
from esp-wifi.
it's also in your exception message .... unfortunately, espflash doesn't know about the rom code and decodes the addresses wrong - I get the exact same crash
I really have no idea what is going on there. The
r_GF_Jacobian_Point_Addition256
is most likely used in crypto but I don't see why any crypto is needed for a BLE scan.I also tested on ESP32-C2 and there it works fine
I have my main project with a lot more code and esp-now,gpio where it does not crash just freeze after BLE scan start.
So my opinion is that the PC is corrupt and jumps to incorrect address.
For now I have made a branch on my esp-wifi
fork without the driver update so I can continue working.
Let's hope we can figure out what is wrong at some point, until then I will merge manually on that branch any new updates on the esp-wifi
.
What are the major fixes/improvements that the driver update brings?
from esp-wifi.
I have my main project with a lot more code and esp-now,gpio where it does not crash just freeze after BLE scan start.
That is interesting information - might help when looking deeper into it.
What are the major fixes/improvements that the driver update brings?
We try to update the drivers from time to time mainly to enable new chips (we keep all the drivers at the same version).
That last update was really causing headaches especially for C3 and S3 BLE and it seems there is even more. Definitely good you came up with that example repo
I will try to look deeper into the drivers as soon as I get to it. There is also hope that the next driver update might fix it magically
from esp-wifi.
What are the major fixes/improvements that the driver update brings?
We try to update the drivers from time to time mainly to enable new chips (we keep all the drivers at the same version). That last update was really causing headaches especially for C3 and S3 BLE and it seems there is even more. Definitely good you came up with that example repo
I will try to look deeper into the drivers as soon as I get to it. There is also hope that the next driver update might fix it magically
Thanks.
I see a lot of activity recently on here esp32-wifi-lib.
But I do not see all the libs you are using on this repository.
from esp-wifi.
I think I know what is wrong and how to fix it ..... Hopefully will be able to do the fix on Monday
That will be great, thanks.
from esp-wifi.
[…].
To reproduce use project esp-ble-scan There is commented lines in Cargo.toml for last known working configuration.
[…]
Unfortunately the project doesn't seem to be online anymore.
@alexiionescu did you have any success with implementing ble scan functionality?
I have not found any examples or implementations yet (only using idf/std), this seemed to be the only starting point.
from esp-wifi.
[…].
To reproduce use project esp-ble-scan There is commented lines in Cargo.toml for last known working configuration.
[…]Unfortunately the project doesn't seem to be online anymore. @alexiionescu did you have any success with implementing ble scan functionality?
I have not found any examples or implementations yet (only using idf/std), this seemed to be the only starting point.
Yes. It is working now. I do not have that project anymore, but it is similar with this one tils-relay
from esp-wifi.
That's a great starting point, thanks a lot!
from esp-wifi.
Related Issues (20)
- Driver Update HOT 1
- BLE example is not work for esp32s3 HOT 13
- [ESP32] esp-wifi crash if used with embassy and any task on the second core HOT 10
- Start a CHANGELOG.md
- ESP8266 WIFI attempts HOT 2
- esp-wifi should be useable without depending on embedded-svc HOT 1
- esp-wifi 0.3.0 does not compile for ESP32-C3, it depends on portable-atomic, and that doesnt build for RiscV HOT 5
- How to depend on esp-wifi in an external example HOT 3
- example/embassy_ble does not compile HOT 2
- esp-wifi lockup on esp32c3 when using the embassy InterruptExecutor HOT 3
- [ESP32] esp-wifi crashes when trying to connect via BLE HOT 6
- NVS initialization error HOT 1
- compile error HOT 2
- W (42148) wifi:m f null Getting This warning and then wifi is never reconnected in the execution HOT 1
- Critical section feature conflict between esp-wifi and esp-idf-hal HOT 3
- #[interrupt] macro has been removed from esp-hal-procmacros HOT 6
- docs.rs failed to build HOT 3
- HTTPS support HOT 2
- [RISCV] Stable esp-wifi HOT 2
- Access point example with password can't connect (ESP32S3) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-wifi.