8000 Rc6 by peter-pycom · Pull Request #416 · pycom/pycom-micropython-sigfox · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Rc6 #416

Merged
merged 104 commits into from
Feb 28, 2020
Merged

Rc6 #416

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
54b8e88
BLE: Allow static passwords, remove bonded when pin changes
oligauc Oct 8, 2019
0b8c8a8
Merge pull request #64 from pycom/sec_ble
Oct 8, 2019
90eb9de
Update Jenkins File
Oct 7, 2019
6638953
mods/pyblte.c: Fix the lenght field for AT commands
robert-hh Oct 7, 2019
415af4d
mods/pybadc.c: Fix the argument handling of bits=x for adc.init()
robert-hh Oct 7, 2019
aae6c26
Restore previous wifi_on_boot behaviour.
Xykon Oct 8, 2019
3024c89
Bugfixes
Xykon Oct 8, 2019
b16e92d
Update Jenkinsfile and pycom_version.h
Xykon Oct 8, 2019
881be0e
Merge branch 'Dev' of https://github.com/pycom/pycom-micropython-sigfox
Oct 14, 2019
57b1110
Update Pybytes to 1.2.0 for new release 1.20.1.r2
Xykon Oct 30, 2019
8bc1f0c
Changes needed for idf 3.3.
geza-pycom Nov 13, 2019
36763fa
refactor: updated pybytes-devices to 1.3.0
jirkadev Nov 19, 2019
a57ae0c
chore: updated .gitignore file
jirkadev Nov 19, 2019
aca4712
Merge pull request #65 from husigeza/idf_3.3_support
geza-pycom Nov 19, 2019
5ecc3d0
Revert "Merge pull request #65 from husigeza/idf_3.3_support" (#67)
geza-pycom Nov 22, 2019
2c2c229
Update _pybytes_connection.py
Xykon Nov 25, 2019
9f1479a
Support Sigfox registration for Pybytes
Xykon Nov 30, 2019
8ad73f9
Update _pybytes_constants.py
Xykon Nov 30, 2019
3697c2a
Update pycom_version.h
Xykon Nov 30, 2019
3c65d90
PYFW-390: Update .gitignore to allow esp32/lib libraries to be updated
geza-pycom Nov 30, 2019
c5d4973
Merge pull request #69 from husigeza/PYFW-390
geza-pycom Nov 30, 2019
188ffd2
MDNS advertisement works
geza-pycom Nov 17, 2019
0ac25ff
Adding text to advertisement works
geza-pycom Nov 17, 2019 8000
c79bb20
Query works
Nov 22, 2019
f65490d
Free up internal query results
Nov 26, 2019
1902f34
Change host_name to hostname
Nov 29, 2019
996f300
Rename text to txt
Nov 29, 2019
c2c64b5
Adding libmdns.a to esp32/lib
geza-pycom Nov 30, 2019
c40694a
Merge branch 'master' into pybytes-devices-v1.3.0
Xykon Nov 30, 2019
2071a1f
Update modpycom.c
Xykon Nov 30, 2019
004c97a
Release updates & bugfixes
Xykon Nov 30, 2019
2b017e1
Update sqnsupgrade.py
Xykon Nov 30, 2019
ade08b6
Update pycom_version.h
Xykon Nov 30, 2019
9978dfd
Update _pybytes_config.py
Xykon Nov 30, 2019
9d29de9
Merge pull request #68 from husigeza/mdns
geza-pycom Dec 3, 2019
d19e340
Adding gdbinit
geza-pycom Dec 18, 2019
7166cc0
Adding scripts for PyJTAG and short Readme
geza-pycom Jan 7, 2020
6f1451e
Update readme, move gdbinit
geza-pycom Jan 7, 2020
284cd01
Merge pull request #72 from husigeza/PyJTAG
geza-pycom Jan 11, 2020
0373d7e
re-integrate sigfox sources
peter-pycom Jan 13, 2020
34408c7
Merge pull request #66 from pycom/pybytes-devices-v1.3.0
Jan 14, 2020
e1df781
Merge pull request #73 from doniks/sigfox_reintegrate
doniks Jan 16, 2020
9a2d6c1
typo
peter-pycom Dec 6, 2019
ae96346
pyjtag clarifications
doniks Jan 20, 2020
c39484b
clarification
peter-pycom Jan 20, 2020
05c58d5
Merge pull request #75 from doniks/sigfox-readme-fix
doniks Jan 21, 2020
a87cdd9
update sigfox libraries - prep for LoPy4 certification in Regions 1,2…
peter-pycom Jan 21, 2020
f63954f
Merge pull request #74 from pycom/doniks-pyjtag-docs-improvements
doniks Jan 22, 2020
9493536
Replace xQueueSendFromISR call with xQueueSend when called from BLE e…
geza-pycom Jan 24, 2020
d6c1ccb
Merge pull request #80 from husigeza/Minor_fixes_BLE_Lora
geza-pycom Jan 28, 2020
e6bc45f
Replacing "switch-case" with "if-else if" in Region.c to avoid genera…
geza-pycom Jan 28, 2020
e87e98f
Merge pull request #81 from husigeza/Fix_LoraRegion
geza-pycom Jan 28, 2020
33ffef7
Merge pull request #76 from doniks/sigfox-ready-for-cert
doniks Jan 29, 2020
6756537
BLE characteristic update messages are lost if they sent too frequently
geza-pycom Jan 28, 2020
b410946
Merge pull request #82 from husigeza/PYFW-395
geza-pycom Jan 30, 2020
013147c
PYFW-394: mod_ssl_setup_socket() allocates memory while GIL is not lo…
geza-pycom Jan 28, 2020
d04991c
PYFW-401: Mutex of LFS can be locked in wlan_read_file or mod_ssl_rea…
geza-pycom Jan 28, 2020
fbdb44d
PYFW-402: wlan_do_connect() allocates memory while GIL is not locked
geza-pycom Jan 28, 2020
e51543b
PYFW-404: bt_connect_helper() uses MicroPython functions outside of GIL
geza-pycom Jan 28, 2020
492ffd9
PYFW-405: lte_send_at_cmd() uses MicroPython functions outside of GIL
geza-pycom Jan 28, 2020
beebc21
refactor lte_add_band() out of lte_attach()
peter-pycom Feb 4, 2020
150611f
add bands=() parameter to lte.attach()
peter-pycom Feb 4, 2020
01de258
Merge pull request #83 from husigeza/GIL_fixes
geza-pycom Feb 4, 2020
35d737f
PYFW-391: ESP-IDF 3.3.1 support (#86)
geza-pycom Feb 4, 2020
66d7dcd
Add pybytes_on_boot functionality (#87)
Xykon Feb 4, 2020
16ce927
Merge pull request #84 from doniks/lte-multiple-bands-again
Xykon Feb 4, 2020
a356ce7
Update pycom_version.h
Xykon Feb 4, 2020
45c4822
Merge branch 'master' into Dev
Xykon Feb 6, 2020
b3d3ea5
Merge pull request #88 from pycom/Dev
doniks Feb 6, 2020
09d3ee1
Update pycom_version.h
Xykon Feb 9, 2020
ef3384e
Added interface to save and resume SSL sessions
DvdGiessen Jan 28, 2020
3bcb37d
Added typechecks, copyright updated to 2020
knagymate Feb 10, 2020
6b9c880
Merge pull request #89 from husigeza/PR390
geza-pycom Feb 14, 2020
1d3ad0e
Implemented configuration options for BLE security
geza-pycom Feb 14, 2020
1de0f9b
Sigfox: finalizing certification RCZ1, 2, 4
peter-pycom Feb 19, 2020
84b9fd1
Merge pull request #93 from pycom/sigfox_cert_ready
doniks Feb 20, 2020
f2db523
protect sigfox private key
peter-pycom Feb 21, 2020
68c3374
raise exception if NV writing failed
peter-pycom Feb 24, 2020
ac40811
Ignore Visual Studio Code project files
peter-pycom Feb 24, 2020
cfe72ee
add Troubleshooting (#91)
doniks Feb 24, 2020
bc2d085
Merge pull request #94 from pycom/sigfox_private_key
peter-pycom Feb 24, 2020
5df479c
IDF 3.3.1 compiler update
Xykon Feb 26, 2020
b8f24a8
Update sqnsupgrade.py
Xykon Feb 26, 2020
68d2608
Update _pybytes_config.py
Xykon Feb 26, 2020
987adcf
Merge pull request #98 from pycom/1.22.0-98-g4638c4f-IDF-libs-libgcc.…
peter-pycom Feb 26, 2020
d38988a
Update pycom_version.h
Xykon Feb 26, 2020
a25a686
Merge pull request #99 from pycom/update_sqnsupgrade_for_release
peter-pycom Feb 26, 2020
bc41407
Merge pull request #100 from pycom/update_pybytes_for_release
peter-pycom Feb 26, 2020
3e69677
Merge pull request #101 from pycom/update_version
peter-pycom Feb 26, 2020
8d9faa6
Update IDF libraries
Xykon Feb 26, 2020
dddee59
Merge pull request #95 from pycom/ignore_vscode
peter-pycom Feb 27, 2020
77d25aa
Merge pull request #103 from pycom/update-idf-libs
Xykon Feb 27, 2020
237a8fe
sleep in main thread to yield
peter-pycom Feb 27, 2020
a7c6e2c
Update pyexec.c
Xykon Feb 27, 2020
bbf355d
Merge pull request #105 from pycom/fix_thread_tests
Xykon Feb 27, 2020
5c818cb
Fix double build frozen (#102)
peter-pycom Feb 27, 2020
9fb2548
default path and make executable (#104)
peter-pycom Feb 27, 2020
a0e3edd
Merge pull request #106 from pycom/allow_ctrl-d_when_pybytes_on_boot_…
peter-pycom Feb 28, 2020
88afbf5
update fw_updater to 6e96ea3
peter-pycom Feb 28, 2020
3e7e176
Merge pull request #108 from pycom/update_fwup
Xykon Feb 28, 2020
77b511a
Update updater.py and disable pybytes in Jenkins
peter-pycom Feb 28, 2020
a53e651
fix
peter-pycom Feb 28, 2020
07cde9e
Merge pull request #109 from pycom/update_fwup_and_Jenkins
peter-pycom Feb 28, 2020
867d922
1.20.2.rc6
peter-pycom Feb 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ user.props
.pydevproject
.settings
.launch
.vscode

# Key files (for Flash Encryption and Secure Boot)
secure_boot_signing_key.pem
Expand Down
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def flashBuild(short_name, version, variant) {
unstash 'esp32Tools'
unstash 'tests'
unstash 'tools'
sh 'python esp32/tools/fw_updater/updater.py --port ' + device_name +' flash -t esp32/build-' + variant + '/' + board_name + '-' + version + '.tar.gz'
sh 'python esp32/tools/fw_updater/updater.py --noexit --port ' + device_name +' flash -t esp32/build-' + variant + '/' + board_name + '-' + version + '.tar.gz'
sh 'python esp32/tools/fw_updater/updater.py --port ' + device_name +' pybytes --auto_start False'
}
}
}
Expand Down
10000 15 changes: 15 additions & 0 deletions docs/library/ussl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ network sockets, both client-side and server-side.

SSL sockets inherit all methods and from the standard sockets, see the :mod:`usocket` module.

.. function:: ssl.save_session(sock)

Takes an instance sock of ssl.SSLSocket, and returns an instance of ssl.SSLSession representing saved session data from the socket, which can be used to resume a SSL session later. Example::

import socket
import ssl
addr = socket.getaddrinfo('www.google.com', 443)[0][-1]
sock_one = ssl.wrap_socket(socket.socket())
sock_one.connect(addr) # performs a full ssl handshake
session = ssl.save_session(sock_one)
sock_one.close()
sock_one = None
sock_two = ssl.wrap_socket(socket.socket(), saved_session=session)
sock_two.connect(addr) # resumes using saved session, resulting in a faster handshake

Exceptions
----------

Expand Down
50 changes: 39 additions & 11 deletions esp32/PyJTAG/Readme.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
# Short readme for how to use the PyJTAG

## Setup
Generally follow these rules to setup JTAG debugging on your OS: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html

Download link for OpenOCD for ESP32 from Espressif: https://github.com/espressif/openocd-esp32/releases


## Build the firmware
Create the firmware with `BTYPE=debug` flag.
Do not use the default pins assigned to UART, SPI, CAN because they are used by the JTAG. Pins not to be used: P4, P9, P10, P23

Detailed information are here: https://pycomiot.atlassian.net/wiki/spaces/FIR/pages/966295564/Usage+of+PyJTAG
Note: Do not use the default pins assigned to UART, SPI, CAN because they are used by the JTAG. Pins not to be used: P4, P9, P10, P23.

## Setup the PyJTAG board

Setup the PyJTAG board's switches:
PyJTAG's switches:
* ESP32 JTAG: all turned ON
* ESP32 B.LOADER: all turned ON except SAFE_BOOT_SW which is OFF
* TO LTE UART 1/2: does not matter
* CURRENT SHUNTS: connected

Place the Pycom board with the reset button towards the Current Shunts.

Generally follow these rules to setup JTAG debugging on your OS: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html

(Download link of OpenOCD for ESP32 from Espressif: https://github.com/espressif/openocd-esp32/releases)

Connect the PyJTAG via usb. You see four new USB devices:
Place the Pycom board with the reset button towards the Current Shunts. Now connect the PyJTAG via usb. You will see four new USB devices. On Linux this will look like this:
```
$ lsusb -d 0403:
Bus 001 Device 010: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/ F987 FIFO IC
$ ls /dev/ttyUSB?
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
```

## Start OCD

Go to `esp32` folder in Firmware-Development repository and run:
```
PATH_TO_OPENOCD/bin/openocd -s PATH_TO_OPENOCD/share/openocd/scripts -s PyJTAG -f PyJTAG/interface/ftdi/esp32-pycom.cfg -f PyJTAG/board/esp32-pycom.cfg
Expand All @@ -49,9 +53,33 @@ Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica)
Info : Listening on port 3333 for gdb connections
```

## Start GDB

When OpenOCD is running, start GDB from `esp32` folder. Assuming you have a FIPY:
```
xtensa-esp32-elf-gdb -x PyJTAG/gdbinit build/FIPY/debug/application.elf
```

In `PyJTAG/gdbinit` a breakpoint is configured at `TASK_Micropython`, so execution should stop there first.
In `PyJTAG/gdbinit` a breakpoint is configured at `TASK_Micropython`, so execution should stop there first:

```
Thread 1 hit Temporary breakpoint 1, TASK_Micropython (pvParameters=0x0) at mptask.c:136
```


## REPL

Connect to `/dev/ttyUSB2` to reach the REPL terminal over usb serial. E.g. using pymakr in Atom.

## Troubleshooting
If openocd says "Error: Connect failed", try to close gdb and openocd and start over.

If `/dev/ttyUSB0` doesn't show up or disappears, disconnect the PyJTAG board, reconnect and start over.

It can be advisable to use the `gdb` from the latest xtensa toolchain, even if an earlier version is used to build the firmware.

If `gdb` does not reach the `Thread 1 hit Temporary breakpoint ...` line, close and reopen `gdb`.

## Extra
A few more details are here: https://pycomiot.atlassian.net/wiki/spaces/FIR/pages/966295564/Usage+of+PyJTAG

2 changes: 1 addition & 1 deletion esp32/application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ SRC_QSTR_AUTO_DEPS +=
BOOT_LDFLAGS = $(LDFLAGS) -T esp32.bootloader.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.bootloader.rom.ld -T esp32.rom.spiram_incompatible_fns.ld

# add the application linker script(s)
APP_LDFLAGS += $(LDFLAGS) -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld
APP_LDFLAGS += $(LDFLAGS) -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld

# add the application specific CFLAGS
CFLAGS += $(APP_INC) -DMICROPY_NLR_SETJMP=1 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -DWITH_POSIX
Expand Down
Binary file modified esp32/bootloader/lib/libbootloader_support.a
Binary file not shown.
Binary file modified esp32/bootloader/lib/libefuse.a
Binary file not shown.
Binary file modified esp32/bootloader/lib/liblog.a
Binary file not shown.
Binary file modified esp32/bootloader/lib/libmicro-ecc.a
Binary file not shown.
Binary file modified esp32/bootloader/lib/libsoc.a
Binary file not shown.
Binary file modified esp32/bootloader/lib/libspi_flash.a
Binary file not shown.
Loading
0