8000 Stable update (#237) · pycom/pycom-micropython-sigfox@d1c5ea9 · 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.

Commit d1c5ea9

Browse files
authored
Stable update (#237)
* Squashed commit of the following: commit a8966d1 Author: iwahdan88 <islam@pycom.io> Date: Fri Nov 23 12:32:15 2018 +0100 Firmware version [v1.18.1.r6] -Fixed issue of LTE connection termination when `lte.isattached()` is called after PPP interface established commit 6d96f70 Author: iwahdan88 <islam@pycom.io> Date: Fri Nov 16 15:26:37 2018 +0100 Bug fixes [1.18.1.r5] - Fixed problem in `lte.isconnected` that always sets PPP state to Attached - Improved `socket.getaddrinfo` to only resolve name if avilable interfaces are up - Fixed bug of not removing NICs after the interface is de-initialized commit dfa1176 Author: Christian Ehlers <cehlers@pycom.io> Date: Mon Nov 12 00:54:43 2018 +0100 LTE class bug fixes [1.18.1.r4] commit 3aac0f3 Author: Christian Ehlers <cehlers@pycom.io> Date: Thu Nov 8 05:11:48 2018 +0100 Updated LTE stack / sqnsupgrade [1.18.1.r3] New functions: pppsuspend() pppresume() New command line parameters attach(apn="default') connect(legacy=False) dettach(reset=False) deinit(dettach=True, reset=False) send_at_cmd(delay=10000) New Sequans firmware updater supporting FFF mode for differential upgrades commit 4d00fa7 Author: Christian Ehlers <cehlers@pycom.io> Date: Thu Nov 8 05:07:27 2018 +0100 Mass update copyright * Updated Jenkins for new Integration center setup * esp32/SIPY: fixed pins.csv * esp32/modlte: Added support for Band 5,8 * lib/lora, drivers: General fixes and improvements to the LoRaWAN stack. * esp32/util: fixed problem in antenna switch in newer esp32 chip models * esp32/modthreadport: fixed Issue with memory leak in lock creation * esp32/machuart: solved problem with UART single pin (for deepsl… * esp32/lte: fixed high deepsleep current issue when LTE not initialised * esp32/bootloader: added delay before RGB led init * esp32/micropython: Exposed keyboard interrupt control to micropython * esp32:updated Pycom version * Fixed compilation error * ESP32: Add control for the Ctrl-F hot key #139 from #139 * Sqnsupgrade 1.2.1 Update .gitignore to include additional Eclipse configuration files * Update Jenkinsfile Update devicename for MacOS based IC * Update Jenkinsfile Fix PATH for Python3
1 parent cae9f7f commit d1c5ea9

File tree

149 files changed

+1603
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1603
-569
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# Build directory
2424
######################
2525
build/
26+
build-*/
2627

2728
# Test failure outputs
2829
######################
@@ -50,3 +51,6 @@ secure-bootloader-key.bin
5051
flash_encryption_key.bin
5152

5253
.DS_Store
54+
org.eclipse.cdt.ui.prefs
55+
org.eclipse.cdt.core.prefs
56+
language.settings.xml

Jenkinsfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
def buildVersion
22
def boards_to_build = ["WiPy", "LoPy", "SiPy", "GPy", "FiPy", "LoPy4"]
3-
def boards_to_test = ["Pycom_Expansion3_Py00ec5f", "Pycom_Expansion3_Py9f8bf5"]
3+
def boards_to_test = ["1b6fa1", "00ec51"]
44

55
node {
66
// get pycom-esp-idf source
77
stage('Checkout') {
88
checkout scm
99
sh 'rm -rf esp-idf'
10-
sh 'git clone --recursive -b master https://github.com/pycom/pycom-esp-idf.git esp-idf'
11-
sh 'git -C esp-idf checkout 4eab4e1b0e47c73b858c6b29d357f3d30a69c074'
12-
sh 'git -C esp-idf submodule update'
10+
sh 'git clone --depth=1 --recursive -b master https://github.com/pycom/pycom-esp-idf.git esp-idf'
1311
}
1412

1513
PYCOM_VERSION=get_version()
@@ -119,11 +117,12 @@ def testBuild(short_name) {
119117
dir('tests') {
120118
timeout(30) {
121119
// As some tests are randomly failing... enforce script always returns 0 (OK)
122-
sh './run-tests --target=esp32-' + board_name_u + ' --device ' + device_name + ' || exit 0'
123-
}
120+
sh '''export PATH=$PATH:/usr/local/bin;
121+
./run-tests --target=esp32-''' + board_name_u + ' --device ' + device_name + ' || exit 0'
124122
}
125-
sh 'python esp32/tools/pypic.py --port ' + device_name +' --enter'
126-
sh 'python esp32/tools/pypic.py --port ' + device_name +' --exit'
123+
}
124+
sh 'python esp32/tools/pypic.py --port ' + device_name +' --enter'
125+
sh 'python esp32/tools/pypic.py --port ' + device_name +' --exit'
127126
}
128127
}
129128
}
@@ -150,6 +149,6 @@ def get_remote_name(short_name) {
150149
}
151150

152151
def get_device_name(short_name) {
153-
return "/dev/serial/by-id/usb-" + short_name + "-if00"
152+
return "/dev/tty.usbmodemPy" + short_name + " "
154153
}
155154

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Expansion Board 2.0 users, please connect ``P2`` to ``GND`` and then reset the b
157157

158158
### Prerequisites
159159

160-
$ export $IDF_PATH=<pycom-esp-idf_PATH>
160+
$ export IDF_PATH=<pycom-esp-idf_PATH>
161161
$ cd esp32
162162

163163
Hold valid keys for Flash Encryption and Secure Boot; they can be generated randomly with the following commands:

docs/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2323
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
THE SOFTWARE.
2525

26-
Copyright (c) 2016, Pycom Limited.
26+
Copyright (c) 2018, Pycom Limited.
2727

2828
This software is licensed under the GNU GPL version 3 or any
2929
later version, with permitted additional terms. For more information

drivers/sx127x/sx1272/sx1272.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is derived from the MicroPython project, http://micropython.org/
33
*
4-
* Copyright (c) 2016, Pycom Limited and its licensors.
4+
* Copyright (c) 2018, Pycom Limited and its licensors.
55
*
66
* This software is licensed under the GNU GPL version 3 or any later version,
77
* with permitted additional terms. For more information see the Pycom Licence
@@ -234,17 +234,14 @@ bool SX1272IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
234234
{
235235
bool status = true;
236236
int16_t rssi = 0;
237-
uint32_t carrierSenseTime = 0;
238237

239238
SX1272SetModem( modem );
240239

241240
SX1272SetChannel( freq );
242241

243242
SX1272SetOpMode( RF_OPMODE_RECEIVER );
244243

245-
DelayMs( 2 );
246-
247-
carrierSenseTime = TimerGetCurrentTime( );
244+
DelayMs( 1 );
248245

249246
// Perform carrier sense for maxCarrierSenseTime
250247
do {
@@ -254,7 +251,9 @@ bool SX1272IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
254251
status = false;
255252
break;
256253
}
257-
} while( TimerGetElapsedTime( carrierSenseTime ) < maxCarrierSenseTime );
254+
DelayMs( 1 );
255+
maxCarrierSenseTime -= 1;
256+
} while( maxCarrierSenseTime > 0 );
258257
SX1272SetSleep( );
259258
return status;
260259
}

drivers/sx127x/sx1276/sx1276.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is derived from the MicroPython project, http://micropython.org/
33
*
4-
* Copyright (c) 2016, Pycom Limited and its licensors.
4+
* Copyright (c) 2018, Pycom Limited and its licensors.
55
*
66
* This software is licensed under the GNU GPL version 3 or any later version,
77
* with permitted additional terms. For more information see the Pycom Licence
@@ -255,17 +255,14 @@ bool SX1276IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
255255
{
256256
bool status = true;
257257
int16_t rssi = 0;
258-
uint32_t carrierSenseTime = 0;
259258

260259
SX1276SetModem( modem );
261260

262261
SX1276SetChannel( freq );
263262

264263
SX1276SetOpMode( RF_OPMODE_RECEIVER );
265264

266-
DelayMs( 2 );
267-
268-
carrierSenseTime = TimerGetCurrentTime( );
265+
DelayMs( 1 );
269266

270267
// Perform carrier sense for maxCarrierSenseTime
271268
do {
@@ -275,7 +272,9 @@ bool SX1276IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
275272
status = false;
276273
break;
277274
}
278-
} while( TimerGetElapsedTime( carrierSenseTime ) < maxCarrierSenseTime );
275+
DelayMs( 1 );
276+
maxCarrierSenseTime -= 1;
277+
} while( maxCarrierSenseTime > 0 );
279278
SX1276SetSleep( );
280279
return status;
281280
}

esp32/application.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, Pycom Limited.
2+
# Copyright (c) 2018, Pycom Limited.
33
#
44
# This software is licensed under the GNU GPL version 3 or any
55
# later version, with permitted additional terms. For more information

esp32/boards/FIPY/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/boards/GPY/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/boards/LOPY/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/boards/LOPY4/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/boards/SIPY/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/boards/SIPY/pins.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ G16,GPIO12,P9
1111
G17,GPIO13,P10
1212
G22,GPIO22,P11
1313
G28,GPIO21,P12
14-
G5,GPI37,P13
15-
G4,GPI36,P14
14+
G5,GPI36,P13
15+
G4,GPI37,P14
1616
G0,GPI38,P15
1717
G3,GPI39,P16
1818
G31,GPI35,P17

esp32/boards/WIPY/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/boards/esp32_prefix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is derived from the MicroPython project, http://micropython.org/
33
*
4-
* Copyright (c) 2016, Pycom Limited and its licensors.
4+
* Copyright (c) 2018, Pycom Limited and its licensors.
55
*
66
* This software is licensed under the GNU GPL version 3 or any later version,
77
* with permitted additional terms. For more information see the Pycom Licence

esp32/boards/make-pins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This file is derived from the MicroPython project, http://micropython.org/
44
#
5-
# Copyright (c) 2016, Pycom Limited and its licensors.
5+
# Copyright (c) 2018, Pycom Limited and its licensors.
66
#
77
# This software is licensed under the GNU GPL version 3 or any later version,
88
# with permitted additional terms. For more information see the Pycom Licence

esp32/bootloader/bootmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/bootloader/bootmgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/bootloader/mperror.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information
@@ -60,6 +60,8 @@ void mperror_init0 (void) {
6060
gpio_config(&gpioconf);
6161

6262
mperror_heart_beat.enabled = true;
63+
//delay introduced to separate last falling edge of signal and next color code
64+
ets_delay_us(300);
6365
mperror_heartbeat_switch_off();
6466
}
6567

esp32/fatfs/src/drivers/sd_diskio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
*
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/fatfs/src/drivers/sd_diskio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Pycom Limited.
2+
* Copyright (c) 2018, Pycom Limited.
33
* 10000
44
* This software is licensed under the GNU GPL version 3 or any
55
* later version, with permitted additional terms. For more information

esp32/frozen/LTE/sqnsbr.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Copyright (c) 2018, Pycom Limited.
2+
#
3+
# This software is licensed under the GNU GPL version 3 or any
4+
# later version, with permitted additional terms. For more information
5+
# see the Pycom Licence v1.0 document supplied with this file, or
6+
# available at https://www.pycom.io/opensource/licensing
7+
18
class bootrom(object):
29
import binascii
310

esp32/frozen/LTE/sqnstp.py

100644100755
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
#!/usr/bin/env python
2-
2+
#################################################################
3+
#
4+
# Copyright (c) 2011 SEQUANS Communications.
5+
# All rights reserved.
6+
#
7+
# This is confidential and proprietary source code of SEQUANS
8+
# Communications. The use of the present source code and all
9+
# its derived forms is exclusively governed by the restricted
10+
# terms and conditions set forth in the SEQUANS
11+
# Communications' EARLY ADOPTER AGREEMENT and/or LICENCE
12+
# AGREEMENT. The present source code and all its derived
13+
# forms can ONLY and EXCLUSIVELY be used with SEQUANS
14+
# Communications' products. The distribution/sale of the
15+
# present source code and all its derived forms is EXCLUSIVELY
16+
# RESERVED to regular LICENCE holder and otherwise STRICTLY
17+
# PROHIBITED.
18+
#
19+
#################################################################
320
import struct
421
import time
522
import os
@@ -59,9 +76,9 @@ def hexdump(src, length=32):
5976
lines = []
6077
for c in range(0, len(src), length):
6178
chars = src[c:c+length]
62-
hex = ' '.join(['%02x' % x for x in chars])
63-
printable = ''.join(['%s' % ((x <= 127 and FILTER[x]) or '.') for x in chars])
64-
lines.append('%04x %-*s %s\n' % (c, length*3, hex, printable))
79+
hex = ' '.join(["%02x" % ord(x) for x in chars])
80+
printable = ''.join(["%s" % ((ord(x) <= 127 and FILTER[ord(x)]) or '.') for x in chars])
81+
lines.append("%04x %-*s %s\n" % (c, length*3, hex, printable))
6582
print(''.join(lines))
6683

6784

0 commit comments

Comments
 (0)
0