Commit Graph

37 Commits

Author SHA1 Message Date
Jeff Epler
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Dan Halbert
10b94796c0 wip; fix more m_malloc and gc_alloc 2023-08-11 00:30:34 -04:00
Dan Halbert
0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
Jeff Epler
3459fe322b
Withdraw the _environ module
This existed solely for testing, so expose it a different way during
the unix coverage build

Also turn off os.getenv support on samd21.
2022-12-08 15:33:10 -06:00
Jeff Epler
ef2bfdb5db
dotenv becomes settings.toml 2022-12-08 12:44:20 -06:00
Neradoc
50a9beda04 Retrieve the BLE name from dotenv if available
Format:
CIRCUITPY_BLE_NAME = My BLE Board

- the length is limited to 31 characters
- for the NRF version it repeatedly truncates the name if it's too long
- the ESP version defaults to "nimble" if the name is too long
2022-07-14 11:55:53 +02:00
Timon
a1052d5f73
Initial broadcom port for Raspberry Pi
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes #4314
2021-11-22 14:54:44 -08:00
Dan Halbert
c933f26543 Fix _bleio.start_advertising arg check; add doc to SocketPool.socket() 2021-10-25 08:43:57 -04:00
Scott Shawcroft
b36858daa0
Fix advertisement 2021-06-25 16:40:23 -07:00
Scott Shawcroft
dc76306cfa
Enable a BLE workflow
nRF CircuitPython boards will now provide the file transfer
service defined here: https://github.com/adafruit/Adafruit_CircuitPython_BLE_File_Transfer

USB capable boards will only advertise if previously bonded to a
device or if the reset button is pressed during the fast blue
flashes on start up. When pressed, the board will restart again but
the blue period will not flash.

Boards without USB will always advertise.

When previously bonded, the advertisement is private so that no
other peers can connect. If advertising publicly, the tx power is
lowered to reduce the likelihood of bonding from a distance.

This PR also fixes issues with loading identities of bonded peers
so that our address can now be resolved and we can resolve others'
addresses when scanning.
2021-06-24 12:59:14 -07:00
Scott Shawcroft
65813ef358
Fix ble_hci builds 2021-05-19 14:14:32 -07:00
Scott Shawcroft
ee7a701487
Switch to start_advertising arg 2021-05-19 12:21:48 -07:00
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Dan Halbert
f51e75c1d2 cxd56 needed more precise include for __packed; needed SRC_C += on some ports 2020-10-15 15:24:24 -04:00
Dan Halbert
b27d511251 address review; use constructor for HCI Adapter 2020-08-30 14:06:48 -04:00
Dan Halbert
0e30dd8bcc merge from upstream; working; includes debug_out code for debugging via Saleae for posterity 2020-08-20 20:29:57 -04:00
Dan Halbert
dfe50d08d5 Fix a few bugs 2020-08-18 16:10:09 -04:00
Dan Halbert
da48ab0568 add generic services 2020-08-16 23:17:08 -04:00
Dan Halbert
1c8e11b2cb bug in char get_value; raise NotImpl; better arg validation 2020-08-14 23:38:58 -04:00
Dan Halbert
d0ffdda5bb fix reset logic to not do pin ops or heap ops at bad times 2020-08-13 17:47:35 -04:00
Dan Halbert
44c9c43cd1 ble_uart_echo_test works 2020-08-13 00:03:39 -04:00
Dan Halbert
a995a5c58f wip: partial discovery responses; compiles; not tested 2020-08-03 21:02:57 -04:00
Dan Halbert
0a60aee3e4 wip: compiles 2020-08-02 11:36:38 -04:00
Dan Halbert
a76ad3415c wip: implementing functionality 2020-07-30 22:07:55 -04:00
Dan Halbert
9572f306d3 ATT WIP 2020-07-28 11:56:00 -04:00
Dan Halbert
f6f45c82a1 wip: ATT protocol 2020-07-23 18:54:26 -04:00
Dan Halbert
6494bbdc64 snapshot 2020-07-16 23:14:49 -04:00
Dan Halbert
b08b0264cc back to working; check for extended advertising support 2020-07-15 09:46:13 -04:00
Dan Halbert
f6869c69c5 wip: advertising; not tested 2020-07-12 19:45:23 -04:00
Dan Halbert
f03045b97e address working; improved pkt dump 2020-07-08 23:15:48 -04:00
Dan Halbert
a5ab2829eb use zephyr include files; wip: compiles 2020-07-08 09:33:41 -04:00
Dan Halbert
11cb3e3b4b hci skeleton done; not working yet 2020-06-30 23:19:40 -04:00
Dan Halbert
f879114c43 do HCI pin init in Python, not here 2020-06-26 19:27:05 -04:00
Dan Halbert
1bc2e979eb wip; compiles; much commented out 2020-06-26 17:23:20 -04:00
Dan Halbert
759929c24a hci early wip; refactor supervisor bluetooth.c for nrf: tested 2020-06-25 20:57:17 -04:00