-
Notifications
You must be signed in to change notification settings - Fork 9
En config and irq #230
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
En config and irq #230
Changes from all commits
ec209ef
6391f75
568eed2
aa566cc
fe288fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,10 +11,28 @@ | |
| raise SystemExit | ||
|
|
||
|
|
||
| def irq_handle(event, data): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we already add this tests to the HIL? Or to early!?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The events possible in this handler are the only ones listed here: https://ifx-micropython.readthedocs.io/en/latest/library/bluetooth.html#bluetooth.BLE.irq |
||
| pass | ||
|
|
||
|
|
||
| ble_obj = bluetooth.BLE() | ||
| ble_obj.active(True) | ||
| print("BLE active: ", ble_obj.active()) | ||
|
|
||
| print("Turning off BLE radio") | ||
| # Config get test | ||
| print("\n** Configurations set for device **") | ||
| print("GAP_NAME: ", ble_obj.config("gap_name")) | ||
| print("MTU: ", ble_obj.config("mtu")) | ||
|
|
||
| ble_obj.config(addr_mode=0) # Public | ||
| print("MAC: ", ble_obj.config("mac")[1].hex()) | ||
|
|
||
| # Check if ble.irq registers handle | ||
| ble_obj.irq(irq_handle) | ||
|
|
||
| # Cannot be verified since trng is used and changes in every test | ||
| # ble_obj.config(addr_mode=1) #Static Random | ||
| # print("Set random address: ", ble_obj.config("mac")[1].hex()) | ||
| print("\n") | ||
| ble_obj.active(False) | ||
| print("BLE active: ", ble_obj.active()) | ||
| print("Turned off BLE radio: ", not ble_obj.active()) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| Bluetooth Stack Initialization Successful | ||
| BLE active: True | ||
| Turning off BLE radio | ||
|
|
||
| ** Configurations set for device ** | ||
| GAP_NAME: b'Hello' | ||
| MTU: 23 | ||
| MAC: 00a050000000 | ||
|
|
||
|
|
||
| Bluetooth disabled | ||
| BLE active: False | ||
| Turned off BLE radio: True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From all these key storage requirements, is there an example of how is this done in other cores?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have only 3 references. All the ports that have BLE support depend on nimble or btstack and in each following is the implementation:
We have API's in MTB BLE stack to do this, but just that it is not evaluated yet how to especially with the NVM enablement part.