Commit Graph

29104 Commits

Author SHA1 Message Date
Jeff Epler
b1f7940297
Pico W: Correctly treat empty cadata= as disabling host checking 2022-10-12 11:38:29 -05:00
Jeff Epler
ca9523b814
Pico w: socket: Correctly return negative error code from recv_into 2022-10-12 11:38:29 -05:00
Jeff Epler
62cbd3bcd8
Pico w: socket: correctly track sockets generated by accept() 2022-10-12 11:38:26 -05:00
MicroDev
ab22d5a8cd
Merge pull request #7024 from flom84/stm-include-headers-fixes
Remove redundant header files in STM port
2022-10-12 10:22:29 +05:30
Dan Halbert
822e806f03
Merge pull request #7031 from BPI-STEAM/CircuitPython-main-bpi-picow-dev
Add BananaPi BPI-PicoW-S3 .
2022-10-11 22:53:37 -04:00
Wind-stormger
376df8ec7e Add BananaPi BPI-PicoW-S3 .
Adds support for the BananaPi BPI-PicoW-S3 Boards.
Based on esp32s3 chip.
With one WS2812 LED, one monochrome LED, one ceramic antenna.
Support double-reset to tinyUF2.
2022-10-12 09:11:25 +08:00
MicroDev
fed884738c
Merge pull request #7039 from dhalbert/fix-yd-rp2040-pr
Fix YD-RP2040 files
2022-10-12 00:24:37 +05:30
Dan Halbert
e19abef57e forgot to add these! 2022-10-11 13:12:43 -04:00
Dan Halbert
2793d4b41a
Merge pull request #6410 from fabaff/yd-rp2040
Add support for VCC-GND Studio YD-RP2040
2022-10-11 13:01:50 -04:00
Dan Halbert
851f8a188d Merge remote-tracking branch 'adafruit/main' into HEAD 2022-10-11 12:21:59 -04:00
Dan Halbert
ab4e04879d
Merge pull request #7036 from MicroDev1/ci
CI: Update to newer actions
2022-10-11 07:49:09 -04:00
Dan Halbert
71fc8b039c
Merge pull request #7035 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-10-11 07:46:30 -04:00
microDev
e5139e2040
update to newer actions 2022-10-11 10:45:22 +05:30
Hosted Weblate
8bffdb430e
Merge remote-tracking branch 'origin/main' 2022-10-11 06:56:13 +02:00
MicroDev
ebe49db909
Merge pull request #7029 from jepler/client-certificate
Add support for SSL client certificate (load_cert_chain) and self-signed certificate (load_verify_locations)
2022-10-11 10:26:06 +05:30
Jeff Epler
0c8b261ec9
picow: Add support of self-signed certificates.
## Testing self-signed certificates and `load_verify_locations`

Obtain the badssl "self-signed" certificate in the correct form:

```sh
openssl s_client -servername self-signed.badssl.com -connect untrusted-root.badssl.com:443 < /dev/null | openssl x509 > self-signed.pem
```

Copy it and the script to CIRCUITPY:
```python
import os
import wifi
import socketpool
import ssl
import adafruit_requests

TEXT_URL = "https://self-signed.badssl.com/"
if not wifi.radio.ipv4_address:
    wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))

pool = socketpool.SocketPool(wifi.radio)
context = ssl.create_default_context()
requests = adafruit_requests.Session(pool, context)

print(f"Fetching from {TEXT_URL} without certificate (should fail)")
try:
    response = requests.get(TEXT_URL)
except Exception as e:
    print(f"Failed: {e}")
else:
    print(f"{response.status_code=}, should have failed with exception")

print("Loading server certificate")
with open("/self-signed.pem", "rb") as certfile:
    context.load_verify_locations(cadata=certfile.read())
requests = adafruit_requests.Session(pool, context)

print(f"Fetching from {TEXT_URL} with certificate (should succeed)")
try:
    response = requests.get(TEXT_URL)
except Exception as e:
    print(f"Unexpected exception: {e}")
else:
    print(f"{response.status_code=}, should be 200 OK")
```
2022-10-10 15:53:56 -05:00
Jeff Epler
c98174eea5
Add support for SSL client certificate (load_cert_chain)
Tested with badssl.com:

 1. Get client certificates from https://badssl.com/download/
 2. Convert public portion with `openssl x509 -in badssl.com-client.pem -out CIRCUITPY/cert.pem`
 3. Convert private portion with `openssl rsa -in badssl.com-client.pem -out CIRCUITPY/privkey.pem` and the password `badssl.com`
 4. Put wifi settings in CIRCUITPY/.env
 5. Run the below Python script:

```py
import os
import wifi
import socketpool
import ssl
import adafruit_requests

TEXT_URL = "https://client.badssl.com/"
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))

pool = socketpool.SocketPool(wifi.radio)
context = ssl.create_default_context()
requests = adafruit_requests.Session(pool, context)

print(f"Fetching from {TEXT_URL} without certificate (should fail)")
response = requests.get(TEXT_URL)
print(f"{response.status_code=}, should be 400 Bad Request")
input("hit enter to continue\r")

print("Loading client certificate")
context.load_cert_chain("/cert.pem", "privkey.pem")
requests = adafruit_requests.Session(pool, context)

print(f"Fetching from {TEXT_URL} with certificate (should succeed)")
response = requests.get(TEXT_URL)
print(f"{response.status_code=}, should be 200 OK")
```
2022-10-10 15:10:53 -05:00
Hosted Weblate
2ad5c11ca9
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2022-10-10 21:13:35 +02:00
Hosted Weblate
83fc85cb6f
Merge remote-tracking branch 'origin/main' 2022-10-10 21:13:32 +02:00
flom84
81d227de73 Use types from circuitpython. 2022-10-10 20:55:44 +02:00
Florin Maticu
ab1de66dd3 Remove redundant header files. 2022-10-10 20:37:31 +02:00
Boran Roni
3a5eb31b4e
Translated using Weblate (Turkish)
Currently translated at 14.5% (145 of 997 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/tr/
2022-10-10 20:23:14 +02:00
Dan Halbert
14c9028c1f
Merge pull request #7026 from dhalbert/minor-space-savings
save about 112 bytes
2022-10-10 13:55:56 -04:00
Dan Halbert
de95463deb
Merge pull request #7023 from dhalbert/wifi-scanning-fixes
update esp-idf; allow start/stop channels in wifi scanning
2022-10-10 13:54:54 -04:00
Dan Halbert
8d344459cd
Merge pull request #7021 from jepler/pico-w-vbus-sense
pico w: pins improvements
2022-10-10 11:56:30 -04:00
Dan Halbert
6dcbb61081 fix test that used MpyError 2022-10-09 20:27:39 -04:00
Dan Halbert
86a0f9a861 save about 112 bytes 2022-10-09 19:22:39 -04:00
Dan Halbert
747dc7746d handle scan channel bounds but note they do nothing for RP2040 CYW43 2022-10-07 16:22:17 -04:00
Dan Halbert
21c0c4c1a6 update esp-idf; allow start/stop channels in wifi scanning 2022-10-07 15:29:09 -04:00
MicroDev
fc549fe345
Merge pull request #7014 from jepler/restore-nvm-module
restore nvm module
2022-10-08 00:12:41 +05:30
MicroDev
858a1ff253
Merge pull request #7022 from tekktrik/doc/fix-nested-list
Fixed nested unordered list rendering
2022-10-07 22:18:41 +05:30
Alec Delaney
ab1a7ebcd5
Fixed nested unordered list rendering
Also changed to dashes just to remain stylistically similar to the other unordered lists.
2022-10-07 11:13:45 -04:00
Dan Halbert
78b278e091 disable rainbowio on arduino_zero 2022-10-07 10:39:30 -04:00
Jeff Epler
f882571366
pico w: pins improvements
Closes: #7017

 * Remove the 'GP23' alias for CYW1
 * Remove the 'CYW0' alias for CYW0
 * Switch VBUS_SENSE to CYW2, remove 'GP24' alias

Code that wants to use SMPS_MODE, VBUS_SENSE and LED while being
portable to the W and non-W variants should use those names, not alias
names.

 * Remove A3 / VOLTAGE_MONITOR

Right now this cannot be used. The ability to check the voltage monitor
should be added back in some fashion in the future.
2022-10-07 08:48:36 -05:00
Dan Halbert
ab32d2a8b8
Merge pull request #7018 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-10-07 08:35:46 -04:00
Hosted Weblate
89260c5bfc
Merge remote-tracking branch 'origin/main' 2022-10-07 14:32:26 +02:00
Dan Halbert
041885da1b
Merge pull request #7011 from jepler/pico-w-resize-circuitpy-again
switch flash split to leave 512kB for CIRCUITPY
2022-10-07 08:32:18 -04:00
Hosted Weblate
3d0a7e6e58
Merge remote-tracking branch 'origin/main' 2022-10-07 04:46:10 +02:00
MicroDev
c7f6303041
Merge pull request #7019 from Neradoc/add-CywPin-class-not-string
Have cyw43.CywPin reference the class, not a string
2022-10-07 08:16:03 +05:30
Neradoc
3a6382d1ea cyw43.CywPin should be the class, not a string 2022-10-07 02:11:05 +02:00
Hosted Weblate
a673ee73c4
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2022-10-07 00:32:24 +02:00
Mark
6b0c08682c
Merge pull request #7016 from jepler/remove-multiterminal
Remove multiterminal
2022-10-06 17:32:08 -05:00
Dan Halbert
833f55922c
Remove multiterminal
This module has not been built in years, since the (removed) esp8266 port.
Delete the code, as it is not likely to be useful in its current form.

Closes: #7015
2022-10-06 14:02:47 -05:00
Dan Halbert
c45e085fc4
Merge pull request #7010 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-10-06 14:50:09 -04:00
Jeff Epler
f431b2459c
restore nvm module 2022-10-06 13:18:19 -05:00
Jeff Epler
644d293641
Fix CIRCUITPY drive offset in flash correctly, accounting for NVM
.. and fix nvm to read/right the correct area.

.. putting a comment in link.ld to explain it all

Closes #7012
2022-10-06 12:39:46 -05:00
Jeff Epler
07cd2ff065
restore 4kB gap pending resolution of #7011 2022-10-06 11:20:48 -05:00
Hosted Weblate
21510b2e73
Merge remote-tracking branch 'origin/main' 2022-10-06 17:20:17 +02:00
Dan Halbert
8d82e4ba5f
Merge pull request #7008 from MicroDev1/patch
Cleanup `mpconfigboard.mk` of espressif boards
2022-10-06 11:20:11 -04:00
Jeff Epler
6e2c24083a
switch flash split to leave 512kB for CIRCUITPY 2022-10-06 10:12:22 -05:00