Compare commits

...

428 commits

Author SHA1 Message Date
Ha Thach
4336fbe17a
Merge pull request #72 from adafruit/fix-tls-socket
Fix tls socket race condition
2025-07-28 21:48:33 +07:00
hathach
fa599780ee
bump up version, comment out socket reset if not connected in getClientStateTcp().
remove
2025-07-28 14:54:26 +07:00
hathach
91fc6766da
use socket mutex to prevent race condition.
revert gpio0Updater task priority to 1
2025-07-26 18:35:05 +07:00
hathach
28ce73b8a6
change gpio0Updater task priority to 2 (higher than loop task) to prevent race condition when checking socket connected() and available() 2025-07-25 23:38:22 +07:00
hathach
54ee662201
update to esp-idf v5.5 and arduino-esp32 v3.3.0 2025-07-25 23:21:43 +07:00
Ha Thach
36c78d4d4a
Merge pull request #70 from adafruit/idf-5.x
upgrade to Idf v5.3.2, added esp32c6
2025-06-26 22:12:14 +07:00
hathach
81c521d286
use base mac for getMACaddr() if interface is not up 2025-06-10 11:00:40 +07:00
hathach
40b28eae7e
move sdkconfig and board.h to boards folder
update combine.py to take build folder and output filename
run combine.py as postbuild
2025-06-03 11:02:28 +07:00
hathach
662b31ebc2
build need -DBOARD= instead of IDF_TARGET to allow flexible pinout for variant 2025-06-03 02:27:21 +07:00
hathach
74f8e1f93a
fix GPIO0 (esp32) GPIO9 (s6) as wifi available pin due to typo. Make our hook as IRAM and also correct the context where handleWiFiReceive() is called 2025-03-19 12:38:36 +07:00
hathach
07096cd812
add target for combined binary e.g NINA-ADAFRUIT-esp32, upload combined as artifacts and release asseets 2025-03-18 20:08:28 +07:00
hathach
82324914fe
update sketch.ino.cpp as closed as upstream
fix c6 compile issue in release build type
2025-03-18 16:12:42 +07:00
hathach
7f17ca5f40
- parameterize SPIs & UART pin setting
- move SPIS definition to sketch.ino.cpp
- max log level is info, debug will delay the initial boot causing reading CS incorrectly for BT and wifi mode (only available for 750ms)
2025-03-18 15:32:40 +07:00
hathach
f7c4cde6b9
BT works tested with esp32 2025-03-17 22:16:05 +07:00
hathach
5a6b5b3451
separate esp32 and c6 sdkconfig
testing BLE controller
2025-03-17 16:07:39 +07:00
Dan Halbert
1ad988ac30 more precise return value check on beginPacket() 2025-03-16 20:54:10 -04:00
Dan Halbert
a85404884e check WiFi.hostByName() return value properly 2025-03-16 19:27:54 -04:00
Dan Halbert
4d89dd36c2 fix combine.py to handle different bootloader offstes 2025-03-16 11:39:01 -04:00
Dan Halbert
74339a4809 use default root cert bundle provided by ESP-IDF 2025-03-14 14:53:19 -04:00
hathach
309a3ae589
try upload artifact with release/debug build 2025-03-12 12:08:17 +07:00
hathach
fa09a76bf7
wifitest work wwith esp32c6 2025-03-12 11:21:55 +07:00
hathach
85d1d6d8ea
fix esp32c6 compile issue 2025-03-11 22:43:39 +07:00
hathach
633451610d
update ci build 2025-03-11 21:29:10 +07:00
hathach
e1fcb6cbfc
use log_i() (default), log_d() is enabled when CMAKE_BUILD_TYPE=DEBUG is used. Also initial debug is also enable with debug build 2025-03-11 21:13:22 +07:00
hathach
0f3d2efb4f
remove managed_components 2025-03-11 20:59:53 +07:00
Dan Halbert
0cd6ae693f wip: preparing for c6; use sdkconfig.defaults, don't check in sdkconfig 2025-03-06 21:43:55 -05:00
Dan Halbert
1d83f417ed wip: HTTP working 2025-03-06 16:54:36 -05:00
Dan Halbert
1e8cfaad0d wip: compiles; crashes early; debug printing now working 2025-03-04 20:35:43 -05:00
Dan Halbert
a08e8cbb36 wip: restructure to use arduino-esp32 as a component 2025-03-03 23:32:26 -05:00
Dan Halbert
d6cc9859ce wip: use esp32-arduino libraries a lot more 2025-03-02 22:52:37 -05:00
Dan Halbert
14a5007afc wip: cmake conversion 2025-02-22 20:50:27 -05:00
Dan Halbert
dfc0c29971
Merge pull request #62 from adafruit/sync-upstream
Sync with upstream
2025-02-09 15:46:36 -05:00
Dan Halbert
27407c65db update certificates submodule; roots.pem got smaller 2025-02-09 15:23:48 -05:00
Dan Halbert
c432f797d6 allow longer version numbers 2025-02-09 15:23:08 -05:00
Dan Halbert
8638e99752 further reduce sockets to 6 to prevent intermittent failures 2025-02-08 18:57:35 -05:00
Dan Halbert
9b75975e8e revert '-adafruit' suffix on version number; it breaks fetching version 2025-02-06 19:07:54 -05:00
Dan Halbert
086a0a6c19 update to actions/upload-artifact@v4 2025-02-06 16:29:31 -05:00
Dan Halbert
215ece3283 more flexible version numbers; use adafruit suffix; bump to 2.0.0-adafruit 2025-02-06 16:12:16 -05:00
Dan Halbert
43816f100d manual merge of Arduino-specific trust anchors
From https://github.com/arduino/nina-fw/pull/100/files
2025-02-06 13:16:27 -05:00
Dan Halbert
d7fe1b5d8c Reduce sockets to 7 to avoid heap allocation failure; annotate Adafruit changes; add more debugging support
@hathach was using 8, but I got failures with very simple SSL socket use with 8.
Reducing to 7 fixed the problem. This is also dependent on the size of the roots.pem file.
Reducing the size of roots.pem also helps.
2025-02-06 13:05:36 -05:00
Limor "Ladyada" Fried
0ea40d89db
Merge pull request #65 from FoamyGuy/update_actions_version
update actions version
2024-11-07 09:49:20 -05:00
foamyguy
9bb4034f53 update actions version 2024-11-07 07:12:08 -06:00
Dan Halbert
bc73e26780 rerun 2024-05-02 12:19:17 -04:00
hathach
ca322bcb40 correct build ci 2023-12-21 23:21:44 +07:00
hathach
320ad469bb update ci to upload both release and debug bin firmware 2023-12-21 23:14:48 +07:00
hathach
88dac12ddb reduce CONFIG_LWIP_MAX_SOCKETS from 10 to 8 to save sram for ssl connection 2023-12-21 22:12:11 +07:00
hathach
338408fc78 Merge remote-tracking branch 'arduino/master' into sync-upstream
# Conflicts:
#	CHANGELOG
#	README.md
#	arduino/cores/esp32/wiring_digital.h
#	arduino/libraries/WiFi/src/WiFi.cpp
#	arduino/libraries/WiFi/src/WiFi.h
#	arduino/libraries/WiFi/src/WiFiClient.cpp
#	combine.py
#	data/roots.pem
#	main/CommandHandler.cpp
#	main/sketch.ino.cpp
#	sdkconfig
2023-12-20 00:44:36 +07:00
Ha Thach
b1145b466d
Merge pull request #57 from dhalbert/certificates-submodule
get roots.pem from adafruit/certificates repo
2023-12-19 17:52:02 +07:00
Dan Halbert
fc3c7f770b remove leftover debugging print() in combine.py 2023-12-14 12:14:39 -05:00
Dan Halbert
3e6ff08544 fetch submodules 2023-12-14 11:57:23 -05:00
Dan Halbert
c895779e4a get roots.pem from adafruit/certificates repo 2023-12-14 11:33:25 -05:00
Ha Thach
42f4766ab3
Merge pull request #61 from adafruit/add-action
add gh action
2023-12-13 10:34:58 +07:00
hathach
a399c40f53 reduce version duplication
- combine.py extract version from CommandHandler.cpp
- make load-nina use wildcard to load bin file
2023-12-12 19:04:15 +07:00
hathach
052e25993a more gh action update 2023-12-12 18:16:33 +07:00
hathach
f808187589 gh action upload bin when making release 2023-12-12 18:14:40 +07:00
hathach
fee5612088 try to add gh action 2023-12-12 18:06:42 +07:00
Ibrahim Abdelkader
feca16003a
Merge pull request #87 from JAndrassy/dns_ip
Add a new command to return the DNS IP.
2023-09-18 13:42:38 +03:00
Juraj Andrassy
7a5695dc68 DNS server IP getter handler 2023-09-18 12:39:42 +02:00
Brent Rubell
dffbd447bd
Merge pull request #54 from brentru/fix-windows-linux-upload
Fix Windows and Linux Esptool.py upload error caused by 1.7.5
2023-07-31 14:16:59 -04:00
brentru
d0d1c19b9a bump version to 1.7.6 2023-07-28 15:37:16 -04:00
brentru
3e529cf82f Fix windows and linux upload 2023-07-27 15:25:47 -04:00
Brent Rubell
21205e4005
Merge pull request #51 from brentru/add-io-root-cert-july-23
Add root CA cert for Adafruit IO, July 2023
2023-07-21 13:44:20 -04:00
brentru
dfa76d4d6f update 2023-07-21 13:44:04 -04:00
brentru
45cade91b4 update semver 2023-07-21 12:57:51 -04:00
brentru
e38b13bea7 add root CA for io 2023 july 2023-07-21 12:56:45 -04:00
Martino Facchin
c84aa34067
Merge pull request #79 from JAndrassy/server_accept
support server.accept() for WiFiNINA library
2022-06-09 13:00:35 +02:00
Martino Facchin
77d4881763
Merge branch 'master' into server_accept 2022-06-09 13:00:19 +02:00
Martino Facchin
af252c24be
Update README with info on combine.py 2022-06-09 12:47:20 +02:00
Martino Facchin
016e71eaae
Update CHANGELOG 2022-06-09 12:35:00 +02:00
Martino Facchin
bdb8b39a0d
Merge pull request #81 from iabdalkader/ninafw_bug_fixes
Ninafw bug fixes
2022-05-17 16:34:21 +02:00
iabdalkader
e8c31635e5 CommandHandler: Add BSD-like sockets API. 2022-05-17 12:27:07 +02:00
iabdalkader
cca05d5cf0 CommandHandler: Fix ADC attenuation value. 2022-05-17 12:27:07 +02:00
iabdalkader
495425a9b0 WiFiServer: Return and check error from begin(). 2022-04-25 16:35:17 +02:00
iabdalkader
90e1715e3d Update README.
* Nano RP2040 also requires the `no_reset` flag.
2022-04-25 13:21:07 +02:00
Limor "Ladyada" Fried
d73fe315cc
Merge pull request #41 from FoamyGuy/update_cert
updating cert
2022-02-25 21:43:01 -05:00
foamyguy
8b20b3e2f4 updating cert 2022-02-25 19:32:38 -06:00
Juraj Andrassy
da5aca87cf support server.accept() for WiFiNINA library 2022-01-07 14:55:33 +01:00
Alexander Entinger
63823f9eb3 Release v1.4.8. 2021-07-29 12:45:56 +02:00
Alexander Entinger
77ac756366
Merge pull request #73 from giulcioffi/fix_repeated_status_issue
Fix issue due to repeated status()/connected() call
2021-07-29 12:44:16 +02:00
giulcioffi
e303e391d1 Call peek() when there are no available data to make sure socket gets closed when connection ends 2021-07-29 10:26:14 +02:00
giulcioffi
e4040df857 Revert "Revert #50."
This reverts commit 6f82133a90.
2021-07-29 09:37:14 +02:00
Alexander Entinger
fc6bd42754 Release v1.4.7 2021-06-18 09:17:31 +02:00
Alexander Entinger
09eb519cf4
Merge pull request #71 from arduino/new-cert-list
Add new certificate list and instructions on how to build it.
2021-06-09 14:44:28 +02:00
Alexander Entinger
a33dc6d489 Eliminate commented-out bash code. 2021-06-08 15:25:19 +02:00
Alexander Entinger
a7f3bc2951 Extract constant openssl x509 parameters into variable to avoid duplication by copy. 2021-06-08 15:24:16 +02:00
Alexander Entinger
0d7c4628e7 Cleaning up certificate creation script. 2021-06-08 15:07:07 +02:00
Alexander Entinger
8cc5a433f5 Document how to use and the purpose of the SSL check script. 2021-06-08 15:03:03 +02:00
Alexander Entinger
224ef65d83 Release v1.4.6. 2021-06-08 08:46:33 +02:00
Alexander Entinger
756309ec4d Moving root creation script, adding USTERTRUST CA, generating new roots.pem. 2021-06-08 08:45:31 +02:00
Brent Rubell
0e267bc885
Merge pull request #37 from Gadgetoid/patch-changelog-v1.7.2
Insert v1.7.2 notes into CHANGELOG
2021-06-04 16:05:58 -04:00
Phil Howard
535ddb0d7b Insert v1.7.2 notes into CHANGELOG 2021-06-04 20:33:33 +01:00
Brent Rubell
104c48cb48
Merge pull request #36 from Gadgetoid/patch-set-hostname
Fix setHostname API
2021-06-04 15:17:24 -04:00
pennam
613015ae3f Initial sslcheck script to test roots.pem certificate file 2021-06-04 10:45:17 +02:00
Alexander Entinger
70ec99069c Add new certificate list and instructions on how to build it. 2021-06-04 09:58:28 +02:00
Phil Howard
e1385807c8 Bump version to 1.7.4 2021-06-03 15:04:53 +01:00
Phil Howard
6fc263c282 Fix setHostname API
Slightly modified version of the upstream fix to the set hostname API,
found here: f63b70aa3d

Sets the custom hostname in the system STA_START event, rather than directly. Falls back to "defaultHostname"

Allows a custom client-mode hostname to be set.

Co-authored-by: Riccardo Rizzo <r.rizzo@arduino.cc>
2021-06-02 18:14:18 +01:00
Alexander Entinger
9b4c4355cb
Merge pull request #67 from arduino/rp2040_final
Adding support for Arduino RP2040 Nano Connect
2021-05-05 14:33:11 +02:00
Alexander Entinger
de7f0db6a5
Merge pull request #68 from MattyBoy4444/patch-1
Added ISRG Root X1 for LetsEncrypt
2021-05-04 10:20:08 +02:00
MattyBoy
f857f944cd
Added ISRG Root X1 for LetsEncrypt
Added missing root cert
2021-05-04 03:13:37 -04:00
Martino Facchin
8713b0938d Release 1.4.5 2021-05-01 14:33:06 +02:00
Martino Facchin
c6000b22dc Merge remote-tracking branch 'arduino/master' into rp2040 2021-05-01 14:32:37 +02:00
Martino Facchin
3832dae91b rp2040_connect: change pinmux 2021-05-01 14:32:29 +02:00
Alexander Entinger
51acbd91c0 Release v1.4.4 2021-04-27 11:43:34 +02:00
Alexander Entinger
ac95d6a459
Merge pull request #66 from arduino/fix-reconnection-errors
Fix firmware reconnection errors
2021-04-27 11:39:48 +02:00
Alexander Entinger
d4075376ac Bugfix: Opening a TCP connection when having a running BEARSSL connection leads to a conflict.
BearSSLClient is injected with tcpClients[0], but if a new TCP connection is requested than tcpClients[0] is assigned to the new connection which is of course a conflict with BearSSL which needs this very same WiFiClient instance.
2021-04-26 15:45:54 +02:00
Alexander Entinger
6f82133a90 Revert #50. 2021-04-26 15:43:29 +02:00
Alexander Entinger
eeefeb598f Replacing 'recv' with 'lwip_recv_r' ensures that the desired recv function is called. 2021-04-26 15:42:06 +02:00
Alexander Entinger
054edb8798 Release v1.4.4. 2021-04-13 09:12:33 +02:00
Alexander Entinger
bed5b6268a Fix: There is no need to manually power-up the ADC, as the ADC is powered-up within 'adc1_get_raw' 2021-04-13 08:36:04 +02:00
Alexander Entinger
ae9c8535b5 Add API for configuring a GPIO as INPUT_PULLUP. 2021-04-13 07:17:09 +02:00
Alexander Entinger
a323261c55 Implement analogRead() API which allows to read the value provided at any of the analog pins of the ESP32. 2021-04-12 15:23:41 +02:00
Alexander Entinger
0f9f831086 Implement digitalRead API which allows to read the status of a digital input pin from the host processor. 2021-04-12 14:46:02 +02:00
Brent Rubell
ec9e20f508
Merge pull request #33 from ZodiusInfuser/master
Added INPUT_PULLUP support and let analog write use full PWM range
2021-03-31 11:13:52 -04:00
ZodiusInfuser
0c19f316c3
Merge branch 'master' into master 2021-03-27 12:45:39 +00:00
Brent Rubell
2c3edb8d82
Merge pull request #31 from ajs256/patch-1
Merge in commit 73375c3 from upstream
2021-03-26 16:10:19 -04:00
ZodiusInfuser
6782e16f47 Advanced version by one patch 2021-03-26 15:39:12 +00:00
ZodiusInfuser
d0074840ab Added INPUT_PULLUP support and let analog write use full PWM range 2021-03-22 16:52:06 +00:00
ajs256
4a7e461534
Update version number, part 3 2021-03-17 15:46:19 -07:00
ajs256
197c50ffe5
Update version number, part 2 2021-03-17 15:45:53 -07:00
ajs256
516f3feb9e
Update version numbers, part 1 2021-03-17 15:45:27 -07:00
ajs256
d2726992d8
Merge in commit 73375c3 from upstream
Replace `peek()` with `available()` during connection status check to avoid losing messages.

Closes adafruit#22.
2021-03-04 17:32:51 -08:00
Martino Facchin
6bb97b6a89 rp2040: give LEDs safe defaults 2021-03-01 13:06:55 +01:00
Martino Facchin
92b38f6b39 Fix makefile 2021-03-01 09:54:16 +01:00
Martino Facchin
c3e699de00 Fix gpios for Nano rp2040 connect 2021-03-01 09:48:28 +01:00
Alexander Entinger
443042362d
Merge pull request #62 from giulcioffi/Issue61_lwip_disconn
Do not immediately close connection after 1 failed write
2021-01-29 08:32:09 +01:00
Alexander Entinger
a44bbbb89d Release v1.4.3 2021-01-29 08:28:09 +01:00
giulcioffi
b5d9a387b5 Return 0 instead of -1 if write fails 2021-01-28 12:40:50 +01:00
giulcioffi
27ecd662c4 Do not close socket if send fails 2021-01-28 12:40:50 +01:00
Alexander Entinger
00a6c79255
Merge pull request #57 from facchinm/bearssl-nina-hack
Port BearSSL + crypto integration to NINA
2021-01-28 12:02:56 +01:00
Martino Facchin
55c21a4b88 Release 1.4.2 2021-01-27 17:33:33 +01:00
Martino Facchin
cd843d8ebd Increase delays for reliable ECCx08 operations 2021-01-27 17:33:13 +01:00
Martino Facchin
3e7590d3e9 Merge remote-tracking branch 'arduino/master' into HEAD 2021-01-27 14:28:35 +01:00
Alexander Entinger
70b08d85f8 Adding section to README explaining how to update the UNO WIFI REV2 NINA module via SerialNINAPassthrough 2020-11-17 09:50:24 +01:00
Dan Halbert
f2a0e601b2
Merge pull request #29 from adafruit/tannewt-patch-1
Add some newlines to improve debug output
2020-11-04 19:17:03 -05:00
Scott Shawcroft
3960966446
Add some newlines to improve debug output 2020-11-04 16:12:20 -08:00
Martino Facchin
200f09d1d5
Merge pull request #55 from giulcioffi/issue116BLE
Increase max number of BLE connection up to 7
2020-10-26 08:49:07 +01:00
Limor "Ladyada" Fried
d1a03dd26d
Merge pull request #27 from dhalbert/fix-hci
Fix BLE HCI mode
2020-10-24 20:52:41 -04:00
Dan Halbert
0365542bc1 Fix BLE HCI mode 2020-10-24 18:31:46 -04:00
giulcioffi
cc7006833f Increase max number of BLE connection up to 7 2020-10-22 17:59:18 +02:00
Martino Facchin
be90d36495 Backwards compatibility: use 0x04 for BearSSLClient 2020-10-20 16:34:53 +02:00
Martino Facchin
f2a0cfddb3 Offload BearSSL to Nina module 2020-10-20 16:28:55 +02:00
Martino Facchin
8f986c1892 Add proper bearsslClient with socket_type == 3 2020-10-19 12:31:05 +02:00
Alexander Entinger
7b7bd471e2 Use Arduino IoT Cloud TAs and add a bit of curious logging 2020-09-11 07:09:55 +02:00
Alexander Entinger
93925ac61c Use ArduinoIoTCloud trust anchors instead of the generic default ones (which anyway don't include the ArduinoIoTCloud TAs) 2020-09-11 07:08:06 +02:00
Alexander Entinger
1b7b7f78fc Adding CryptoUtil and EXXX08Cert classes to git (forgotten until now - although used) 2020-09-11 06:44:47 +02:00
Alexander Entinger
e2577c267b ECCX08 fully configurable on startup now (due to fixing I2C Wire bug) 2020-09-11 06:42:47 +02:00
Alexander Entinger
e6c4dd60e8 Use ArduinoCore-API:Ringbuffer and increase size to 256 bytes. In ECCX08CertClass::generatePublicKey whey are performing a 64 byte read from the ECCX08. Although the previously used Ringbuffer was 64 bytes large it contained in fact a bug that reduced it's effective size to 63 bytes which resulted in an infinite loop. 2020-09-11 06:40:13 +02:00
Alexander Entinger
f5ae0c855e Use ArduinoCore-API:Ringbuffer implementation (the one present in this core contains bugs) 2020-09-11 06:38:03 +02:00
Alexander Entinger
05da3b1ef5 Adding partial certificate reconstruction 2020-09-07 06:56:23 +02:00
Alexander Entinger
f7b76d6721 Fixing up WiFiClient in the presence of a IPAddress class 2020-09-02 16:01:44 +02:00
Alexander Entinger
7cdef7c3e7 Ensure that ArduinoBearSSL/bearssl and ArduinoBearSSL/utility directories are compiled too. 2020-09-02 15:45:05 +02:00
Alexander Entinger
991d4cda7b Ajusting WiFiClient to be derived from Client in order to spoonfeed it to BearSSLClient 2020-09-02 15:44:28 +02:00
Alexander Entinger
6bac6fb182 Cleaning up IPAddress (would become an abstract base class otherwise and could not be instantiated) due to pruning due to fitting in this minimal core 2020-09-02 15:43:50 +02:00
Alexander Entinger
b2ce6df1c8 Compile ArduinoBearSSL 2020-09-02 13:58:29 +02:00
Alexander Entinger
34b7097936 Add global C++ define ARDUINO which is required by ArduinoBearSSL to include int br_sslio_read_available(br_sslio_context *cc); and int br_sslio_peek(br_sslio_context *cc, void *dst, size_t len);" 2020-09-02 13:57:39 +02:00
Alexander Entinger
cf26475c64 Adding Client/IPAddress and extending Arduino.h and WMath to provide all the functions necessary for compiling ArduinoBearSSL 2020-09-02 13:56:44 +02:00
Alexander Entinger
70fdc0d575 Moving ArduinoBearSSL code to arduino/libraries/ArduinoBearSSL 2020-09-02 13:43:21 +02:00
Alexander Entinger
f82ccd851c Integrate ArduinoBearSSL with nina fw. 2020-09-02 13:40:21 +02:00
Alexander Entinger
2768bc43ac Use a maximum of 400 kHz when connecting ECCX08 with ESP32 nina module 2020-09-02 12:48:39 +02:00
Alexander Entinger
8632328d95 Correcting I2C pin assignment 2020-09-02 12:48:04 +02:00
Alexander Entinger
768fd8ed84 Initialize ECCX08 when nina is used for WIFI 2020-09-02 10:11:38 +02:00
Alexander Entinger
03dbeacd4a Adding min/max/max (min is needed by ArduinoECCX08 2020-09-02 09:03:23 +02:00
Alexander Entinger
8fed17bd4f Adding a delayMicroseconds as required by the core 2020-09-02 09:03:00 +02:00
Alexander Entinger
9b0289b6c4 Fixing now differently named union member 2020-09-02 09:02:35 +02:00
Alexander Entinger
ad851ea424 Add Wire to the libraries which need to be compiled 2020-09-02 08:49:32 +02:00
Alexander Entinger
0b5b3649ca Move Wire.h/cpp into src subfolder (where it belongs) 2020-09-02 08:49:07 +02:00
Alexander Entinger
28d6ced436 Adding missing core files for being able to compile Wire 2020-09-02 08:48:27 +02:00
Alexander Entinger
1f97e6eef9 Moving Wire library in correct place 2020-09-02 07:34:16 +02:00
Alexander Entinger
f005e15c56 Integrate bcmi-labs/ESP32/libraries/Wire while preserving history. 2020-09-02 07:31:03 +02:00
Alexander Entinger
0542d5507f Moving extracted Wire library back to the subfolder it belongs 2020-09-02 07:30:01 +02:00
Alexander Entinger
7020ad26fa Add ArduinoECCX08 to firmware build 2020-09-02 07:22:56 +02:00
Alexander Entinger
d6e0e3ea7b Moving the imported ArduinoECCX08 library into desired subfolder arduino/libraries/ArduinoEXXX08 2020-09-02 07:16:53 +02:00
Alexander Entinger
a67d4f0957 Integrating ArduinoECCX08 while preserving history. 2020-09-02 07:14:28 +02:00
Brent Rubell
4b244e7559
Merge pull request #25 from adafruit/revert-24-github-actions-test
Revert "add workflow for build"
2020-08-23 11:14:15 -04:00
Brent Rubell
731718b6d8
Revert "add workflow for build" 2020-08-23 11:13:56 -04:00
Brent Rubell
20f66f10d5
Merge pull request #24 from brentru/github-actions-test
add workflow for build
2020-08-23 11:12:33 -04:00
brentru
1961926613 add workflow for build 2020-08-23 11:11:42 -04:00
Limor "Ladyada" Fried
2c3a8e2230
Merge pull request #23 from adafruit/BT_HCI
BT HCI support in airlift
2020-08-21 14:07:30 -04:00
Martino Facchin
07a98a6da8
Merge pull request #54 from luigigubello/cert_renew
Renewing CA certificates
2020-08-17 15:53:31 +02:00
Luigi Gubello
18064ffd67 Renewing CA certificates 2020-08-17 15:02:32 +02:00
Alexander Entinger
6b0137b7aa Release v1.4.1 2020-08-17 11:05:15 +02:00
Alexander Entinger
d4a2118db2
Merge pull request #53 from arduino/nina-download-ota
Add 'downloadOTA' command to download OTA file and verify length/CRC
2020-08-06 08:11:08 +02:00
Alexander Entinger
ec7c1c82ce Allow the passage of a server certificate when downloading from URL 2020-08-06 08:04:38 +02:00
Alexander Entinger
6e0c3d2939 Add 'downloadOTA' command to download OTA file and verify length/CRC 2020-08-04 14:57:15 +02:00
Alexander Entinger
44db420fed Allow default singleton on different Wire (#26)
Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
2020-07-24 10:37:32 +02:00
Alexander Entinger
83b0d101d2 Release v1.4.0 2020-07-13 07:05:01 +02:00
Alexander Entinger
701b3c0a8f
There's no need to prepend the filename with '/fs/' for file operations since that's not done for any of the other file operations (#51) 2020-07-09 12:19:47 +02:00
giulcioffi
2fe9f0cfff
Remove packet parsing from availDataTcp() to avoid packets corruption (#49) 2020-07-09 11:50:34 +02:00
giulcioffi
759397ba57
Replace peek() with available() during connection status check to avoid loosing messages (#50) 2020-07-09 11:48:24 +02:00
Alexander Entinger
1a5604f3bc
Merge pull request #32 from arduino/unowifirev2_ota
Implement filesystem operation on spare flash and UNO WiFI OTA
2020-06-24 11:59:52 +02:00
Alexander Entinger
65d6e1aacf Adding the errno code of the rename operation to the response message 2020-06-24 09:47:51 +02:00
lady ada
56d7b740ed bump version, change HCI uart to main uart. kill main thread when done setting up bt 2020-06-19 18:36:22 -04:00
lady ada
43731b8da5 debuggy but working with RX/TX on 22/23, gpio 0 must be pulled down by arduino for flow control 2020-06-19 18:14:44 -04:00
Brent Rubell
240fef2ca8
Merge pull request #21 from virgilvox/master
Added AWS Certs
2020-06-11 15:05:09 -04:00
Moheeb Zara
e19252de3f bump to verson 1.6.1 2020-06-11 11:49:32 -07:00
Moheeb Zara
76b9fc6339
Added AWS Certs
Added AmazonRootCA1 and AmazonRootCA3 for AWS IoT
2020-06-10 17:32:04 -07:00
Alexander Entinger
abb02a3cdc Adding 'rename' operation necessary for using the WiFiNiNa for OTA 2020-06-10 11:14:14 +02:00
Alexander Entinger
885eae2292 Adding an additional BearSSL constructor as well as a method setClient to allow late initialisation. (#29)
This allows for the ArduinoIoTCloud firmware to intantiate ArduinoBearSSL on the stack instead of the heap.
2020-05-28 14:39:01 +02:00
Giampaolo Mancini
5de9bb0a6c Safer implementation of no-SNI connection (#24) 2020-05-28 07:44:19 +02:00
Fabrice Fontaine
c666e0cc9b Use two buffers instead of split mode (#18)
Use two dedicated buffers for input and output instead of split mode.

Indeed some MQTT server (especially with TLS) needs a full 8k buffer as
they send their Certificate. On the other hand, on output, a smaller
buffer is needed.

Clients will be able to finely tune those values by defining
BEAR_SSL_CLIENT_{I,O}BUF_SIZE before including ArduinoBearSSL.h, the
default default values have been chosen to keep current behavior as
requested during review.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-05-18 13:18:31 +02:00
Giampaolo Mancini
0957a82aca Fix local TA + implicit noSNI constructor 2020-03-30 18:55:02 +02:00
Giampaolo Mancini
00521cd59b Add support for not sending any SNI 2020-03-30 10:24:12 +02:00
Sandeep Mistry
3ba538f27e Version 1.3.0 2019-12-23 11:35:46 -05:00
Sandeep Mistry
a2cf3b9797 WPA2 Enterprise support (PEAP/MSCHAPv2 + EAP-TLS) 2019-12-23 09:37:56 -05:00
Sandeep Mistry
f500453578 Update to IDF v3.3.1 2019-12-23 09:37:56 -05:00
Brent Rubell
0a386927f3
Merge pull request #18 from brentru/update-to-esp-idf-3-3-1
Update to use ESP-IDF v3.3.1
2019-12-19 10:03:17 -05:00
brentru
de4371626b update README to reflect working CoC urls 2019-12-18 15:53:05 -05:00
brentru
2cff6632ee update travis for deployment on v3.1.1 2019-12-18 13:47:44 -05:00
brentru
2361e23881 update to 3.3.1, firmware v1.6.0 2019-12-18 13:45:04 -05:00
Arturo Guadalupi
175c192f2b
Update README.md
Use IDF V3.3
2019-11-19 09:46:04 +01:00
Brent Rubell
b569157e09
Merge pull request #15 from brentru/add-travis-build-script
Add Travis CI Script for nina-fw
2019-10-31 13:57:50 -04:00
brentru
22c0f001ee enable file_glob for * pattern 2019-10-31 11:59:37 -04:00
brentru
2390b88243 deploy on tag releases 2019-10-31 11:48:28 -04:00
brentru
a4ac932c3f drop tag 2019-10-31 11:31:58 -04:00
brentru
1c72c5ae71 reduce releases 2019-10-31 11:31:13 -04:00
brentru
6ae580d917 add travis badge 2019-10-31 11:26:04 -04:00
brentru
6809f38aa8 deploy based on nina_102*.bin 2019-10-31 11:18:34 -04:00
brentru
1c9a07eff4 update deployment script 2019-10-31 11:13:56 -04:00
brentru
999710e92d add gperf for cmake 2019-10-31 11:08:14 -04:00
brentru
9f02cb294b fix untar location 2019-10-31 11:04:45 -04:00
brentru
497e8332c4 py 3.5 2019-10-31 10:50:54 -04:00
brentru
613da21bb3 bump esp toolchain version 2019-10-31 10:50:21 -04:00
brentru
16708753b4 add deployment, drop gperf, python3 2019-10-31 10:47:37 -04:00
brentru
fa6a438981 add test build script... 2019-10-31 10:43:02 -04:00
Brent Rubell
d68d708739
Merge pull request #14 from anecdata/Kraken_II
New command handlers for Digital Read and Analog Read. New command for Analog Read.
2019-10-23 12:51:22 -04:00
anecdata
8a15b9e195 Metadata updates
Pulled over a code-of-conduct.md from a random Arduino library (the 
CircuitPython one mentions a lot of CircuitPython specifics), and added 
**Contributing** section to README. Curious that there isn't a central 
place where a code of conduct can be stored, with a reference rather 
than a copy in each repo.

Updated CHANGELOG for 1.3.1, 1.4.0, and 1.5.0.
2019-10-21 10:57:43 -05:00
anecdata
fa5f7a5486 v1.5.0. 2019-10-17 10:51:01 -05:00
anecdata
687498c981 Bumped version to 1.4.1 2019-10-17 10:17:38 -05:00
anecdata
6bb17bb179 Add basic ADC calibration. 2019-10-17 00:12:35 -05:00
anecdata
b9c66fa1b1 Convert pin to ADC1 channel. 2019-10-14 00:32:48 -05:00
anecdata
5687201ec9 Add setAnalogRead type & command handler. Add core analogRead function. 2019-10-13 21:32:06 -05:00
anecdata
b90bbd6349 Add setDigitalRead command handler type and command handler. 2019-10-13 14:13:15 -05:00
Brent Rubell
e813fbe664
Merge pull request #13 from brentru/add-ESP-33
Update nina-fw to ESP-IDF 3.3 (LTS)
2019-10-09 12:36:34 -04:00
brentru
cd594a1617 update sdkconfig, documentation for ESP-IDFv3.3. Makefile load-nina reflects latest firmware version 2019-10-09 11:39:24 -04:00
Limor "Ladyada" Fried
08bdc03880
Merge pull request #11 from brentru/certificate-work
Extending WifiSSLClient
2019-10-08 23:06:47 -04:00
brentru
97b8ce167d update combine.py to 1.4.0 2019-10-08 22:58:47 -04:00
brentru
133f48dd74 fix release cflags to be less verbose 2019-10-08 16:46:18 -04:00
brentru
2934d32d1f revert to standard sdkconfig 2019-10-08 16:42:31 -04:00
brentru
d900dae127 private _handshake_timeout, set to reflect arduino-esp32 WiFiClientSecure by default 2019-10-08 16:41:11 -04:00
brentru
c0e30f4192 strip out uf2s, generalize makefile 2019-10-08 16:24:42 -04:00
brentru
8be4f3dbed set the cert/key given a known socket within startClientTCP 2019-10-08 13:32:24 -04:00
brentru
33bfa15fc8 use key provided from code instead 2019-10-08 13:06:05 -04:00
brentru
5256ea5247 Bumping TLS RX buffer back up, 16384 bytes instead of 8182 bytes 2019-10-08 12:51:06 -04:00
brentru
7217c83ed1 set user-provided buffer 2019-10-08 12:44:19 -04:00
brentru
3bd209446a add private key from WifiSSLClient into CommandHandler instead 2019-10-08 12:33:43 -04:00
brentru
cce35ecb74 set certificate within CommandHandler, setCertKey call for certificate 2019-10-08 12:18:14 -04:00
brentru
0d6137a8a9 drop char buffer sizes down to more realistic sizes 2019-10-08 11:23:54 -04:00
brentru
ac197818d3 set certificate sizes, works 2019-10-08 11:14:11 -04:00
brentru
54939b773e add extra prints, \n at tend of printfs 2019-10-07 17:00:28 -04:00
brentru
3be514d04d const char -> char 2019-10-07 16:54:59 -04:00
brentru
369381ecf0 making const chars globals, working connection to AWS IOT broker 2019-10-07 16:48:11 -04:00
brentru
40b46f1329 add printing for final deallocation() 2019-10-03 16:01:46 -04:00
brentru
c697543815 remove free() call, causes errors, remove Bluetooth in menuconfig 2019-10-03 14:51:08 -04:00
brentru
58bfe02bcb remove AWS_CERT_CRT, add check for heap into handler 2019-10-03 14:25:47 -04:00
brentru
872f1cd1f3 inc. TLS Maximum Message Length to 8KB 2019-10-03 14:20:33 -04:00
brentru
eeb579fb9c add heap size check 2019-10-03 13:09:03 -04:00
brentru
fb9f9cc3bb reduced tls maximum message content length in menuconfig to 4KB 2019-10-03 13:07:14 -04:00
brentru
5c75800a83 print cert, return on error after free'ing 2019-10-03 12:49:20 -04:00
brentru
d2fa1ba9cc add MBEDTLS_SSL_ALLOC_FAILED error 2019-10-03 12:24:31 -04:00
brentru
ab949fe922 malloc and fail certificate 2019-10-03 12:13:43 -04:00
brentru
a7efa04365 start breaking out the handler 2019-10-02 17:40:41 -04:00
brentru
5dbda1a8be upload port as variable 2019-10-01 17:15:30 -04:00
brentru
3b9427b282 create connect(host,port) function 2019-10-01 16:25:22 -04:00
brentru
ae8a059e89 add verification for cert, freeup heap 2019-10-01 16:10:48 -04:00
brentru
beb3a98b05 removed ssl/tls handshake, replaced with one which honors ssl handshake timeout 2019-10-01 15:59:13 -04:00
brentru
e2761767e7 add loading/ for client key and certificate 2019-10-01 15:05:05 -04:00
brentru
4b30ab4284 print return code and more verbose errors, move things around to correspond with their logical steps 2019-10-01 14:44:49 -04:00
brentru
0b558d2ea3 move pers to h, add return code int 2019-10-01 14:22:13 -04:00
brentru
d7fb4c556e entropy init. incl. device-specific identifiers instead of NULL 2019-10-01 14:14:58 -04:00
brentru
f3cbd721cb add a handshake timeout, stop() should free the new clientCr and clientKey 2019-10-01 13:56:47 -04:00
brentru
ffbca9c1e3 add setCertificate, setPrivateKey, mbed headers 2019-10-01 13:42:09 -04:00
brentru
e26d792713 remove certificate malloc for now 2019-10-01 12:13:05 -04:00
brentru
ae2b0660ca upload-nina and upload-circuitpython 2019-10-01 12:04:18 -04:00
brentru
38a1cd7ee8 swap out esphelper for makefile commands to throw m4 into passthrough, upload via esptool, and start the serial 2019-10-01 11:34:04 -04:00
brentru
bd00a04d30 helper script for uploading uf2, flashing firmware, openin uart 2019-09-30 17:14:35 -04:00
brentru
65b4f7dd56 try debug level logging 2019-09-30 16:51:56 -04:00
brentru
95066a7d29 add UF2 for SerialPassThru with the AirLift FeatherWing 2019-09-30 16:50:23 -04:00
brentru
449e8ddd29 add setClientCert, setCertKey, add debug prints, define commands 2019-09-30 16:43:43 -04:00
Sandeep Mistry
5451041458 Add errorCode() API 2019-08-20 10:34:14 -04:00
Sandeep Mistry
dfcb32b1f3 Allow built-in trust anchors to be overrided via constructor 2019-08-19 09:26:00 -04:00
Martino Facchin
072354249d Add OTA routine for UNO WiFi rev2 2019-08-09 10:13:36 +02:00
Martino Facchin
a567034480 Add downloadFile helper 2019-08-08 17:38:23 +02:00
Martino Facchin
ad93421f36 Initial implementation of FS handling 2019-08-08 17:35:34 +02:00
Alan Chen
c14d921460 #define BEAR_SSL_CLIENT_IOBUF_SIZE 2019-07-18 10:33:50 -04:00
Riccardo Rizzo
f63b70aa3d fix setHostname API
fixed set host name API now allow to set a hsotname with max lenght 32 characters, otherwise set the default one
2019-07-16 10:55:43 -04:00
Riccardo Rizzo
00b93d86c0 Fix channel's assignement 2019-07-15 12:18:27 -04:00
Martino Facchin
17d506e81f Increase delay in sign()
Calling sign() with 60ms of delay is not ok on ECC608, while it works just fine on 508. 70ms looks fine for both.
2019-06-17 12:55:43 +02:00
Martino Facchin
bb31ec8102 Update fw version to 1.2.4 2019-06-14 15:46:44 +02:00
Martino Facchin
4bf4a4f5dc Update to esp-idf v3.3 2019-06-14 15:45:39 +02:00
Limor "Ladyada" Fried
47875b775a
Merge pull request #5 from docmollo/docs_idf_cleanup
Various documentation cleanups
2019-05-19 19:19:07 -04:00
Martino Facchin
f28554d94d
Merge pull request #20 from sandeepmistry/issue-18-fix
Add small delay to WiFiUDP.parsePacket() allow other tasks to run
2019-05-02 12:13:28 +02:00
Sandeep Mistry
a693f84cb9 Add small delay to WiFiUDP.parsePacket() allow other tasks to run 2019-04-26 13:40:05 -04:00
Dustin Mollo
b665dc1fdd minor cleanup 2019-04-24 15:48:25 -07:00
Dustin Mollo
e2df4fdb4e Updated README.md to incdicate use of Espressif's IDF v3.2; various other clean-ups 2019-04-24 15:44:09 -07:00
Sandeep Mistry
70ab489d2a Disable CONFIG_LWIP_DHCP_DOES_ARP_CHECK 2019-04-11 12:27:59 -04:00
Sandeep Mistry
3c55153ed6 Version 1.2.3 2019-04-09 09:33:58 -04:00
Sandeep Mistry
f8756c882b WiFiSSLClient: enable SNI vis mbedtls_ssl_set_hostname when using hostname 2019-04-09 09:19:09 -04:00
Sandeep Mistry
81f91c1e26 Add reason code command 2019-04-09 09:17:59 -04:00
Limor "Ladyada" Fried
67980cf636
Merge pull request #4 from docmollo/docs_wpa2_enterprise
Firmware version tweaks
2019-04-06 20:08:36 -04:00
Dustin Mollo
93b4959250 Update firmware version number and mod'd combine.py to have version number in generated firmware file 2019-04-06 10:26:47 -07:00
Sandeep Mistry
b08837e4f5 Add SHA1 and SHA256 API's and examples 2019-04-05 10:50:15 -04:00
Limor "Ladyada" Fried
e427aad6be
Merge pull request #3 from docmollo/docs_wpa2_enterprise
Add initial WPA2 Enterprise support
2019-04-04 19:50:10 -04:00
Dustin Mollo
bb06eb887a ignore firmware files in top level 2019-04-04 13:19:11 -07:00
Dustin Mollo
2d853b81a4 WPA2 Enterprise additions 2019-04-04 13:10:14 -07:00
Sandeep Mistry
0e5b41e329 Define SHA1 function as SHA1_ to make it a "private" symbol when building on Arduino 2019-04-04 14:06:13 -04:00
guillep2k
9861c11f85 Fixes to various integer encoding 2019-03-28 16:32:47 -04:00
Sandeep Mistry
c8fd53f096 Version 1.2.2 2019-03-26 10:01:47 -04:00
Sandeep Mistry
f01ce17d3b Update to IDF v3.1.3 2019-03-26 09:55:14 -04:00
Sandeep Mistry
4ec78c64ce Don't call tcpip_adapter_dhcpc_start(TCPIP_ADAPTER_IF_STA)
Sometimes the DNS servers would be set to 0.0.0.0
2019-03-26 09:36:53 -04:00
Sandeep Mistry
06e362c454 Track if static IP is assigned in separate var, clear event group bits before stop 2019-03-26 09:36:53 -04:00
Sandeep Mistry
b13dcbafec Call freeaddrinfo after getaddrinfo 2019-03-26 09:36:53 -04:00
Sandeep Mistry
63c42dd176 Replace gethostbyname calls with getaddrinfo 2019-03-26 09:36:53 -04:00
Sandeep Mistry
c31790876b Close all non-listening/bound sockets on wifi disconnect instead of just TCP sockets 2019-03-21 15:05:15 -04:00
Sandeep Mistry
79ff5cf761 Close all client TCP sockets when the WiFi is disconnected, this avoids hangs in WiFiClient::connect 2019-03-21 15:05:15 -04:00
Sandeep Mistry
b3257ddd55 Add support for megaavr arch 2019-03-19 14:54:54 -04:00
Sandeep Mistry
71cef5e3a0 Add JWS support utilty and setup sketch 2019-03-19 09:34:29 -04:00
Limor "Ladyada" Fried
35966a57f9
Merge pull request #2 from jerryneedell/jerryn_nobin
remove .bin file
2019-02-28 14:42:29 -05:00
Jerry Needell
a5fcd5b435 remove .bin file 2019-02-28 14:31:37 -05:00
Limor "Ladyada" Fried
38dffb0ee9
Merge pull request #1 from jerryneedell/jerryn_version
update version to 1.2.2
2019-02-28 14:11:39 -05:00
Jerry Needell
db81c87f59 remove sdkconfig.old 2019-02-28 14:04:17 -05:00
Jerry Needell
2b31ee733a update version # to 1.2.2 2019-02-28 13:59:45 -05:00
Jesse Kerkhoven
4cbaae83b0 Put device to sleep when calling end() 2019-02-25 10:42:08 -05:00
ladyada
6179c0981d fix missing set hostname for TLS, update to latest IDF, add debug (can remove later) 2019-02-16 22:54:41 -05:00
Sandeep Mistry
cd73b9d222 Add default serial number with value of 1 2019-02-11 09:53:06 -05:00
Sandeep Mistry
98350c7157 Print the SHA1 of the cert 2019-02-11 09:53:06 -05:00
Sandeep Mistry
453a5f9340 Compile warning 2019-02-11 09:53:06 -05:00
Sandeep Mistry
fd8ef8d3e6 Add SHA1 from https://github.com/clibs/sha1
Commit d5b29e11ec4871b78b370e8e00bd0cd56d798dda
2019-02-11 09:53:06 -05:00
Sandeep Mistry
abdd3fe467 Add ECCX08SelfSignedCert to generate + store self signed certs and restore 2019-02-11 09:53:06 -05:00
Sandeep Mistry
703d84f707 Split out PEM utils, return append length for some ASN.1 utils 2019-02-11 09:53:06 -05:00
Sandeep Mistry
61054d17e0 More ASN.1 utils 2019-02-11 09:53:06 -05:00
Sandeep Mistry
fa772f3905 Add API to get serial number as bytes 2019-02-11 09:53:06 -05:00
Sandeep Mistry
69c2e4a696 Split out ASN.1 to new files 2019-02-11 09:53:06 -05:00
ladyada
9e76479a7e change pin to not conflict with boot, add some debugs 2019-02-10 14:32:56 -05:00
Sandeep Mistry
ee167aba00 Use phy_init partition for phy init data and use recommended u-blox data 2019-01-31 16:37:49 -05:00
Riccardo Rizzo
c4f8990430
Merge pull request #9 from sandeepmistry/faster-connect
Use WIFI_FAST_SCAN for connection instead of WIFI_ALL_CHANNEL_SCAN
2019-01-29 16:25:36 +01:00
Sandeep Mistry
3e8d790b17 Try to re-connect on ASSOC_FAIL errors 2019-01-23 13:23:34 -05:00
Sandeep Mistry
1bb0a1fcf8 Use WIFI_FAST_SCAN for connection instead of WIFI_ALL_CHANNEL_SCAN 2019-01-23 12:15:32 -05:00
Sandeep Mistry
093c3ee3c0 Put in idle mode on begin, bump wake/sleep/idle delays to match datasheet 2019-01-21 17:20:24 -05:00
Sandeep Mistry
c6a06c9ff1 Adjust command execution delays for stability 2019-01-15 09:07:27 -05:00
Sandeep Mistry
1158be469e Bump wakeup time delay to improve stability 2019-01-11 17:12:00 -05:00
Sandeep Mistry
37e262d437 Add support for PEM certs with ECC slot 2019-01-04 17:24:45 -05:00
Sandeep Mistry
70cb98f1e0 Add AmazonRoot CA 1 2019-01-04 16:37:41 -05:00
Sandeep Mistry
f4efa29c9c Add CSR generation capabilities and default TLS config 2019-01-04 16:33:52 -05:00
Sandeep Mistry
61649995d3 Bump receive response retry count to 100 (was 20) for increased stability 2019-01-04 16:33:52 -05:00
Sandeep Mistry
1fce504d28 Add SHA256 support 2019-01-04 16:33:42 -05:00
Sandeep Mistry
a745b06920 Update to bearssl 0.6.0 2019-01-02 17:25:47 -05:00
Martino Facchin
a55c66afb4 Update to 1.2.1 2018-11-16 11:19:03 -05:00
Martino Facchin
35d4a3c84b Free BT memory if using only WiFi
Partially fixes https://github.com/arduino/nina-fw/issues/4.

Problem: default certificates are a lot (~70KB) and BT uses a lot of RAM even if just configured in menuconfig.
Avoid spurious certificates parsing and SSL errors by freeing bt memory if unused.
2018-11-16 16:53:55 +01:00
Sandeep Mistry
c9f1c51063 Version 1.2.0 2018-11-13 10:23:51 -05:00
Sandeep Mistry
8d43a385b9 Add changelog 2018-11-13 10:21:25 -05:00
Martino Facchin
bd556e24e4
Merge pull request #3 from sandeepmistry/bluetooth
Add support for BLE HCI UART mode
2018-11-13 16:13:11 +01:00
Sandeep Mistry
bd477c1d6b Fix DNS servers not sticking when static IP address is used 2018-11-13 09:07:53 -05:00
Sandeep Mistry
f83faa4fd2 Suspend task 2018-11-13 08:56:11 -05:00
Sandeep Mistry
25b73d5196 Erase NVS flash on init failure 2018-11-13 08:56:11 -05:00
Sandeep Mistry
7481928992 Build options for Uno WiFi Rev2 2018-11-13 08:56:11 -05:00
Sandeep Mistry
d718b1f539 Enable HCI UART mode on boot if SS is LOW 2018-11-13 08:56:11 -05:00
Sandeep Mistry
21b60cf657 Add DST Root CA X3 and ISGR Root X1 as trust anchors, for Let's Encrypt support 2018-10-16 09:11:17 -04:00
agdl
e84cf1854b Mask version for version number 2018-10-13 12:35:37 +02:00
Sandeep Mistry
2aed17fc1e Version 1.0.0 -> 1.1.0 2018-10-04 11:51:11 -04:00
Sandeep Mistry
7e35e717f3 Update read me for IDF v3.1 and new sketch to use 2018-10-04 11:33:32 -04:00
Martino Facchin
53580a082b Merge Sandeep's root certificates curated list with Google's 2018-10-04 11:33:32 -04:00
Martino Facchin
eab54f15e1 Update sdkconfig for esp-idf v3.1 2018-10-04 11:33:32 -04:00
Martino Facchin
06b9b9e641 Move certs partition before actual firmware 2018-10-04 11:33:32 -04:00
Martino Facchin
a1fbf4b2ce Move certificates to separate, mmapped partition 2018-10-04 11:33:32 -04:00
Sandeep Mistry
a75b35c6f8
Fixes for static IP's in STA + AP modes, fail on bad AP params (#3) 2018-10-03 11:03:26 -04:00
Sandeep Mistry
fa268db77f Remove bundled ECCX08 driver, and use ArduinoECCX08 library 2018-07-19 11:41:57 -04:00
Sandeep Mistry
be79c97d9f Add random(max) and random(min, max) API's 2018-07-19 11:35:50 -04:00
Sandeep Mistry
5f3beee6d8 Port files from ArduinoBearSSL 2018-07-19 11:33:10 -04:00
Sandeep Mistry
073fd6da96 Initial library structure and metadata 2018-07-19 11:32:28 -04:00
Sandeep Mistry
09b3794e25 Add Root CA's and comment on how Trust Anchors file contents was made 2018-07-19 09:55:07 -04:00
Sandeep Mistry
ba178ce226 Update comments 2018-07-19 09:55:07 -04:00
Sandeep Mistry
6ab105020c Add license 2018-07-18 14:29:00 -04:00
Sandeep Mistry
70d40bd8ee Fixes for Uno WiFi rev2 and ECC608 2018-07-13 11:33:49 -04:00
Riccardo Rizzo
cbdd42debe infinite while loop fix write() and clientWrite() (#2)
* Reimplemented return logic in BearSSLClient::write() and BearSSLClient::clientWrite() in  order to avoid infinite loop in https://github.com/Rocketct/ArduinoBearSSL/blob/master/src/bearssl/ssl_io.c#L279 when networking error happend in low level client(GSMClient)
* Reimplemented logic of BearSSLClient::write(const uint8_t *buf, size_t size) function
2018-06-20 11:31:16 +02:00
Sandeep Mistry
6090cd8d16 Minor tweaks for non-SAMD boards 2018-03-08 09:23:02 -05:00
Sandeep Mistry
aea0616fa7 Rename ECC508 to ECCX08 2018-02-14 15:55:24 -05:00
Sandeep Mistry
dfa149df19 Improve slot read and write performance and reliability 2018-02-13 17:42:56 -05:00
Sandeep Mistry
6906aab802 Remove ECC508 CSR and cert support and examples 2018-02-13 15:48:51 -05:00
Sandeep Mistry
5e32ca078d Add setEccSlot API to set private key slot and cert bytes
instead or in constructor
2018-02-13 15:46:25 -05:00
Sandeep Mistry
3e04f381e4 ECC508: correct serial number length 2018-02-13 15:46:25 -05:00
Sandeep Mistry
5ea1f9d76f ECC508: make serial number uppercase 2018-02-08 13:10:08 -05:00
Sandeep Mistry
17114aaa3f ECC508: add support for reading and writing slots 2018-02-08 13:09:06 -05:00
Sandeep Mistry
620fcf0a45 Use traditional Wire lib API's 2018-01-25 11:01:19 -05:00
Sandeep Mistry
8fbd956ff0 Correct incorrect case 2018-01-17 10:10:35 -05:00
Sandeep Mistry
4130cffc0a Update to new Wire API proposal 2018-01-17 10:03:18 -05:00
Sandeep Mistry
31c0586275 Operate ECC508 at 1 MHz after waking up
Wake up frequency needs to remain at 100 kHz
2017-12-21 11:57:11 -05:00
Sandeep Mistry
b044a0fae7 Check if ECC508 is locked before using it 2017-12-19 13:45:38 -05:00
Sandeep Mistry
0b194f457b Add ECC508 TLS config and integrate in CSR sketch 2017-12-19 11:22:42 -05:00
Sandeep Mistry
0ee51f2def Add ECC508 for reading/writing config, lock status, locking and serial number 2017-12-19 11:21:26 -05:00
Sandeep Mistry
39dddfdc37 Add support for passing ECC508 key slot and cert. byte array + length in constructor 2017-12-14 15:19:14 -05:00
Sandeep Mistry
e13ae73f4a Add ECC508 key slot CSR generation support 2017-12-13 14:47:37 -05:00
Sandeep Mistry
5ca368e466 Add ECC508 private and public key generation support 2017-12-12 15:08:00 -05:00
Sandeep Mistry
0d7c48739b Add ECC508 EC sign support 2017-11-27 14:07:21 -05:00
Sandeep Mistry
94b751b3a5 Use ECC508 for ECDSA verify if present 2017-11-23 16:42:59 -05:00
Sandeep Mistry
a5b2d0ea10 Verify response CRC and dynamic CRC calculations for commands 2017-11-22 16:11:34 -05:00
Sandeep Mistry
d5dbfea2dc Use ECC508 for entropy inject, if available 2017-11-22 14:20:09 -05:00
Sandeep Mistry
00c8c761c9 Correct include guard style 2017-11-22 12:51:50 -05:00
Sandeep Mistry
3b3c5b8329 Inject (pseudo) entropy via br_ssl_engine_inject_entropy
before br_ssl_client_reset
2017-11-15 16:57:50 -05:00
Sandeep Mistry
22494beefd Revert "Inject fake (stack based entropy) in br_ssl_engine_init_rand on Arduino"
This reverts commit 0d353757d75a2c83129d220bf3dc731e08a2669a.
2017-11-15 16:46:51 -05:00
Sandeep Mistry
3811b04182 Use br_x509_minimal_set_time to inject current 2017-11-15 16:45:45 -05:00
Sandeep Mistry
7da22663e0 Revert "Enable BR_USE_UNIX_TIME on Arduino"
This reverts commit 30b1db8865ac4cc6c5468f43ba7725378afab4e0.
2017-11-15 16:27:56 -05:00
Sandeep Mistry
f2510bd575 Enable BR_LOMUL for Arduino 2017-10-13 15:55:48 -04:00
Sandeep Mistry
e3cf838246 Lower buffer size and enable full duplex mode 2017-10-13 15:40:18 -04:00
Sandeep Mistry
387b0f4ad7 HACK: make br_sslio_read_available and br_sslio_peek non-blocking 2017-10-13 15:34:16 -04:00
Sandeep Mistry
ce5a2735fb Use custom br_sslio_read_available and br_sslio_peek in peek() and available() 2017-10-13 10:44:12 -04:00
Sandeep Mistry
31db912528 Add custom br_sslio_read_available and br_sslio_peek APIs 2017-10-13 10:42:17 -04:00
Sandeep Mistry
87f1ac8789 Revert "HACK: make br_sslio_read(ctx, dst, len) return buffered length if dst is NULL"
This reverts commit 2bd615f380611fc26dd5ecdb916a91f90f9763ae.
2017-10-13 10:34:55 -04:00
Sandeep Mistry
28f4764c25 Add ArduinoBearSSL.onGetTime(callback) API
Used to return _gettimeofday value
2017-10-13 10:32:15 -04:00
Sandeep Mistry
f9df9dcccb Update trust anchors to be same as Arduino WINC1500 19.5.2 firmware image 2017-10-13 10:00:29 -04:00
Sandeep Mistry
355101b145 Make available() return values greater than 1
By using br_sslio_read(ctx, NULL, len) hack
2017-10-12 17:57:03 -04:00
Sandeep Mistry
c8e656dd42 HACK: make br_sslio_read(ctx, dst, len) return buffered length if dst is NULL
This let’s us use it in Client::available()
2017-10-12 17:55:31 -04:00
Sandeep Mistry
aaebc17f5e Enable BR_ARMEL_CORTEXM_GCC on Arduino 2017-10-12 17:41:24 -04:00
Sandeep Mistry
c214077d66 Implement BearSSLClient::connect(ip, port) 2017-10-12 17:38:28 -04:00
Sandeep Mistry
3a101ff39f Fill in initial BearSSLClient methods
Limitations:
- available only returns 1 or 0
- connect(ip, port) not implemented
- trust anchors hard coded in file
- requires _gettimeofday implementation in sketch
2017-10-12 14:39:18 -04:00
Sandeep Mistry
11f71124ae Enable BR_USE_UNIX_TIME on Arduino 2017-10-12 14:35:26 -04:00
Sandeep Mistry
2394029037 Inject fake (stack based entropy) in br_ssl_engine_init_rand on Arduino 2017-10-12 14:35:15 -04:00
Sandeep Mistry
6221177919 Add BearSSLClient stubs 2017-10-12 10:55:27 -04:00
Sandeep Mistry
6bae28c91b Import BearSSL 0.5 src and include files 2017-10-12 10:51:17 -04:00
Sandeep Mistry
2b14fa45c4 Initial Arduino lib structure 2017-10-12 10:44:10 -04:00
Sandeep Mistry
f48ae8f065 Remove Wire slave sender support for now
Since there is no start condition interrupt
2016-10-21 13:09:28 -04:00
Sandeep Mistry
93c6f4e635 Wire stability improvements 2016-10-21 11:28:49 -04:00
Sandeep Mistry
d290019bdc Disable I2C interrupts on Wire.end() 2016-10-20 17:14:40 -04:00
Sandeep Mistry
c43365abbd Make Wire slave sender example functional 2016-10-20 17:12:51 -04:00
Sandeep Mistry
3f4a6e1ae9 Port Wire save receiver functionality 2016-10-20 16:09:22 -04:00
Sandeep Mistry
a541a40036 Correct issues muxing I2C pins 2016-10-19 15:57:24 -04:00
Sandeep Mistry
8e51386a7e Initial port of Wire library from SAMD core, master mode only 2016-10-19 14:56:59 -04:00
Martino Facchin
47836f74e3 remove libraries 2016-09-27 17:17:22 +02:00
Me No Dev
68ff762ebd Initial Upload 2016-01-07 16:31:07 +02:00
64 changed files with 5945 additions and 3424 deletions

67
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,67 @@
name: Build
on:
repository_dispatch:
push:
pull_request:
branches: [ master ]
release:
types:
- created
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
IDF_VERSION: v5.5
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- 'esp32'
- 'fruitjam_c6'
build_type:
- 'Release'
- 'Debug'
steps:
- name: Pull ESP-IDF docker
run: docker pull espressif/idf:$IDF_VERSION
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --depth 1 certificates components/arduino-esp32
- name: Build
run: |
docker run --rm -v $PWD:/project -w /project espressif/idf:$IDF_VERSION /bin/bash -c "git config --global --add safe.directory /project && idf.py -DBOARD=${{ matrix.board }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} build"
# combine.py is auto run as postbuild
if [ "${{ matrix.build_type }}" == "Debug" ]; then
# add debug suffix to the bin file
mv NINA_ADAFRUIT*.bin "$(echo NINA_ADAFRUIT*.bin | sed 's/.bin/_Debug.bin/')"
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
#name: nina-fw-${{ matrix.board }}${{ matrix.build_type == 'Debug' && format('-{0}', matrix.build_type) || '' }}
name: NINA_ADAFRUIT-${{ matrix.board }}-${{ matrix.build_type }}
path: |
NINA_ADAFRUIT*.bin
# - name: Prepare Release Asset
# if: github.event_name == 'release' && matrix.build_type == 'Release'
# run: cp build/nina-fw.bin nina-fw-${{ matrix.board }}-${{ github.event.release.tag_name }}-${{ matrix.build_type }}.bin
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
if: github.event_name == 'release'
with:
files: |
NINA_ADAFRUIT*.bin

7
.gitignore vendored
View file

@ -1 +1,8 @@
build/ build/
*.bin
# Regenerate sdkconfig from the sdkconfig.defaults* files.
sdkconfig.esp32
sdkconfig.esp32c6
sdkconfig.*.old
sdkconfig.old
managed_components/

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "certificates"]
path = certificates
url = https://github.com/adafruit/certificates
[submodule "arduino-esp32"]
path = components/arduino-esp32
url = https://github.com/espressif/arduino-esp32

45
.travis.yml Normal file
View file

@ -0,0 +1,45 @@
# .travis.yml for nina-fw
# adapted from https://github.com/igrr/esp32-cam-demo/blob/master/.travis.yml
sudo: false
language: bash
os:
- linux
addons:
apt:
packages:
- python3.5
- gperf
before_install:
# Save path to the git respository
- PROJECT_PATH=$(pwd)
install:
- mkdir -p ~/esp
- cd ~/esp
# Download binary toolchain for the ESP32
- wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
- tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
# Make xtensa-esp32-elf available for all terminal sessions
- export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
# Get ESP-IDF v3.3.1
- git clone --branch v3.3.1 --recursive https://github.com/espressif/esp-idf.git
# Set the path to ESP-IDF directory
- export IDF_PATH=~/esp/esp-idf
# Install Required Python Packages
- python -m pip install --user -r $IDF_PATH/requirements.txt
script:
- cd $PROJECT_PATH
- make firmware
deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: "NINA_W102-*.bin"
skip_cleanup: true
on:
tags: true

168
CHANGELOG Normal file
View file

@ -0,0 +1,168 @@
# Changelog
## Adafruit firmware
Adafruit's Arduino NINA-W102 firmware 1.7.7 - 2023.09.20
* Change to use adafruit/certificates repo for roots.pem
Adafruit's Arduino NINA-W102 firmware 1.7.5 - 2023.07.21
* Fix for bug in NINA-W102 firmware 1.7.5 not allowing uploads on Windows/Linux
Adafruit's Arduino NINA-W102 firmware 1.7.5 - 2023.07.21
* Fixed Adafruit IO Root SSL Certificate
Adafruit's Arduino NINA-W102 firmware 1.7.4 - 2021.06.03
* Fixed support for custom hostname in WiFi client mode
Adafruit's Arduino NINA-W102 firmware 1.7.3 - 2021.03.26
* Changed Analog Write to use full PWM range.
* Added support to Pin Mode for INPUT_PULLUP.
Adafruit's Arduino NINA-W102 firmware 1.7.2 - 2021.03.05
* Replace peek() with available() during connection status check to avoid losing messages.
Adafruit's Arduino NINA-W102 firmware 1.7.1 - 2020.10.24
* Enable HCI BLE for AirLift boards and breakouts.
Adafruit's Arduino NINA-W102 firmware 1.6.0 - 2019.12.28
* Updated to build with ESP-IDF 3.3.1
Adafruit's Arduino NINA-W102 firmware 1.5.0 - 2019.10.21
* Added Digital Read and Analog Read
Adafruit's Arduino NINA-W102 firmware 1.4.0 - 2019.10.09
* Updated to use ESP-IDF 3.3 (LTS)
* Updated WiFiSSLClient
* Workflow improvements in Makefile
Adafruit's Arduino NINA-W102 firmware 1.3.1 - 2019.04.24
* Added WPA2 Enterprise
* Updated README.md to indicate this is Adafruit's fork
* Updated README.md with current, reproducible build instructions
* Updated CHANGELOG with various Adafruit changes
Adafruit's Arduino NINA-W102 firmware 1.3.0 - 2019.04.04
* Rev'd version in CommandHandler.cpp
* Added version number to combine.py script
Adafruit's Arduino NINA-W102 firmware 1.2.2 - 2019.04.04
* Added support for WPA2 Enterprise
Adafruit's Arduino NINA-W102 firmware 1.2.2 - 2019.02.28
* First official Adafruit release
## Arduino firmware
Arduino NINA-W102 firmware 1.5.0 - 2022.07.09
* Add BSD-like sockets APIs (on command range 0x70 -> 0x7f)
* Fix ADC readings range (fuill scale range is now ~2.7V)
Arduino NINA-W102 firmware 1.4.8 - 2021.07.29
* Fix issue due to repeated status()/connected() call (#73)
Arduino NINA-W102 firmware 1.4.7 - 2021.06.18
Functionally identical with 1.4.6, except version number.
This release was made necessary because bad arguments were used with the FirmwareUploader tool
on Arduino Cloud for updating NINA-FWs (effectively deleting all certificates except the one
fetched by the tool). Now all Cloud-Connected NINA-FWs need to be updated once more which is
only possible by incrementing the firmware version number.
Arduino NINA-W102 firmware 1.4.6 - 2021.06.09
* Add a new root certificate list including detailed instructions how to update it (#71)
Arduino NINA-W102 firmware 1.4.5 - 2021.05.05
* Adding support for Arduino RP2040 Nano Connect (#67)
* Added ISRG Root X1 for LetsEncrypt (#68)
Arduino NINA-W102 firmware 1.4.4 - 2021.04.13
* Adding support for Arduino RP2040 Nano Connect (#64)
Arduino NINA-W102 firmware 1.4.3 - 2021.01.29
* Do not immediately close connection after 1 failed write (#62)
Arduino NINA-W102 firmware 1.4.2 - 2021.01.28
Port BearSSL + crypto integration to NINA (#57). This allows to offload BearSSL for Arduino IoT Cloud applications to the nina module, drastically saving on flash/RAM.
Arduino NINA-W102 firmware 1.4.1 - 2020.08.17
* Direct download of OTA binary to Nina storage and verifying both CRC and length (#53)
Arduino NINA-W102 firmware 1.4.0 - 2020.07.13
* Adding API which allows to utilize the nina file system as an external storage module for the host CPU (#32)
* Fixing bug leading to packet corruption in situation of high UDP traffic (#49)
* Fixing bug leading to missing packets and connection drop (#50)
Arduino NINA-W102 firmware 1.3.0 - 2019.12.23
* Fixed channel's assignement for WiFi.beginAP(...)
* Fixed set host name API begin connecting to AP
* Updated to IDF v3.3.1
* Added WPA2 Enterprise support (PEAP/MSCHAPv2 + EAP-TLS)
Arduino NINA-W102 firmware 1.2.4 - 2019.06.14
* Disabled CONFIG_LWIP_DHCP_DOES_ARP_CHECK
* Added small delay to WiFiUDP.parsePacket() allow other tasks to run
* Updated to esp-idf v3.3 branch
Arduino NINA-W102 firmware 1.2.3 - 2018.04.09
* Added reason code command to retrieve the disconnect reason code
* WiFiSSLClient: enable SNI via mbedtls_ssl_set_hostname when using hostname
Arduino NINA-W102 firmware 1.2.2 - 2018.03.26
* Changed connections to use WIFI_FAST_SCAN instead of WIFI_ALL_CHANNEL_SCAN
* Changed ASSOC_FAIL error handling, to now try to re-connect
* Added phy_init partition with u-blox recommended phy init data and use
* Fixed socket connections hanging when WiFi is disconnected
* Fixed issues where DNS server could be reset to 0.0.0.0 on WiFi re-connections
* Updated to use esp-idf 3.1.3
Arduino NINA-W102 firmware 1.2.1 - 2018.11.16
* Fixed factory SSL certificates being incorrectly parsed due to OOM caused by Bluetooth inclusion
Arduino NINA-W102 firmware 1.2.0 - 2018.11.13
* Fixed DNS servers not sticking when static IP address is used
* Added HCI UART mode on boot, enabled if SS is LOW
* Erase NVS flash on init failure
Arduino NINA-W102 firmware 1.1.0 - 2018.10.4
* WiFi is now stopped before connecting to AP
* Changed default STA hostname to "arduino-XXYY"
* Switched to all channel scan when connecting to AP in STA mode
* Fixed static IP's support in STA + AP modes
* Return failure on bad AP params
* Moved certificates to separate mmapped partition, added a larger set of built-in root CA's
* Updated to use esp-idf v3.1
Arduino NINA-W102 firmware 1.0.0 - 2018.06.28
* Initial release

41
CMakeLists.txt Normal file
View file

@ -0,0 +1,41 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
if (BOARD STREQUAL "fruitjam_c6")
set(IDF_TARGET esp32c6 CACHE STRING "Target ESP-IDF board")
elseif (BOARD STREQUAL "esp32")
set(IDF_TARGET esp32 CACHE STRING "Target ESP-IDF board")
else ()
message(FATAL_ERROR "Unsupported BOARD: ${BOARD}. Supported boards are: fruitjam_c6, esp32")
endif ()
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
set(SDKCONFIG_DEFAULTS sdkconfig.defaults ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/sdkconfig)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND SDKCONFIG_DEFAULTS sdkconfig.debug)
endif ()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(CMAKE_BUILD_TYPE_DEBUG)
endif ()
STRING(TOUPPER ${BOARD} BOARD_UPPER)
add_compile_definitions(
BOARD_${BOARD_UPPER}
)
set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/boards)
# required when upgrading to esp-idf v5.5 and arduino-esp32 v3.3.0
add_link_options("-Wl,-u,__wrap_esp_log_writev")
project(nina-fw)
# Post build to run combine.py
add_custom_command(TARGET app POST_BUILD
COMMAND python ${CMAKE_CURRENT_LIST_DIR}/combine.py -b ${CMAKE_BINARY_DIR} NINA_ADAFRUIT-${BOARD}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
VERBATIM
)

View file

@ -1,15 +1,57 @@
PROJECT_NAME := nina-fw PROJECT_NAME := nina-fw
# Passthrough Board Port
M4_PORT := /dev/cu.usbmodem14121301
UPLOAD_BAUD = 115200
# ESP32 USB Serial Port
ESP_PORT := /dev/cu.usbserial-AH03B302
# Directories and Files
BOOT_VOLUME := /Volumes/FEATHERBOOT/.
CIRCUITPYTHON_UF2 := circuitpython.uf2
EXTRA_COMPONENT_DIRS := $(PWD)/arduino EXTRA_COMPONENT_DIRS := $(PWD)/arduino
CPPFLAGS += -DARDUINO
ifeq ($(RELEASE),1) ifeq ($(RELEASE),1)
CFLAGS += -DNDEBUG -DCONFIG_FREERTOS_ASSERT_DISABLE -Os -DLOG_LOCAL_LEVEL=0 CFLAGS += -DNDEBUG -DCONFIG_FREERTOS_ASSERT_DISABLE -Os -DLOG_LOCAL_LEVEL=0
CPPFLAGS += -DNDEBUG -Os CPPFLAGS += -DNDEBUG -Os
endif endif
ifeq ($(UNO_WIFI_REV2),1)
CFLAGS += -DUNO_WIFI_REV2
CPPFLAGS += -DUNO_WIFI_REV2
endif
ifeq ($(NANO_RP2040_CONNECT),1)
CFLAGS += -DNANO_RP2040_CONNECT
CPPFLAGS += -DNANO_RP2040_CONNECT
endif
include $(IDF_PATH)/make/project.mk include $(IDF_PATH)/make/project.mk
load-passthrough:
cp passthrough.UF2 $(BOOT_VOLUME)
load-nina:
esptool.py --port $(M4_PORT) --before no_reset --baud $(UPLOAD_BAUD) write_flash 0 $(wildcard NINA_W102-*.bin)
load-circuitpython:
cp $(CIRCUITPYTHON_UF2) $(BOOT_VOLUME)
serial:
miniterm.py $(ESP_PORT) $(UPLOAD_BAUD)
firmware: all firmware: all
python combine.py python combine.py
.PHONY: firmware .PHONY: firmware
.PHONY: load-passthrough
.PHONY: load-nina
.PHONY: load-circuitpython
.PHONY: serial

View file

@ -1,20 +1,69 @@
# Arduino NINA-W102 firmware # Adafruit fork of the Arduino NINA-W102 firmware
[![Build Status](https://travis-ci.com/adafruit/nina-fw.svg?branch=master)](https://travis-ci.com/adafruit/nina-fw)
This is the Adafruit fork of the Arduino NINA-W102 firmware. The original
repository is located at https://github.com/arduino/nina-fw
This firmware uses [Espressif's IDF](https://github.com/espressif/esp-idf) This firmware uses [Espressif's IDF](https://github.com/espressif/esp-idf)
## Contributing to nina-fw
Please be aware that by contributing to this project
you are agreeing to the [Code of Conduct](https://github.com/adafruit/nina-fw/blob/master/code-of-conduct.md).
Contributors who follow the [Code of Conduct](https://github.com/adafruit/nina-fw/blob/master/code-of-conduct.md)
are welcome to submit pull requests and they will be promptly
reviewed by project admins. Please join the [Discord](https://adafru.it/discord) too.
The NINA firmware version needs to be updated in two places in this repo:
1. CommandHandler.cpp
1. CHANGELOG
## Building ## Building
1. [Download the ESP32 toolchain](http://esp-idf.readthedocs.io/en/v3.0/get-started/index.html#setup-toolchain) The firmware shipped in Adafruit's products is compiled following these
instructions. These may differ from the instructions included in the
original Arduino firmware repository.
1. [Download the ESP32 toolchain](https://docs.espressif.com/projects/esp-idf/en/v3.3.1/get-started/index.html#setup-toolchain)
1. Extract it and add it to your `PATH`: `export PATH=$PATH:<path/to/toolchain>/bin` 1. Extract it and add it to your `PATH`: `export PATH=$PATH:<path/to/toolchain>/bin`
1. Clone **v3.0** of the IDF: `git clone --branch v3.0 --recursive https://github.com/espressif/esp-idf.git` 1. Clone **v5.5** of the IDF: `git clone --branch v5.5 --recursive https://github.com/espressif/esp-idf.git`
1. Set the `IDF_PATH` environment variable: `export IDF_PATH=<path/to/idf>` 1. Set the `IDF_PATH` environment variable: `export IDF_PATH=<path/to/idf>`
1. Run `make` to build the firmware (in the directory of this read me) 1. `git submodule update --init` to fetch the `certificates` submodule.
1. Load the `WiFiNINAFirmwareUpdater` example sketch on to the board 1. Run `make firmware` to build the firmware (in the directory of this read me)
1. Use `esptool` to flash the compiled firmware 1. You may need to set up a python3 `venv` to avoid Python library version issues.
1. You should have a file named `NINA_W102-x.x.x.bin` in the top directory
1. Use appropriate tools (`esptool.py`, appropriate pass-through firmware etc)
to load this binary file onto your board.
a. If you do not know how to do this, [we have an excellent guide on the Adafruit Learning System for upgrading your ESP32's firmware](https://learn.adafruit.com/upgrading-esp32-firmware)
## Packaging
The `make` command produces a bunch of binary files that must be flashed at very precise locations, making `esptool` commandline quite complicated.
Instead, once the firmware has been compiled, you can invoke `combine.py` script to produce a monolithic binary that can be flashed at 0x0.
```
make
python combine.py
```
This produces `NINA_W102.bin-{version}` file (a different name can be specified as parameter). To flash this file you can use https://learn.adafruit.com/upgrading-esp32-firmware
## Build a new certificate list (based on the Google Android root CA list)
```bash
git clone https://android.googlesource.com/platform/system/ca-certificates
cp nina-fw/tools/nina-fw-create-roots.sh ca-certificates/files
cd ca-certificates/files
./nina-fw-create-roots.sh
cp roots.pem ../../nina-fw/data/roots.pem
```
## Check certificate list against URL list
```bash
cd tools
./sslcheck.sh -c ../data/roots.pem -l url_lists/url_list_moz.com.txt -e
```
## License ## License
Copyright (c) 2018 Arduino SA. All rights reserved. Copyright (c) 2018-2019 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public

View file

@ -1,3 +0,0 @@
COMPONENT_ADD_INCLUDEDIRS := cores/esp32 libraries/SPIS/src libraries/WiFi/src
COMPONENT_SRCDIRS := cores/esp32 libraries/SPIS/src libraries/WiFi/src

View file

@ -1,52 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ARDUINO_H
#define ARDUINO_H
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef __cplusplus
extern "C"{
#endif // __cplusplus
// system functions
void init(void);
// sketch
void setup(void);
void loop(void);
#ifdef __cplusplus
} // extern "C"
#endif
#ifdef __cplusplus
#include "WMath.h"
#endif
#include "delay.h"
#include "wiring_digital.h"
#include "wiring_analog.h"
#endif // ARDUINO_H

View file

@ -1,74 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <driver/gpio.h>
#include "wiring_digital.h"
#include "WInterrupts.h"
static voidFuncPtr callbacksInt[GPIO_NUM_MAX] = { NULL };
void IRAM_ATTR gpioInterruptHandler(void* arg)
{
uint32_t pin = (uint32_t)arg;
if (callbacksInt[pin]) {
callbacksInt[pin]();
}
}
void attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode)
{
callbacksInt[pin] = callback;
switch (mode) {
case LOW:
gpio_set_intr_type((gpio_num_t)pin, GPIO_INTR_LOW_LEVEL);
gpio_wakeup_enable((gpio_num_t)pin, GPIO_INTR_LOW_LEVEL);
break;
case HIGH:
gpio_set_intr_type((gpio_num_t)pin, GPIO_INTR_HIGH_LEVEL);
gpio_wakeup_enable((gpio_num_t)pin, GPIO_INTR_HIGH_LEVEL);
break;
case CHANGE:
gpio_set_intr_type((gpio_num_t)pin, GPIO_INTR_ANYEDGE);
break;
case FALLING:
gpio_set_intr_type((gpio_num_t)pin, GPIO_INTR_NEGEDGE);
break;
case RISING:
gpio_set_intr_type((gpio_num_t)pin, GPIO_INTR_POSEDGE);
break;
default:
gpio_set_intr_type((gpio_num_t)pin, GPIO_INTR_DISABLE);
break;
}
gpio_install_isr_service(ESP_INTR_FLAG_LEVEL3);
gpio_isr_handler_add((gpio_num_t)pin, gpioInterruptHandler, (void*)pin);
gpio_intr_enable((gpio_num_t)pin);
}

View file

@ -1,43 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _WIRING_INTERRUPTS_
#define _WIRING_INTERRUPTS_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
// #define LOW 0
// #define HIGH 1
#define CHANGE 2
#define FALLING 3
#define RISING 4
typedef void (*voidFuncPtr)(void);
void attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,33 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
extern "C" {
#include <esp_system.h>
}
#include "WMath.h"
extern long random(long howbig)
{
if(howbig == 0) {
return 0;
}
return esp_random() % howbig;
}

View file

@ -1,33 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _WIRING_MATH_
#define _WIRING_MATH_
#ifdef __cplusplus
extern "C" {
#endif
extern long random(long);
#ifdef __cplusplus
}
#endif
#endif /* _WIRING_MATH_ */

View file

@ -1,33 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "delay.h"
unsigned long millis()
{
return xTaskGetTickCount() * portTICK_PERIOD_MS;
}
void delay(uint32_t ms)
{
vTaskDelay(ms / portTICK_PERIOD_MS);
}

View file

@ -1,37 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DELAY_H
#define DELAY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
extern unsigned long millis();
extern void delay(uint32_t ms);
#ifdef __cplusplus
}
#endif
#endif // DELAY_H

View file

@ -1,40 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#define ARDUINO_MAIN
#include "Arduino.h"
void arduino_main(void*) {
init();
setup();
while (1) {
loop();
}
}
extern "C" {
void app_main() {
xTaskCreatePinnedToCore(arduino_main, "arduino", 8192, NULL, 1, NULL, 1);
}
}

View file

@ -1,26 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <nvs_flash.h>
#include "Arduino.h"
void init() {
nvs_flash_init();
}

View file

@ -1,45 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <driver/ledc.h>
#include "wiring_analog.h"
void analogWrite(uint32_t pin, uint32_t value)
{
periph_module_enable(PERIPH_LEDC_MODULE);
ledc_timer_config_t timerConf = {
.bit_num = LEDC_TIMER_10_BIT,
.freq_hz = 1000,
.speed_mode = LEDC_HIGH_SPEED_MODE,
.timer_num = (pin / 7),
};
ledc_timer_config(&timerConf);
ledc_channel_config_t ledc_conf = {
.channel = (pin % 7),
.duty = (value << 2),
.gpio_num = pin,
.intr_type = LEDC_INTR_DISABLE,
.speed_mode = LEDC_HIGH_SPEED_MODE,
.timer_sel = (pin / 7)
};
ledc_channel_config(&ledc_conf);
}

View file

@ -1,35 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIRING_ANALOG_H
#define WIRING_ANALOG_H
#include "Arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void analogWrite(uint32_t pin, uint32_t value);
#ifdef __cplusplus
}
#endif
#endif // WIRING_ANALOG_H

View file

@ -1,44 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <driver/gpio.h>
#include "wiring_digital.h"
void pinMode(uint32_t pin, uint32_t mode)
{
switch (mode) {
case INPUT:
gpio_set_direction((gpio_num_t)pin, GPIO_MODE_INPUT);
gpio_set_pull_mode((gpio_num_t)pin, GPIO_FLOATING);
break;
case OUTPUT:
gpio_set_direction((gpio_num_t)pin, GPIO_MODE_OUTPUT);
gpio_set_pull_mode((gpio_num_t)pin, GPIO_FLOATING);
break;
}
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin], PIN_FUNC_GPIO);
}
void digitalWrite(uint32_t pin, uint32_t val)
{
gpio_set_level((gpio_num_t)pin, val);
}

View file

@ -1,43 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIRING_DIGITAL_H
#define WIRING_DIGITAL_H
#include "Arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
#define LOW 0x00
#define HIGH 0x01
#define INPUT 0x00
#define OUTPUT 0x01
extern void pinMode(uint32_t pin, uint32_t mode);
extern void digitalWrite(uint32_t pin, uint32_t val);
#ifdef __cplusplus
}
#endif
#endif // WIRING_DIGITAL_H

View file

@ -1,682 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <time.h>
#include <esp_wifi.h>
#include <tcpip_adapter.h>
#include <apps/sntp/sntp.h>
#include <lwip/dns.h>
#include <lwip/netdb.h>
#include <lwip/raw.h>
#include <lwip/icmp.h>
#include <lwip/sockets.h>
#include <lwip/ip_addr.h>
#include <lwip/inet_chksum.h>
#include "WiFi.h"
WiFiClass::WiFiClass() :
_initialized(false),
_status(WL_NO_SHIELD),
_interface(ESP_IF_WIFI_STA),
_onReceiveCallback(NULL)
{
_eventGroup = xEventGroupCreate();
memset(&_apRecord, 0x00, sizeof(_apRecord));
memset(&_ipInfo, 0x00, sizeof(_ipInfo));
}
uint8_t WiFiClass::status()
{
if (!_initialized) {
_initialized = true;
init();
}
return _status;
}
int WiFiClass::hostByName(const char* hostname, /*IPAddress*/uint32_t& result)
{
result = 0xffffffff;
struct hostent* hostEntry = lwip_gethostbyname(hostname);
if (hostEntry == NULL) {
return 0;
}
memcpy(&result, hostEntry->h_addr_list[0], sizeof(result));
return 1;
}
int WiFiClass::ping(/*IPAddress*/uint32_t host, uint8_t ttl)
{
uint32_t timeout = 5000;
int s = socket(AF_INET, SOCK_RAW, IP_PROTO_ICMP);
struct timeval timeoutVal;
timeoutVal.tv_sec = (timeout / 1000);
timeoutVal.tv_usec = (timeout % 1000) * 1000;
setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeoutVal, sizeof(timeoutVal));
setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
struct __attribute__((__packed__)) {
struct icmp_echo_hdr header;
uint8_t data[32];
} request;
ICMPH_TYPE_SET(&request.header, ICMP_ECHO);
ICMPH_CODE_SET(&request.header, 0);
request.header.chksum = 0;
request.header.id = 0xAFAF;
request.header.seqno = random(0xffff);
for (size_t i = 0; i < sizeof(request.data); i++) {
request.data[i] = i;
}
request.header.chksum = inet_chksum(&request, sizeof(request));
ip_addr_t addr;
addr.type = IPADDR_TYPE_V4;
addr.u_addr.ip4.addr = host;
// IP_ADDR4(&addr, ip[0], ip[1], ip[2], ip[3]);
struct sockaddr_in to;
struct sockaddr_in from;
to.sin_len = sizeof(to);
to.sin_family = AF_INET;
inet_addr_from_ipaddr(&to.sin_addr, ip_2_ip4(&addr));
sendto(s, &request, sizeof(request), 0, (struct sockaddr*)&to, sizeof(to));
unsigned long sendTime = millis();
unsigned long recvTime = 0;
do {
socklen_t fromlen = sizeof(from);
struct __attribute__((__packed__)) {
struct ip_hdr ipHeader;
struct icmp_echo_hdr header;
} response;
int rxSize = recvfrom(s, &response, sizeof(response), 0, (struct sockaddr*)&from, (socklen_t*)&fromlen);
if (rxSize == -1) {
// time out
break;
}
if (rxSize < sizeof(response)) {
// too short
continue;
}
if (from.sin_family != AF_INET) {
// not IPv4
continue;
}
if ((response.header.id == request.header.id) && (response.header.seqno == request.header.seqno)) {
recvTime = millis();
}
} while (recvTime == 0);
close(s);
if (recvTime == 0) {
return -1;
} else {
return (recvTime - sendTime);
}
}
uint8_t WiFiClass::begin(const char* ssid)
{
return begin(ssid, "");
}
uint8_t WiFiClass::begin(const char* ssid, uint8_t key_idx, const char* key)
{
return begin(ssid, key);
}
uint8_t WiFiClass::begin(const char* ssid, const char* key)
{
wifi_config_t wifiConfig;
memset(&wifiConfig, 0x00, sizeof(wifiConfig));
strncpy((char*)wifiConfig.sta.ssid, ssid, sizeof(wifiConfig.sta.ssid));
strncpy((char*)wifiConfig.sta.password, key, sizeof(wifiConfig.sta.password));
wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN;
_status = WL_NO_SSID_AVAIL;
_interface = ESP_IF_WIFI_STA;
esp_wifi_stop();
esp_wifi_set_mode(WIFI_MODE_STA);
esp_wifi_start();
xEventGroupWaitBits(_eventGroup, BIT0, false, true, portMAX_DELAY);
if (esp_wifi_set_config(ESP_IF_WIFI_STA, &wifiConfig) != ESP_OK) {
_status = WL_CONNECT_FAILED;
}
esp_wifi_connect();
return _status;
}
uint8_t WiFiClass::beginAP(const char *ssid, uint8_t channel)
{
wifi_config_t wifiConfig;
memset(&wifiConfig, 0x00, sizeof(wifiConfig));
strncpy((char*)wifiConfig.ap.ssid, ssid, sizeof(wifiConfig.sta.ssid));
wifiConfig.ap.channel = 0;
wifiConfig.ap.authmode = WIFI_AUTH_OPEN;
wifiConfig.ap.max_connection = 4;
_status = WL_NO_SSID_AVAIL;
_interface = ESP_IF_WIFI_AP;
esp_wifi_stop();
esp_wifi_set_mode(WIFI_MODE_AP);
if (esp_wifi_set_config(ESP_IF_WIFI_AP, &wifiConfig) != ESP_OK) {
_status = WL_AP_FAILED;
}
esp_wifi_start();
xEventGroupWaitBits(_eventGroup, BIT1, false, true, portMAX_DELAY);
return _status;
}
uint8_t WiFiClass::beginAP(const char *ssid, uint8_t key_idx, const char* key, uint8_t channel)
{
wifi_config_t wifiConfig;
memset(&wifiConfig, 0x00, sizeof(wifiConfig));
strncpy((char*)wifiConfig.ap.ssid, ssid, sizeof(wifiConfig.sta.ssid));
strncpy((char*)wifiConfig.ap.password, key, sizeof(wifiConfig.sta.password));
wifiConfig.ap.channel = 0;
wifiConfig.ap.authmode = WIFI_AUTH_WEP;
wifiConfig.ap.max_connection = 4;
_status = WL_NO_SSID_AVAIL;
_interface = ESP_IF_WIFI_AP;
esp_wifi_stop();
esp_wifi_set_mode(WIFI_MODE_AP);
if (esp_wifi_set_config(ESP_IF_WIFI_AP, &wifiConfig) != ESP_OK) {
_status = WL_AP_FAILED;
}
esp_wifi_start();
xEventGroupWaitBits(_eventGroup, BIT1, false, true, portMAX_DELAY);
return _status;
}
uint8_t WiFiClass::beginAP(const char *ssid, const char* key, uint8_t channel)
{
wifi_config_t wifiConfig;
memset(&wifiConfig, 0x00, sizeof(wifiConfig));
strncpy((char*)wifiConfig.ap.ssid, ssid, sizeof(wifiConfig.sta.ssid));
strncpy((char*)wifiConfig.ap.password, key, sizeof(wifiConfig.sta.password));
wifiConfig.ap.channel = 0;
wifiConfig.ap.authmode = WIFI_AUTH_WPA_WPA2_PSK;
wifiConfig.ap.max_connection = 4;
_status = WL_NO_SSID_AVAIL;
_interface = ESP_IF_WIFI_AP;
esp_wifi_stop();
esp_wifi_set_mode(WIFI_MODE_AP);
if (esp_wifi_set_config(ESP_IF_WIFI_AP, &wifiConfig) != ESP_OK) {
_status = WL_AP_FAILED;
}
esp_wifi_start();
xEventGroupWaitBits(_eventGroup, BIT1, false, true, portMAX_DELAY);
return _status;
}
void WiFiClass::config(/*IPAddress*/uint32_t local_ip, /*IPAddress*/uint32_t gateway, /*IPAddress*/uint32_t subnet)
{
dns_clear_servers(true);
_ipInfo.ip.addr = local_ip;
_ipInfo.gw.addr = gateway;
_ipInfo.netmask.addr = subnet;
tcpip_adapter_set_ip_info(_interface == ESP_IF_WIFI_AP ? TCPIP_ADAPTER_IF_AP : TCPIP_ADAPTER_IF_STA, &_ipInfo);
}
void WiFiClass::setDNS(/*IPAddress*/uint32_t dns_server1, /*IPAddress*/uint32_t dns_server2)
{
ip_addr_t d;
d.type = IPADDR_TYPE_V4;
if (dns_server1) {
d.u_addr.ip4.addr = static_cast<uint32_t>(dns_server1);
dns_setserver(0, &d);
}
if (dns_server2) {
d.u_addr.ip4.addr = static_cast<uint32_t>(dns_server2);
dns_setserver(1, &d);
}
}
void WiFiClass::hostname(const char* name)
{
tcpip_adapter_set_hostname(_interface == ESP_IF_WIFI_AP ? TCPIP_ADAPTER_IF_AP : TCPIP_ADAPTER_IF_STA, name);
}
void WiFiClass::disconnect()
{
esp_wifi_disconnect();
esp_wifi_stop();
}
void WiFiClass::end()
{
esp_wifi_stop();
}
uint8_t* WiFiClass::macAddress(uint8_t* mac)
{
uint8_t macTemp[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
esp_wifi_get_mac(_interface, macTemp);
mac[0] = macTemp[5];
mac[1] = macTemp[4];
mac[2] = macTemp[3];
mac[3] = macTemp[2];
mac[4] = macTemp[1];
mac[5] = macTemp[0];
return mac;
}
uint32_t WiFiClass::localIP()
{
return _ipInfo.ip.addr;
}
uint32_t WiFiClass::subnetMask()
{
return _ipInfo.netmask.addr;
}
uint32_t WiFiClass::gatewayIP()
{
return _ipInfo.gw.addr;
}
char* WiFiClass::SSID()
{
return (char*)_apRecord.ssid;
}
int32_t WiFiClass::RSSI()
{
if (_interface == ESP_IF_WIFI_AP) {
return 0;
} else {
esp_wifi_sta_get_ap_info(&_apRecord);
return _apRecord.rssi;
}
}
uint8_t WiFiClass::encryptionType()
{
uint8_t encryptionType = _apRecord.authmode;
if (encryptionType == WIFI_AUTH_OPEN) {
encryptionType = 7;
} else if (encryptionType == WIFI_AUTH_WEP) {
encryptionType = 5;
} else if (encryptionType == WIFI_AUTH_WPA_PSK) {
encryptionType = 2;
} else if (encryptionType == WIFI_AUTH_WPA2_PSK || encryptionType == WIFI_AUTH_WPA_WPA2_PSK) {
encryptionType = 4;
} else {
// unknown?
encryptionType = 255;
}
return encryptionType;
}
uint8_t* WiFiClass::BSSID(uint8_t* bssid)
{
if (_interface == ESP_IF_WIFI_AP) {
return macAddress(bssid);
} else {
bssid[0] = _apRecord.bssid[5];
bssid[1] = _apRecord.bssid[4];
bssid[2] = _apRecord.bssid[3];
bssid[3] = _apRecord.bssid[2];
bssid[4] = _apRecord.bssid[1];
bssid[5] = _apRecord.bssid[0];
return bssid;
}
}
int8_t WiFiClass::scanNetworks()
{
esp_wifi_set_mode(WIFI_MODE_STA);
esp_wifi_start();
xEventGroupWaitBits(_eventGroup, BIT0, false, true, portMAX_DELAY);
wifi_scan_config_t config;
config.ssid = 0;
config.bssid = 0;
config.channel = 0;
config.show_hidden = false;
config.scan_type = WIFI_SCAN_TYPE_ACTIVE;
config.scan_time.active.min = 100;
config.scan_time.active.max = 300;
xEventGroupClearBits(_eventGroup, BIT2);
if (esp_wifi_scan_start(&config, false) != ESP_OK) {
_status = WL_NO_SSID_AVAIL;
return 0;
}
xEventGroupWaitBits(_eventGroup, BIT2, false, true, portMAX_DELAY);
uint16_t numNetworks;
esp_wifi_scan_get_ap_num(&numNetworks);
if (numNetworks > MAX_SCAN_RESULTS) {
numNetworks = MAX_SCAN_RESULTS;
}
esp_wifi_scan_get_ap_records(&numNetworks, _scanResults);
_status = WL_SCAN_COMPLETED;
return numNetworks;
}
char* WiFiClass::SSID(uint8_t pos)
{
return (char*)_scanResults[pos].ssid;
}
int32_t WiFiClass::RSSI(uint8_t pos)
{
return _scanResults[pos].rssi;
}
uint8_t WiFiClass::encryptionType(uint8_t pos)
{
uint8_t encryptionType = _scanResults[pos].authmode;
if (encryptionType == WIFI_AUTH_OPEN) {
encryptionType = 7;
} else if (encryptionType == WIFI_AUTH_WEP) {
encryptionType = 5;
} else if (encryptionType == WIFI_AUTH_WPA_PSK) {
encryptionType = 2;
} else if (encryptionType == WIFI_AUTH_WPA2_PSK || encryptionType == WIFI_AUTH_WPA_WPA2_PSK) {
encryptionType = 4;
} else {
// unknown?
encryptionType = 255;
}
return encryptionType;
}
uint8_t* WiFiClass::BSSID(uint8_t pos, uint8_t* bssid)
{
const uint8_t* tempBssid = _scanResults[pos].bssid;
bssid[0] = tempBssid[5];
bssid[1] = tempBssid[4];
bssid[2] = tempBssid[3];
bssid[3] = tempBssid[2];
bssid[4] = tempBssid[1];
bssid[5] = tempBssid[0];
return bssid;
}
uint8_t WiFiClass::channel(uint8_t pos)
{
return _scanResults[pos].primary;
}
unsigned long WiFiClass::getTime()
{
time_t now;
time(&now);
if (now < 946684800) {
return 0;
}
return now;
}
void WiFiClass::lowPowerMode()
{
esp_wifi_set_ps(WIFI_PS_MODEM);
}
void WiFiClass::noLowPowerMode()
{
esp_wifi_set_ps(WIFI_PS_NONE);
}
void WiFiClass::onReceive(void(*callback)(void))
{
_onReceiveCallback = callback;
}
err_t WiFiClass::staNetifInputHandler(struct pbuf* p, struct netif* inp)
{
return WiFi.handleStaNetifInput(p, inp);
}
err_t WiFiClass::apNetifInputHandler(struct pbuf* p, struct netif* inp)
{
return WiFi.handleApNetifInput(p, inp);
}
err_t WiFiClass::handleStaNetifInput(struct pbuf* p, struct netif* inp)
{
err_t result = _staNetifInput(p, inp);
if (_onReceiveCallback) {
_onReceiveCallback();
}
return result;
}
err_t WiFiClass::handleApNetifInput(struct pbuf* p, struct netif* inp)
{
err_t result = _apNetifInput(p, inp);
if (_onReceiveCallback) {
_onReceiveCallback();
}
return result;
}
void WiFiClass::init()
{
tcpip_adapter_init();
esp_event_loop_init(WiFiClass::systemEventHandler, this);
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
esp_wifi_init(&cfg);
esp_wifi_set_storage(WIFI_STORAGE_RAM);
sntp_setoperatingmode(SNTP_OPMODE_POLL);
sntp_setservername(0, (char*)"0.pool.ntp.org");
sntp_setservername(1, (char*)"1.pool.ntp.org");
sntp_setservername(2, (char*)"2.pool.ntp.org");
sntp_init();
_status = WL_IDLE_STATUS;
}
esp_err_t WiFiClass::systemEventHandler(void* ctx, system_event_t* event)
{
((WiFiClass*)ctx)->handleSystemEvent(event);
return ESP_OK;
}
void WiFiClass::handleSystemEvent(system_event_t* event)
{
switch (event->event_id) {
case SYSTEM_EVENT_SCAN_DONE:
xEventGroupSetBits(_eventGroup, BIT2);
break;
case SYSTEM_EVENT_STA_START: {
struct netif* staNetif;
uint8_t mac[6];
char defaultHostname[13];
esp_wifi_get_mac(ESP_IF_WIFI_STA, mac);
sprintf(defaultHostname, "arduino-%.2x%.2x", mac[4], mac[5]);
tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA, defaultHostname);
if (tcpip_adapter_get_netif(TCPIP_ADAPTER_IF_STA, (void**)&staNetif) == ESP_OK) {
if (staNetif->input != WiFiClass::staNetifInputHandler) {
_staNetifInput = staNetif->input;
staNetif->input = WiFiClass::staNetifInputHandler;
}
}
xEventGroupSetBits(_eventGroup, BIT0);
break;
}
case SYSTEM_EVENT_STA_STOP:
xEventGroupClearBits(_eventGroup, BIT0);
break;
case SYSTEM_EVENT_STA_CONNECTED:
esp_wifi_sta_get_ap_info(&_apRecord);
break;
case SYSTEM_EVENT_STA_GOT_IP:
memcpy(&_ipInfo, &event->event_info.got_ip.ip_info, sizeof(_ipInfo));
_status = WL_CONNECTED;
break;
case SYSTEM_EVENT_STA_DISCONNECTED: {
uint8_t reason = event->event_info.disconnected.reason;
memset(&_apRecord, 0x00, sizeof(_apRecord));
if (reason == 201/*NO_AP_FOUND*/ || reason == 202/*AUTH_FAIL*/ || reason == 203/*ASSOC_FAIL*/) {
_status = WL_CONNECT_FAILED;
} else {
_status = WL_DISCONNECTED;
}
break;
}
case SYSTEM_EVENT_STA_LOST_IP:
memset(&_ipInfo, 0x00, sizeof(_ipInfo));
_status = WL_CONNECTION_LOST;
break;
case SYSTEM_EVENT_AP_START: {
struct netif* apNetif;
if (tcpip_adapter_get_netif(TCPIP_ADAPTER_IF_AP, (void**)&apNetif) == ESP_OK) {
if (apNetif->input != WiFiClass::apNetifInputHandler) {
_apNetifInput = apNetif->input;
apNetif->input = WiFiClass::apNetifInputHandler;
}
}
wifi_config_t config;
esp_wifi_get_config(ESP_IF_WIFI_AP, &config);
memcpy(_apRecord.ssid, config.ap.ssid, sizeof(config.ap.ssid));
_apRecord.authmode = config.ap.authmode;
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &_ipInfo);
_status = WL_AP_LISTENING;
xEventGroupSetBits(_eventGroup, BIT1);
break;
}
case SYSTEM_EVENT_AP_STOP:
_status = WL_IDLE_STATUS;
memset(&_apRecord, 0x00, sizeof(_apRecord));
memset(&_ipInfo, 0x00, sizeof(_ipInfo));
xEventGroupClearBits(_eventGroup, BIT1);
break;
case SYSTEM_EVENT_AP_STACONNECTED:
_status = WL_AP_CONNECTED;
break;
case SYSTEM_EVENT_AP_STADISCONNECTED:
wifi_sta_list_t staList;
esp_wifi_ap_get_sta_list(&staList);
if (staList.num == 0) {
_status = WL_AP_LISTENING;
}
break;
default:
break;
}
}
WiFiClass WiFi;

View file

@ -1,129 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIFI_H
#define WIFI_H
#include <esp_event_loop.h>
#include <freertos/FreeRTOS.h>
#include <freertos/event_groups.h>
#include <lwip/netif.h>
#include <Arduino.h>
typedef enum {
WL_NO_SHIELD = 255,
WL_IDLE_STATUS = 0,
WL_NO_SSID_AVAIL,
WL_SCAN_COMPLETED,
WL_CONNECTED,
WL_CONNECT_FAILED,
WL_CONNECTION_LOST,
WL_DISCONNECTED,
WL_AP_LISTENING,
WL_AP_CONNECTED,
WL_AP_FAILED,
} wl_status_t;
#define MAX_SCAN_RESULTS 10
class WiFiClass
{
public:
WiFiClass();
uint8_t begin(const char* ssid);
uint8_t begin(const char* ssid, uint8_t key_idx, const char* key);
uint8_t begin(const char* ssid, const char* key);
uint8_t beginAP(const char *ssid, uint8_t channel);
uint8_t beginAP(const char *ssid, uint8_t key_idx, const char* key, uint8_t channel);
uint8_t beginAP(const char *ssid, const char* key, uint8_t channel);
void config(/*IPAddress*/uint32_t local_ip, /*IPAddress*/uint32_t gateway, /*IPAddress*/uint32_t subnet);
void setDNS(/*IPAddress*/uint32_t dns_server1, /*IPAddress*/uint32_t dns_server2);
void hostname(const char* name);
void disconnect();
void end();
uint8_t* macAddress(uint8_t* mac);
uint32_t localIP();
uint32_t subnetMask();
uint32_t gatewayIP();
char* SSID();
int32_t RSSI();
uint8_t encryptionType();
uint8_t* BSSID(uint8_t* bssid);
int8_t scanNetworks();
char* SSID(uint8_t pos);
int32_t RSSI(uint8_t pos);
uint8_t encryptionType(uint8_t pos);
uint8_t* BSSID(uint8_t pos, uint8_t* bssid);
uint8_t channel(uint8_t pos);
uint8_t status();
int hostByName(const char* hostname, /*IPAddress*/uint32_t& result);
int ping(/*IPAddress*/uint32_t host, uint8_t ttl);
unsigned long getTime();
void lowPowerMode();
void noLowPowerMode();
void onReceive(void(*)(void));
private:
void init();
static esp_err_t systemEventHandler(void* ctx, system_event_t* event);
void handleSystemEvent(system_event_t* event);
static err_t staNetifInputHandler(struct pbuf* p, struct netif* inp);
static err_t apNetifInputHandler(struct pbuf* p, struct netif* inp);
err_t handleStaNetifInput(struct pbuf* p, struct netif* inp);
err_t handleApNetifInput(struct pbuf* p, struct netif* inp);
private:
bool _initialized;
volatile uint8_t _status;
EventGroupHandle_t _eventGroup;
esp_interface_t _interface;
wifi_ap_record_t _scanResults[MAX_SCAN_RESULTS];
wifi_ap_record_t _apRecord;
tcpip_adapter_ip_info_t _ipInfo;
netif_input_fn _staNetifInput;
netif_input_fn _apNetifInput;
void (*_onReceiveCallback)(void);
};
extern WiFiClass WiFi;
#endif // WIFI_H

View file

@ -1,215 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <string.h>
#include <lwip/netdb.h>
#include <lwip/sockets.h>
#include "WiFiClient.h"
WiFiClient::WiFiClient() :
WiFiClient(-1)
{
}
WiFiClient::WiFiClient(int socket) :
_socket(socket)
{
}
int WiFiClient::connect(const char* host, uint16_t port)
{
struct hostent* server = gethostbyname(host);
if (server == NULL) {
return 0;
}
return connect(server->h_addr, port);
}
int WiFiClient::connect(/*IPAddress*/uint32_t ip, uint16_t port)
{
_socket = lwip_socket(AF_INET, SOCK_STREAM, 0);
if (_socket < 0) {
_socket = -1;
return 0;
}
struct sockaddr_in addr;
memset(&addr, 0x00, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = (uint32_t)ip;
addr.sin_port = htons(port);
if (lwip_connect_r(_socket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
lwip_close_r(_socket);
_socket = -1;
return 0;
}
int nonBlocking = 1;
lwip_ioctl_r(_socket, FIONBIO, &nonBlocking);
return 1;
}
size_t WiFiClient::write(uint8_t b)
{
return write(&b, 1);
}
size_t WiFiClient::write(const uint8_t *buf, size_t size)
{
if (_socket == -1) {
return 0;
}
int result = lwip_send_r(_socket, (void*)buf, size, MSG_DONTWAIT);
if (result < 0) {
lwip_close_r(_socket);
_socket = -1;
return 0;
}
return result;
}
int WiFiClient::available()
{
if (_socket == -1) {
return 0;
}
int result = 0;
if (lwip_ioctl_r(_socket, FIONREAD, &result) < 0) {
lwip_close_r(_socket);
_socket = -1;
return 0;
}
return result;
}
int WiFiClient::read()
{
uint8_t b;
if (read(&b, sizeof(b)) == -1) {
return -1;
}
return b;
}
int WiFiClient::read(uint8_t* buf, size_t size)
{
if (!available()) {
return -1;
}
int result = lwip_recv_r(_socket, buf, size, MSG_DONTWAIT);
if (result <= 0 && errno != EWOULDBLOCK) {
lwip_close_r(_socket);
_socket = -1;
return 0;
}
if (result == 0) {
result = -1;
}
return result;
}
int WiFiClient::peek()
{
uint8_t b;
if (recv(_socket, &b, sizeof(b), MSG_PEEK | MSG_DONTWAIT) <= 0) {
if (errno != EWOULDBLOCK) {
lwip_close_r(_socket);
_socket = -1;
}
return -1;
}
return b;
}
void WiFiClient::flush()
{
}
void WiFiClient::stop()
{
if (_socket != -1) {
lwip_close_r(_socket);
_socket = -1;
}
}
uint8_t WiFiClient::connected()
{
if (_socket != -1) {
// use peek to update socket state
peek();
}
return (_socket != -1);
}
WiFiClient::operator bool()
{
return (_socket != -1);
}
bool WiFiClient::operator==(const WiFiClient &other) const
{
return (_socket == other._socket);
}
/*IPAddress*/uint32_t WiFiClient::remoteIP()
{
struct sockaddr_storage addr;
socklen_t len = sizeof(addr);
getpeername(_socket, (struct sockaddr*)&addr, &len);
return ((struct sockaddr_in *)&addr)->sin_addr.s_addr;
}
uint16_t WiFiClient::remotePort()
{
struct sockaddr_storage addr;
socklen_t len = sizeof(addr);
getpeername(_socket, (struct sockaddr*)&addr, &len);
return ntohs(((struct sockaddr_in *)&addr)->sin_port);
}

View file

@ -1,64 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIFICLIENT_H
#define WIFICLIENT_H
#include <Arduino.h>
// #include <Client.h>
// #include <IPAddress.h>
class WiFiServer;
class WiFiClient /*: public Client*/ {
public:
WiFiClient();
uint8_t status();
virtual int connect(/*IPAddress*/uint32_t ip, uint16_t port);
virtual int connect(const char* host, uint16_t port);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
virtual int available();
virtual int read();
virtual int read(uint8_t *buf, size_t size);
virtual int peek();
virtual void flush();
virtual void stop();
virtual uint8_t connected();
virtual operator bool();
bool operator==(const WiFiClient &other) const;
virtual /*IPAddress*/uint32_t remoteIP();
virtual uint16_t remotePort();
// using Print::write;
protected:
friend class WiFiServer;
WiFiClient(int socket);
private:
int _socket;
};
#endif // WIFICLIENT_H

View file

@ -1,556 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <lwip/netdb.h>
#include <lwip/sockets.h>
#include "WiFiSSLClient.h"
class __Guard {
public:
__Guard(SemaphoreHandle_t handle) {
_handle = handle;
xSemaphoreTakeRecursive(_handle, portMAX_DELAY);
}
~__Guard() {
xSemaphoreGiveRecursive(_handle);
}
private:
SemaphoreHandle_t _handle;
};
#define synchronized __Guard __guard(_mbedMutex);
WiFiSSLClient::WiFiSSLClient() :
_connected(false),
_peek(-1)
{
_netContext.fd = -1;
_mbedMutex = xSemaphoreCreateRecursiveMutex();
}
int WiFiSSLClient::connect(const char* host, uint16_t port)
{
synchronized {
_netContext.fd = -1;
_connected = false;
mbedtls_ssl_init(&_sslContext);
mbedtls_ctr_drbg_init(&_ctrDrbgContext);
mbedtls_ssl_config_init(&_sslConfig);
mbedtls_entropy_init(&_entropyContext);
mbedtls_x509_crt_init(&_caCrt);
mbedtls_net_init(&_netContext);
if (mbedtls_ctr_drbg_seed(&_ctrDrbgContext, mbedtls_entropy_func, &_entropyContext, NULL, 0) != 0) {
stop();
return 0;
}
if (mbedtls_ssl_config_defaults(&_sslConfig, MBEDTLS_SSL_IS_CLIENT, MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT) != 0) {
stop();
return 0;
}
mbedtls_ssl_conf_authmode(&_sslConfig, MBEDTLS_SSL_VERIFY_REQUIRED);
if (mbedtls_x509_crt_parse(&_caCrt, (const unsigned char *)ROOT_CAs, strlen(ROOT_CAs) + 1) != 0) {
stop();
return 0;
}
mbedtls_ssl_conf_ca_chain(&_sslConfig, &_caCrt, NULL);
mbedtls_ssl_conf_rng(&_sslConfig, mbedtls_ctr_drbg_random, &_ctrDrbgContext);
if (mbedtls_ssl_setup(&_sslContext, &_sslConfig) != 0) {
stop();
return 0;
}
char portStr[6];
itoa(port, portStr, 10);
if (mbedtls_net_connect(&_netContext, host, portStr, MBEDTLS_NET_PROTO_TCP) != 0) {
stop();
return 0;
}
mbedtls_ssl_set_bio(&_sslContext, &_netContext, mbedtls_net_send, mbedtls_net_recv, NULL);
int result;
do {
result = mbedtls_ssl_handshake(&_sslContext);
} while (result == MBEDTLS_ERR_SSL_WANT_READ || result == MBEDTLS_ERR_SSL_WANT_WRITE);
if (result != 0) {
stop();
return 0;
}
mbedtls_net_set_nonblock(&_netContext);
_connected = true;
return 1;
}
}
int WiFiSSLClient::connect(/*IPAddress*/uint32_t ip, uint16_t port)
{
char ipStr[16];
sprintf(ipStr, "%d.%d.%d.%d", ((ip & 0xff000000) >> 24), ((ip & 0x00ff0000) >> 16), ((ip & 0x0000ff00) >> 8), ((ip & 0x000000ff) >> 0)/*ip[0], ip[1], ip[2], ip[3]*/);
return connect(ipStr, port);
}
size_t WiFiSSLClient::write(uint8_t b)
{
return write(&b, 1);
}
size_t WiFiSSLClient::write(const uint8_t *buf, size_t size)
{
synchronized {
int written = mbedtls_ssl_write(&_sslContext, buf, size);
if (written < 0) {
written = 0;
}
return written;
}
}
int WiFiSSLClient::available()
{
synchronized {
int result = mbedtls_ssl_read(&_sslContext, NULL, 0);
int n = mbedtls_ssl_get_bytes_avail(&_sslContext);
if (n == 0 && result != 0 && result != MBEDTLS_ERR_SSL_WANT_READ) {
stop();
}
return n;
}
}
int WiFiSSLClient::read()
{
uint8_t b;
if (_peek != -1) {
b = _peek;
_peek = -1;
} else if (read(&b, sizeof(b)) == -1) {
return -1;
}
return b;
}
int WiFiSSLClient::read(uint8_t* buf, size_t size)
{
synchronized {
if (!available()) {
return -1;
}
int result = mbedtls_ssl_read(&_sslContext, buf, size);
if (result < 0) {
if (result != MBEDTLS_ERR_SSL_WANT_READ && result != MBEDTLS_ERR_SSL_WANT_WRITE) {
stop();
}
return -1;
}
return result;
}
}
int WiFiSSLClient::peek()
{
if (_peek == -1) {
_peek = read();
}
return _peek;
}
void WiFiSSLClient::flush()
{
}
void WiFiSSLClient::stop()
{
synchronized {
if (_netContext.fd > 0) {
mbedtls_ssl_session_reset(&_sslContext);
mbedtls_net_free(&_netContext);
mbedtls_x509_crt_free(&_caCrt);
mbedtls_entropy_free(&_entropyContext);
mbedtls_ssl_config_free(&_sslConfig);
mbedtls_ctr_drbg_free(&_ctrDrbgContext);
mbedtls_ssl_free(&_sslContext);
}
_connected = false;
_netContext.fd = -1;
}
vTaskDelay(1);
}
uint8_t WiFiSSLClient::connected()
{
synchronized {
if (!_connected) {
return 0;
}
if (available()) {
return 1;
}
return 1;
}
}
WiFiSSLClient::operator bool()
{
return ((_netContext.fd != -1) && _connected);
}
/*IPAddress*/uint32_t WiFiSSLClient::remoteIP()
{
struct sockaddr_storage addr;
socklen_t len = sizeof(addr);
getpeername(_netContext.fd, (struct sockaddr*)&addr, &len);
return ((struct sockaddr_in *)&addr)->sin_addr.s_addr;
}
uint16_t WiFiSSLClient::remotePort()
{
struct sockaddr_storage addr;
socklen_t len = sizeof(addr);
getpeername(_netContext.fd, (struct sockaddr*)&addr, &len);
return ntohs(((struct sockaddr_in *)&addr)->sin_port);
}
const char* WiFiSSLClient::ROOT_CAs =
"-----BEGIN CERTIFICATE-----\n"
"MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU\n"
"MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs\n"
"IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290\n"
"MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux\n"
"FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h\n"
"bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v\n"
"dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt\n"
"H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9\n"
"uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA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w8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy\n"
"aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv\n"
"MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE\n"
"p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y\n"
"5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK\n"
"WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ\n"
"4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N\n"
"hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\n"
"-----END CERTIFICATE-----\n";

View file

@ -1,73 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIFISSLCLIENT_H
#define WIFISSLCLIENT_H
#include <mbedtls/net.h>
#include <mbedtls/ssl.h>
#include <mbedtls/entropy.h>
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/error.h>
#include <Arduino.h>
// #include <Client.h>
// #include <IPAddress.h>
class WiFiSSLClient /*: public Client*/ {
public:
WiFiSSLClient();
uint8_t status();
virtual int connect(/*IPAddress*/uint32_t ip, uint16_t port);
virtual int connect(const char* host, uint16_t port);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
virtual int available();
virtual int read();
virtual int read(uint8_t *buf, size_t size);
virtual int peek();
virtual void flush();
virtual void stop();
virtual uint8_t connected();
virtual operator bool();
// using Print::write;
virtual /*IPAddress*/uint32_t remoteIP();
virtual uint16_t remotePort();
private:
static const char* ROOT_CAs;
mbedtls_entropy_context _entropyContext;
mbedtls_ctr_drbg_context _ctrDrbgContext;
mbedtls_ssl_context _sslContext;
mbedtls_ssl_config _sslConfig;
mbedtls_net_context _netContext;
mbedtls_x509_crt _caCrt;
bool _connected;
int _peek;
SemaphoreHandle_t _mbedMutex;
};
#endif /* WIFISSLCLIENT_H */

View file

@ -1,142 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <string.h>
#include <lwip/sockets.h>
#include "WiFiClient.h"
#include "WiFiServer.h"
WiFiServer::WiFiServer() :
WiFiServer(0)
{
}
WiFiServer::WiFiServer(uint16_t port) :
_port(port),
_socket(-1)
{
for (int i = 0; i < CONFIG_LWIP_MAX_SOCKETS; i++) {
_spawnedSockets[i] = -1;
}
}
void WiFiServer::begin()
{
_socket = lwip_socket(AF_INET, SOCK_STREAM, 0);
if (_socket < 0) {
return;
}
struct sockaddr_in addr;
memset(&addr, 0x00, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = (uint32_t)0;
addr.sin_port = htons(_port);
if (lwip_bind(_socket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
lwip_close_r(_socket);
_socket = -1;
return;
}
if (lwip_listen(_socket, 1) < 0) {
lwip_close_r(_socket);
_socket = -1;
return;
}
int nonBlocking = 1;
lwip_ioctl_r(_socket, FIONBIO, &nonBlocking);
return;
}
WiFiClient WiFiServer::available(uint8_t* status)
{
int result = lwip_accept(_socket, NULL, 0);
if (status) {
*status = (result != -1);
}
if (result != -1) {
// store the connected socket
for (int i = 0; i < CONFIG_LWIP_MAX_SOCKETS; i++) {
if (_spawnedSockets[i] == -1) {
_spawnedSockets[i] = result;
break;
}
}
}
result = -1;
// find an existing socket with data
for (int i = 0; i < CONFIG_LWIP_MAX_SOCKETS; i++) {
if (_spawnedSockets[i] != -1) {
WiFiClient c(_spawnedSockets[i]);
if (!c.connected()) {
// socket not connected, clear from book keeping
_spawnedSockets[i] = -1;
} else if (c.available()) {
result = _spawnedSockets[i];
break;
}
}
}
return WiFiClient(result);
}
uint8_t WiFiServer::status() {
// Deprecated.
return 0;
}
size_t WiFiServer::write(uint8_t b)
{
return write(&b, 1);
}
size_t WiFiServer::write(const uint8_t *buffer, size_t size)
{
size_t written = 0;
for (int i = 0; i < CONFIG_LWIP_MAX_SOCKETS; i++) {
if (_spawnedSockets[i] != -1) {
WiFiClient c(_spawnedSockets[i]);
written += c.write(buffer, size);
}
}
return written;
}
WiFiServer::operator bool()
{
return (_port != 0 && _socket != -1);
}

View file

@ -1,50 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIFISERVER_H
#define WIFISERVER_H
#include <sdkconfig.h>
#include <Arduino.h>
// #include <Server.h>
class WiFiClient;
class WiFiServer /*: public Server*/ {
public:
WiFiServer();
WiFiServer(uint16_t);
WiFiClient available(uint8_t* status = NULL);
void begin();
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
uint8_t status();
// using Print::write;
virtual operator bool();
private:
uint16_t _port;
int _socket;
int _spawnedSockets[CONFIG_LWIP_MAX_SOCKETS];
};
#endif // WIFISERVER_H

View file

@ -1,218 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <string.h>
#include <lwip/netdb.h>
#include <lwip/sockets.h>
#include "WiFiUdp.h"
WiFiUDP::WiFiUDP() :
_socket(-1),
_remoteIp(0),
_remotePort(0),
_rcvIndex(0),
_rcvSize(0),
_sndSize(0)
{
}
uint8_t WiFiUDP::begin(uint16_t port)
{
_socket = lwip_socket(AF_INET, SOCK_DGRAM, 0);
if (_socket < 0) {
return 0;
}
struct sockaddr_in addr;
memset(&addr, 0x00, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = (uint32_t)0;
addr.sin_port = htons(port);
if (lwip_bind(_socket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
lwip_close_r(_socket);
_socket = -1;
return 0;
}
int nonBlocking = 1;
lwip_ioctl_r(_socket, FIONBIO, &nonBlocking);
return 1;
}
uint8_t WiFiUDP::beginMulticast(/*IPAddress*/uint32_t ip, uint16_t port)
{
if (!begin(port)) {
return 0;
}
struct ip_mreq multi;
multi.imr_multiaddr.s_addr = (uint32_t)ip;
multi.imr_interface.s_addr = (uint32_t)0;
lwip_setsockopt_r(_socket, IPPROTO_IP, IP_ADD_MEMBERSHIP, &multi, sizeof(multi));
return 1;
}
/* return number of bytes available in the current packet,
will return zero if parsePacket hasn't been called yet */
int WiFiUDP::available()
{
return (_rcvSize - _rcvIndex);
}
/* Release any resources being used by this WiFiUDP instance */
void WiFiUDP::stop()
{
lwip_close_r(_socket);
_socket = -1;
}
int WiFiUDP::beginPacket(const char *host, uint16_t port)
{
struct hostent* server = gethostbyname(host);
if (server == NULL) {
return 0;
}
return beginPacket(server->h_addr, port);
}
int WiFiUDP::beginPacket(/*IPAddress*/uint32_t ip, uint16_t port)
{
_remoteIp = ip;
_remotePort = port;
_sndSize = 0;
return 1;
}
int WiFiUDP::endPacket()
{
struct sockaddr_in addr;
memset(&addr, 0x00, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = _remoteIp;
addr.sin_port = htons(_remotePort);
if (lwip_sendto(_socket, _sndBuffer, _sndSize, 0, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
return 0;
}
return 1;
}
size_t WiFiUDP::write(uint8_t byte)
{
return write(&byte, 1);
}
size_t WiFiUDP::write(const uint8_t *buffer, size_t size)
{
size_t written = size;
if ((_sndSize + size) > sizeof(_sndBuffer)) {
written = sizeof(_sndBuffer) - _sndSize;
}
memcpy(&_sndBuffer[_sndSize], buffer, size);
_sndSize += written;
return written;
}
int WiFiUDP::parsePacket()
{
struct sockaddr_in addr;
socklen_t addrLen = sizeof(addr);
_rcvIndex = 0;
_rcvSize = 0;
int result = lwip_recvfrom_r(_socket, _rcvBuffer, sizeof(_rcvBuffer), MSG_DONTWAIT, (struct sockaddr*)&addr, &addrLen);
if (result <= 0) {
return 0;
}
_rcvSize = result;
_remoteIp = addr.sin_addr.s_addr;
_remotePort = ntohs(addr.sin_port);
return result;
}
int WiFiUDP::read()
{
uint8_t b;
if (read(&b, sizeof(b)) < 1) {
return -1;
}
return b;
}
int WiFiUDP::read(unsigned char* buf, size_t size)
{
if (available() < (int)size) {
size = available();
}
memcpy(buf, &_rcvBuffer[_rcvIndex], size);
_rcvIndex += size;
return size;
}
int WiFiUDP::peek()
{
if (!available()) {
return -1;
}
return _rcvBuffer[_rcvIndex];
}
void WiFiUDP::flush()
{
}
/*IPAddress*/uint32_t WiFiUDP::remoteIP()
{
return _remoteIp;
}
uint16_t WiFiUDP::remotePort()
{
return _remotePort;
}

View file

@ -1,66 +0,0 @@
/*
This file is part of the Arduino NINA firmware.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WIFIUDP_H
#define WIFIUDP_H
// #include <Udp.h>
class WiFiUDP /*: public UDP*/ {
public:
WiFiUDP();
virtual uint8_t begin(uint16_t);
virtual uint8_t beginMulticast(/*IPAddress*/uint32_t, uint16_t);
virtual void stop();
virtual int beginPacket(/*IPAddress*/uint32_t ip, uint16_t port);
virtual int beginPacket(const char *host, uint16_t port);
virtual int endPacket();
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buffer, size_t size);
// using Print::write;
virtual int parsePacket();
virtual int available();
virtual int read();
virtual int read(unsigned char* buffer, size_t len);
virtual int read(char* buffer, size_t len) { return read((unsigned char*)buffer, len); };
virtual int peek();
virtual void flush();
virtual /*IPAddress*/ uint32_t remoteIP();
virtual uint16_t remotePort();
virtual operator bool() { return _socket != -1; }
private:
int _socket;
uint32_t _remoteIp;
uint16_t _remotePort;
uint8_t _rcvBuffer[1500];
uint16_t _rcvIndex;
uint16_t _rcvSize;
uint8_t _sndBuffer[1500];
uint16_t _sndSize;
};
#endif // WIFIUDP_H

3
boards/CMakeLists.txt Normal file
View file

@ -0,0 +1,3 @@
idf_component_register(
INCLUDE_DIRS . ${BOARD}
)

18
boards/esp32/board.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef BOARD_H
#define BOARD_H
// SPIS for WiFi
#define AIRLIFT_MOSI 14
#define AIRLIFT_MISO 23
#define AIRLIFT_SCK 18
#define AIRLIFT_CS 5
#define AIRLIFT_BUSY 33 // ready
// UART for BLE HCI
#define AIRLIFT_RTS AIRLIFT_BUSY
#define AIRLIFT_CTS 0 // BOOT PIN
// #define CONFIG_BT_LE_HCI_UART_RTS_PIN 33 // ESP_BUSY (ready)
// #define CONFIG_BT_LE_HCI_UART_CTS_PIN 0 // GPIO0
#endif

2
boards/esp32/sdkconfig Normal file
View file

@ -0,0 +1,2 @@
CONFIG_BTDM_CTRL_HCI_MODE_UART_H4=y
CONFIG_BTDM_CTRL_HCI_UART_BAUDRATE=115200

View file

@ -0,0 +1,11 @@
#ifndef BOARD_H
#define BOARD_H
// SPIS for WiFi
#define AIRLIFT_MOSI 21
#define AIRLIFT_MISO 6
#define AIRLIFT_SCK 22
#define AIRLIFT_CS 7
#define AIRLIFT_BUSY CONFIG_BT_LE_HCI_UART_RTS_PIN // 18, aka ready
#endif

View file

@ -0,0 +1,9 @@
# BT_LE_HCI
CONFIG_BT_LE_HCI_INTERFACE_USE_UART=y
CONFIG_BT_LE_HCI_UART_FLOWCTRL=y
CONFIG_BT_LE_HCI_UART_TX_PIN=16
CONFIG_BT_LE_HCI_UART_RX_PIN=17
CONFIG_BT_LE_HCI_UART_RTS_PIN=18
CONFIG_BT_LE_HCI_UART_CTS_PIN=9
CONFIG_BT_LE_HCI_UART_BAUD=115200
CONFIG_BT_LE_CONTROLLER_LOG_ENABLED=y

1
certificates Submodule

@ -0,0 +1 @@
Subproject commit 96174bf8bafd24c6b215fa065460a582a7624037

127
code-of-conduct.md Normal file
View file

@ -0,0 +1,127 @@
# Adafruit Community Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and leaders pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level or type of
experience, education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.
## Our Standards
We are committed to providing a friendly, safe and welcoming environment for
all.
Examples of behavior that contributes to creating a positive environment
include:
* Be kind and courteous to others
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Collaborating with other community members
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and sexual attention or advances
* The use of inappropriate images, including in a community member's avatar
* The use of inappropriate language, including in a community member's nickname
* Any spamming, flaming, baiting or other attention-stealing behavior
* Excessive or unwelcome helping; answering outside the scope of the question
asked
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate
The goal of the standards and moderation guidelines outlined here is to build
and maintain a respectful community. We ask that you dont just aim to be
"technically unimpeachable", but rather try to be your best self.
We value many things beyond technical expertise, including collaboration and
supporting others within our community. Providing a positive experience for
other community members can have a much more significant impact than simply
providing the correct answer.
## Our Responsibilities
Project leaders are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project leaders have the right and responsibility to remove, edit, or
reject messages, comments, commits, code, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any community member for other behaviors that they deem
inappropriate, threatening, offensive, or harmful.
## Moderation
Instances of behaviors that violate the Adafruit Community Code of Conduct
may be reported by any member of the community. Community members are
encouraged to report these situations, including situations they witness
involving other community members.
You may report in the following ways:
In any situation, you may send an email to <support@adafruit.com>.
On the Adafruit Discord, you may send an open message from any channel
to all Community Helpers by tagging @community helpers. You may also send an
open message from any channel, or a direct message to @kattni#1507,
@tannewt#4653, @Dan Halbert#1614, @cater#2442, @sommersoft#0222, or
@Andon#8175.
Email and direct message reports will be kept confidential.
In situations on Discord where the issue is particularly egregious, possibly
illegal, requires immediate action, or violates the Discord terms of service,
you should also report the message directly to Discord.
These are the steps for upholding our communitys standards of conduct.
1. Any member of the community may report any situation that violates the
Adafruit Community Code of Conduct. All reports will be reviewed and
investigated.
2. If the behavior is an egregious violation, the community member who
committed the violation may be banned immediately, without warning.
3. Otherwise, moderators will first respond to such behavior with a warning.
4. Moderators follow a soft "three strikes" policy - the community member may
be given another chance, if they are receptive to the warning and change their
behavior.
5. If the community member is unreceptive or unreasonable when warned by a
moderator, or the warning goes unheeded, they may be banned for a first or
second offense. Repeated offenses will result in the community member being
banned.
## Scope
This Code of Conduct and the enforcement policies listed above apply to all
Adafruit Community venues. This includes but is not limited to any community
spaces (both public and private), the entire Adafruit Discord server, and
Adafruit GitHub repositories. Examples of Adafruit Community spaces include
but are not limited to meet-ups, audio chats on the Adafruit Discord, or
interaction at a conference.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. As a community
member, you are representing our community, and are expected to behave
accordingly.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
<https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>,
and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
For other projects adopting the Adafruit Community Code of
Conduct, please contact the maintainers of those projects for enforcement.
If you wish to use this code of conduct for your own project, consider
explicitly mentioning your moderation policy or making a copy with your
own moderation policy so as to avoid confusion.

View file

@ -1,28 +1,97 @@
#!/usr/bin/env python #!/usr/bin/env python
booloaderData = open("build/bootloader/bootloader.bin", "rb").read() import json
partitionData = open("build/partitions_singleapp.bin", "rb").read() import sys
appData = open("build/nina-fw.bin", "rb").read() import argparse
import os
def extract_firmware_version():
with open('main/CommandHandler.cpp', 'r') as file:
for line in file:
if 'const char FIRMWARE_VERSION[] = ' in line:
# The line format is `const char FIRMWARE_VERSION[] = "2.0.0-adafruit";`
# Split by double quote and get the second element
version = line.split('"')[1]
return version
raise RuntimeError("FIRMWARE_VERSION not found in CommandHandler.cpp")
def get_idf_target(build_dir):
with open(f"{build_dir}/config.env") as file:
config = json.load(file)
return config["IDF_TARGET"]
def main():
parser = argparse.ArgumentParser()
parser.add_argument('outfile', help='output file')
parser.add_argument('-b', '--build_dir', default='build', help='build directory')
args = parser.parse_args()
outfile = args.outfile
build_dir = os.path.normpath(args.build_dir)
bootloaderData = open(f"{build_dir}/bootloader/bootloader.bin", "rb").read()
partitionData = open(f"{build_dir}/partition_table/partition-table.bin", "rb").read()
#phyData = open("data/phy.bin", "rb").read()
appData = open(f"{build_dir}/nina-fw.bin", "rb").read()
# remove everything between certificate markers to save space. There might be comments and other information.
certsData = b""
with open("certificates/data/roots.pem", "rb") as certs_file:
in_cert = False
for line in certs_file:
if line.startswith(b"-----BEGIN CERTIFICATE-----"):
in_cert = True
if in_cert:
certsData += line
if line.startswith(b"-----END CERTIFICATE-----"):
in_cert = False
# calculate the output binary size, app offset # calculate the output binary size, app offset
outputSize = 0x10000 + len(appData) outputSize = 0x30000 + len(appData)
if (outputSize % 1024): if outputSize % 1024:
outputSize += 1024 - (outputSize % 1024) outputSize += 1024 - (outputSize % 1024)
# allocate and init to 0xff # allocate and init to 0xff
outputData = bytearray(b'\xff') * outputSize outputData = bytearray(b"\xff") * outputSize
# copy data: bootloader, partitions, app # copy data: bootloader, partitions, app
for i in range(0, len(booloaderData)): BOOTLOADER_OFFSET = {
outputData[0x1000 + i] = booloaderData[i] "esp32" : 0x1000,
"esp32c6" : 0x0000,
}
try:
idf_target = get_idf_target(build_dir)
bootloader_offset = BOOTLOADER_OFFSET[idf_target]
except KeyError:
raise RuntimeError(f"unsupported IDF_TARGET: {idf_target}")
for i in range(0, len(bootloaderData)):
outputData[bootloader_offset + i] = bootloaderData[i]
for i in range(0, len(partitionData)): for i in range(0, len(partitionData)):
outputData[0x8000 + i] = partitionData[i] outputData[0x8000 + i] = partitionData[i]
#for i in range(0, len(phyData)):
# outputData[0xf000 + i] = phyData[i]
for i in range(0, len(certsData)):
outputData[0x10000 + i] = certsData[i]
# zero terminate the pem file
outputData[0x10000 + len(certsData)] = 0
for i in range(0, len(appData)): for i in range(0, len(appData)):
outputData[0x10000 + i] = appData[i] outputData[0x30000 + i] = appData[i]
version = extract_firmware_version()
outputFilename = f"{outfile}-{version}.bin"
# write out # write out
with open("NINA_W102.bin","w+b") as f: with open(outputFilename, "w+b") as f:
f.seek(0) f.seek(0)
f.write(outputData) f.write(outputData)
if __name__ == '__main__':
main()

View file

@ -0,0 +1,4 @@
idf_component_register(SRCS src/SPIS.cpp
INCLUDE_DIRS src
REQUIRES arduino-esp32
)

View file

@ -22,8 +22,7 @@
#include <driver/gpio.h> #include <driver/gpio.h>
#include <driver/spi_slave.h> #include <driver/spi_slave.h>
#include "wiring_digital.h" #include "esp32-hal-gpio.h"
#include "WInterrupts.h"
#include "SPIS.h" #include "SPIS.h"
@ -113,4 +112,5 @@ void SPISClass::handleSetupComplete()
xSemaphoreGiveFromISR(_readySemaphore, NULL); xSemaphoreGiveFromISR(_readySemaphore, NULL);
} }
SPISClass SPIS(VSPI_HOST, 1, 12, 23, 18, 5, 33); // Move definition to sketch.ino.cpp
// SPISClass SPIS(VSPI_HOST, 1, 12, 23, 18, 5, 33);

@ -0,0 +1 @@
Subproject commit dbaf6a3226317a7c5e452e7b8a15e54c86bc2b6a

BIN
data/phy.bin Normal file

Binary file not shown.

5
main/CMakeLists.txt Normal file
View file

@ -0,0 +1,5 @@
idf_component_register(SRCS CommandHandler.cpp http_client.c sketch.ino.cpp
REQUIRES bt esp_http_client spiffs SPIS boards
PRIV_INCLUDE_DIRS "."
INCLUDE_DIRS "." $ENV{IDF_PATH}/components/esp_netif
)

File diff suppressed because it is too large Load diff

View file

@ -22,19 +22,28 @@
#include <stdint.h> #include <stdint.h>
// include for esp_netif_recv_ret_t
#include "lwip/esp_netif_net_stack.h"
typedef esp_netif_recv_ret_t (*lwip_input_fn_t)(void *input_netif_handle, void *buffer, size_t len, void *eb);
class CommandHandlerClass { class CommandHandlerClass {
public: public:
CommandHandlerClass(); CommandHandlerClass();
void begin(); void begin();
int handle(const uint8_t command[], uint8_t response[]); int handle(const uint8_t command[], uint8_t response[]);
static void onWiFiReceive();
static void onWiFiDisconnect(arduino_event_t*);
lwip_input_fn_t staNetifInput_orig = NULL;
lwip_input_fn_t apNetifInput_orig = NULL;
private: private:
static void gpio0Updater(void*); static void gpio0Updater(void*);
static int ping(/*IPAddress*/uint32_t host, uint8_t ttl);
void updateGpio0Pin(); void updateGpio0Pin();
static void onWiFiReceive();
void handleWiFiReceive(); void handleWiFiReceive();
void handleWiFiDisconnect();
private: private:
SemaphoreHandle_t _updateGpio0PinSemaphore; SemaphoreHandle_t _updateGpio0PinSemaphore;
@ -42,4 +51,6 @@ private:
extern CommandHandlerClass CommandHandler; extern CommandHandlerClass CommandHandler;
extern "C" int downloadAndSaveFile(char * url, FILE * f, const char * cert_pem);
#endif #endif

57
main/CryptoUtil.cpp Normal file
View file

@ -0,0 +1,57 @@
/*
This file is part of ArduinoIoTCloud.
Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to license@arduino.cc.
*/
/******************************************************************************
* INCLUDE
******************************************************************************/
#include "CryptoUtil.h"
/******************************************************************************
* PUBLIC MEMBER FUNCTIONS
******************************************************************************/
bool CryptoUtil::readDeviceId(ECCX08Class & eccx08, String & device_id, ECCX08Slot const device_id_slot)
{
byte device_id_bytes[72] = {0};
if (eccx08.readSlot(static_cast<int>(device_id_slot), device_id_bytes, sizeof(device_id_bytes))) {
device_id = String(reinterpret_cast<char *>(device_id_bytes));
return true;
}
else
{
return false;
}
}
bool CryptoUtil::reconstructCertificate(ECCX08CertClass & cert, String const & device_id, ECCX08Slot const key, ECCX08Slot const compressed_certificate, ECCX08Slot const serial_number_and_authority_key)
{
if (cert.beginReconstruction(static_cast<int>(key), static_cast<int>(compressed_certificate), static_cast<int>(serial_number_and_authority_key)))
{
cert.setSubjectCommonName(device_id);
cert.setIssuerCountryName("US");
cert.setIssuerOrganizationName("Arduino LLC US");
cert.setIssuerOrganizationalUnitName("IT");
cert.setIssuerCommonName("Arduino");
return cert.endReconstruction();
}
else
{
return false;
}
}

60
main/CryptoUtil.h Normal file
View file

@ -0,0 +1,60 @@
/*
This file is part of ArduinoIoTCloud.
Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to license@arduino.cc.
*/
#ifndef ARDUINO_IOT_CLOUD_UTILITY_CRYPTO_CRYPTO_UTIL_H_
#define ARDUINO_IOT_CLOUD_UTILITY_CRYPTO_CRYPTO_UTIL_H_
/******************************************************************************
* INCLUDE
******************************************************************************/
#include <Arduino.h>
#include <ArduinoECCX08.h>
#include "ECCX08Cert.h"
/******************************************************************************
TYPEDEF
******************************************************************************/
enum class ECCX08Slot : int
{
Key = 0,
CompressedCertificate = 10,
SerialNumberAndAuthorityKeyIdentifier = 11,
DeviceId = 12
};
/******************************************************************************
* CLASS DECLARATION
******************************************************************************/
class CryptoUtil
{
public:
static bool readDeviceId(ECCX08Class & eccx08, String & device_id, ECCX08Slot const device_id_slot);
static bool reconstructCertificate(ECCX08CertClass & cert, String const & device_id, ECCX08Slot const key, ECCX08Slot const compressed_certificate, ECCX08Slot const serial_number_and_authority_key);
private:
CryptoUtil() { }
CryptoUtil(CryptoUtil const & other) { }
};
#endif /* ARDUINO_IOT_CLOUD_UTILITY_CRYPTO_CRYPTO_UTIL_H_ */

940
main/ECCX08Cert.cpp Normal file
View file

@ -0,0 +1,940 @@
/*
This file is part of ArduinoIoTCloud.
Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to license@arduino.cc.
*/
/******************************************************************************
* INCLUDE
******************************************************************************/
#include "bearssl/bearssl_hash.h"
#include <ArduinoECCX08.h>
#include "ECCX08Cert.h"
/******************************************************************************
* DEFINE
******************************************************************************/
#define ASN1_INTEGER 0x02
#define ASN1_BIT_STRING 0x03
#define ASN1_NULL 0x05
#define ASN1_OBJECT_IDENTIFIER 0x06
#define ASN1_PRINTABLE_STRING 0x13
#define ASN1_SEQUENCE 0x30
#define ASN1_SET 0x31
struct __attribute__((__packed__)) CompressedCert {
byte signature[64];
byte dates[3];
byte unused[5];
};
#define SERIAL_NUMBER_LENGTH 16
#define AUTHORITY_KEY_IDENTIFIER_LENGTH 20
struct __attribute__((__packed__)) SerialNumberAndAuthorityKeyIdentifier {
byte serialNumber[SERIAL_NUMBER_LENGTH];
byte authorityKeyIdentifier[AUTHORITY_KEY_IDENTIFIER_LENGTH];
};
/******************************************************************************
* LOCAL MODULE FUNCTIONS
******************************************************************************/
static String base64Encode(const byte in[], unsigned int length, const char* prefix, const char* suffix) {
static const char* CODES = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
int b;
String out;
int reserveLength = 4 * ((length + 2) / 3) + ((length / 3 * 4) / 76) + strlen(prefix) + strlen(suffix);
out.reserve(reserveLength);
if (prefix) {
out += prefix;
}
for (unsigned int i = 0; i < length; i += 3) {
if (i > 0 && (i / 3 * 4) % 76 == 0) {
out += '\n';
}
b = (in[i] & 0xFC) >> 2;
out += CODES[b];
b = (in[i] & 0x03) << 4;
if (i + 1 < length) {
b |= (in[i + 1] & 0xF0) >> 4;
out += CODES[b];
b = (in[i + 1] & 0x0F) << 2;
if (i + 2 < length) {
b |= (in[i + 2] & 0xC0) >> 6;
out += CODES[b];
b = in[i + 2] & 0x3F;
out += CODES[b];
} else {
out += CODES[b];
out += '=';
}
} else {
out += CODES[b];
out += "==";
}
}
if (suffix) {
out += suffix;
}
return out;
}
/******************************************************************************
* CTOR/DTOR
******************************************************************************/
ECCX08CertClass::ECCX08CertClass() :
_keySlot(-1),
_compressedCertSlot(-1),
_serialNumberAndAuthorityKeyIdentifierSlot(-1),
_bytes(NULL),
_length(0) {
}
ECCX08CertClass::~ECCX08CertClass() {
if (_bytes) {
free(_bytes);
_bytes = NULL;
}
}
/******************************************************************************
* PUBLIC MEMBER FUNCTIONS
******************************************************************************/
int ECCX08CertClass::beginCSR(int keySlot, bool newPrivateKey) {
if (keySlot < 0 || keySlot > 8) {
return 0;
}
_keySlot = keySlot;
if (newPrivateKey) {
if (!ECCX08.generatePrivateKey(_keySlot, _temp)) {
return 0;
}
} else {
if (!ECCX08.generatePublicKey(_keySlot, _temp)) {
return 0;
}
}
return 1;
}
String ECCX08CertClass::endCSR() {
int versionLen = versionLength();
int subjectLen = issuerOrSubjectLength(_subjectCountryName,
_subjectStateProvinceName,
_subjectLocalityName,
_subjectOrganizationName,
_subjectOrganizationalUnitName,
_subjectCommonName);
int subjectHeaderLen = sequenceHeaderLength(subjectLen);
int publicKeyLen = publicKeyLength();
int csrInfoLen = versionLen + subjectHeaderLen + subjectLen + publicKeyLen + 2;
int csrInfoHeaderLen = sequenceHeaderLength(csrInfoLen);
byte csrInfo[csrInfoHeaderLen + csrInfoLen];
byte* out = csrInfo;
appendSequenceHeader(csrInfoLen, out);
out += csrInfoHeaderLen;
// version
appendVersion(0x00, out);
out += versionLen;
// subject
appendSequenceHeader(subjectLen, out);
out += subjectHeaderLen;
appendIssuerOrSubject(_subjectCountryName,
_subjectStateProvinceName,
_subjectLocalityName,
_subjectOrganizationName,
_subjectOrganizationalUnitName,
_subjectCommonName, out);
out += subjectLen;
// public key
appendPublicKey(_temp, out);
out += publicKeyLen;
// terminator
*out++ = 0xa0;
*out++ = 0x00;
br_sha256_context sha256Context;
byte csrInfoSha256[64];
byte signature[64];
br_sha256_init(&sha256Context);
br_sha256_update(&sha256Context, csrInfo, csrInfoHeaderLen + csrInfoLen);
br_sha256_out(&sha256Context, csrInfoSha256);
if (!ECCX08.ecSign(_keySlot, csrInfoSha256, signature)) {
return "";
}
int signatureLen = signatureLength(signature);
int csrLen = csrInfoHeaderLen + csrInfoLen + signatureLen;
int csrHeaderLen = sequenceHeaderLength(csrLen);
byte csr[csrLen + csrHeaderLen];
out = csr;
appendSequenceHeader(csrLen, out);
out += csrHeaderLen;
// info
memcpy(out, csrInfo, csrInfoHeaderLen + csrInfoLen);
out += (csrInfoHeaderLen + csrInfoLen);
// signature
appendSignature(signature, out);
out += signatureLen;
return base64Encode(csr, csrLen + csrHeaderLen, "-----BEGIN CERTIFICATE REQUEST-----\n", "\n-----END CERTIFICATE REQUEST-----\n");
}
int ECCX08CertClass::beginStorage(int compressedCertSlot, int serialNumberAndAuthorityKeyIdentifierSlot) {
if (compressedCertSlot < 8 || compressedCertSlot > 15) {
return 0;
}
if (serialNumberAndAuthorityKeyIdentifierSlot < 8 || serialNumberAndAuthorityKeyIdentifierSlot > 15) {
return 0;
}
_compressedCertSlot = compressedCertSlot;
_serialNumberAndAuthorityKeyIdentifierSlot = serialNumberAndAuthorityKeyIdentifierSlot;
memset(_temp, 0x00, sizeof(_temp));
return 1;
}
void ECCX08CertClass::setSignature(byte signature[]) {
struct CompressedCert* compressedCert = (struct CompressedCert*)_temp;
memcpy(compressedCert->signature, signature, 64);
}
void ECCX08CertClass::setIssueYear(int issueYear) {
struct CompressedCert* compressedCert = (struct CompressedCert*)_temp;
compressedCert->dates[0] &= 0x07;
compressedCert->dates[0] |= (issueYear - 2000) << 3;
}
void ECCX08CertClass::setIssueMonth(int issueMonth) {
struct CompressedCert* compressedCert = (struct CompressedCert*)_temp;
compressedCert->dates[0] &= 0xf8;
compressedCert->dates[0] |= issueMonth >> 1;
compressedCert->dates[1] &= 0x7f;
compressedCert->dates[1] |= issueMonth << 7;
}
void ECCX08CertClass::setIssueDay(int issueDay) {
struct CompressedCert* compressedCert = (struct CompressedCert*)_temp;
compressedCert->dates[1] &= 0x83;
compressedCert->dates[1] |= issueDay << 2;
}
void ECCX08CertClass::setIssueHour(int issueHour) {
struct CompressedCert* compressedCert = (struct CompressedCert*)_temp;
compressedCert->dates[2] &= 0x1f;
compressedCert->dates[2] |= issueHour << 5;
compressedCert->dates[1] &= 0xfc;
compressedCert->dates[1] |= issueHour >> 3;
}
void ECCX08CertClass::setExpireYears(int expireYears) {
struct CompressedCert* compressedCert = (struct CompressedCert*)_temp;
compressedCert->dates[2] &= 0xe0;
compressedCert->dates[2] |= expireYears;
}
void ECCX08CertClass::setSerialNumber(const byte serialNumber[]) {
memcpy(&_temp[72], serialNumber, SERIAL_NUMBER_LENGTH);
}
void ECCX08CertClass::setAuthorityKeyIdentifier(const byte authorityKeyIdentifier[]) {
memcpy(&_temp[88], authorityKeyIdentifier, AUTHORITY_KEY_IDENTIFIER_LENGTH);
}
int ECCX08CertClass::endStorage() {
if (!ECCX08.writeSlot(_compressedCertSlot, &_temp[0], 72)) {
return 0;
}
if (!ECCX08.writeSlot(_serialNumberAndAuthorityKeyIdentifierSlot, &_temp[72], SERIAL_NUMBER_LENGTH + AUTHORITY_KEY_IDENTIFIER_LENGTH)) {
return 0;
}
return 1;
}
int ECCX08CertClass::beginReconstruction(int keySlot, int compressedCertSlot, int serialNumberAndAuthorityKeyIdentifierSlot) {
if (keySlot < 0 || keySlot > 8) {
return 0;
}
if (compressedCertSlot < 8 || compressedCertSlot > 15) {
return 0;
}
if (serialNumberAndAuthorityKeyIdentifierSlot < 8 || serialNumberAndAuthorityKeyIdentifierSlot > 15) {
return 0;
}
_keySlot = keySlot;
_compressedCertSlot = compressedCertSlot;
_serialNumberAndAuthorityKeyIdentifierSlot = serialNumberAndAuthorityKeyIdentifierSlot;
return 1;
}
int ECCX08CertClass::endReconstruction() {
byte publicKey[64];
struct CompressedCert compressedCert;
struct SerialNumberAndAuthorityKeyIdentifier serialNumberAndAuthorityKeyIdentifier;
if (!ECCX08.generatePublicKey(_keySlot, publicKey)) {
return 0;
}
if (!ECCX08.readSlot(_compressedCertSlot, (byte*)&compressedCert, sizeof(compressedCert))) {
return 0;
}
if (!ECCX08.readSlot(_serialNumberAndAuthorityKeyIdentifierSlot, (byte*)&serialNumberAndAuthorityKeyIdentifier, sizeof(serialNumberAndAuthorityKeyIdentifier))) {
return 0;
}
// dates
int year = (compressedCert.dates[0] >> 3) + 2000;
int month = ((compressedCert.dates[0] & 0x07) << 1) | (compressedCert.dates[1] >> 7);
int day = (compressedCert.dates[1] & 0x7c) >> 2;
int hour = ((compressedCert.dates[1] & 0x03) << 3) | (compressedCert.dates[2] >> 5);
int expireYears = (compressedCert.dates[2] & 0x1f);
int datesSize = 30;
if (year > 2049) {
// two more bytes for GeneralizedTime
datesSize += 2;
}
if ((year + expireYears) > 2049) {
// two more bytes for GeneralizedTime
datesSize += 2;
}
int serialNumberLen = serialNumberLength(serialNumberAndAuthorityKeyIdentifier.serialNumber);
int issuerLen = issuerOrSubjectLength(_issuerCountryName,
_issuerStateProvinceName,
_issuerLocalityName,
_issuerOrganizationName,
_issuerOrganizationalUnitName,
_issuerCommonName);
int issuerHeaderLen = sequenceHeaderLength(issuerLen);
int subjectLen = issuerOrSubjectLength(_subjectCountryName,
_subjectStateProvinceName,
_subjectLocalityName,
_subjectOrganizationName,
_subjectOrganizationalUnitName,
_subjectCommonName);
int subjectHeaderLen = sequenceHeaderLength(subjectLen);
int publicKeyLen = publicKeyLength();
int authorityKeyIdentifierLen = authorityKeyIdentifierLength(serialNumberAndAuthorityKeyIdentifier.authorityKeyIdentifier);
int signatureLen = signatureLength(compressedCert.signature);
int certInfoLen = 5 + serialNumberLen + 12 + issuerHeaderLen + issuerLen + (datesSize + 2) +
subjectHeaderLen + subjectLen + publicKeyLen;
if (authorityKeyIdentifierLen) {
certInfoLen += authorityKeyIdentifierLen;
} else {
certInfoLen += 4;
}
int certInfoHeaderLen = sequenceHeaderLength(certInfoLen);
int certDataLen = certInfoLen + certInfoHeaderLen + signatureLen;
int certDataHeaderLen = sequenceHeaderLength(certDataLen);
_length = certDataLen + certDataHeaderLen;
_bytes = (byte*)realloc(_bytes, _length);
if (!_bytes) {
_length = 0;
return 0;
}
byte* out = _bytes;
appendSequenceHeader(certDataLen, out);
out += certDataHeaderLen;
appendSequenceHeader(certInfoLen, out);
out += certInfoHeaderLen;
// version
*out++ = 0xA0;
*out++ = 0x03;
*out++ = 0x02;
*out++ = 0x01;
*out++ = 0x02;
// serial number
appendSerialNumber(serialNumberAndAuthorityKeyIdentifier.serialNumber, out);
out += serialNumberLen;
// ecdsaWithSHA256
out += appendEcdsaWithSHA256(out);
// issuer
appendSequenceHeader(issuerLen, out);
out += issuerHeaderLen;
appendIssuerOrSubject(_issuerCountryName,
_issuerStateProvinceName,
_issuerLocalityName,
_issuerOrganizationName,
_issuerOrganizationalUnitName,
_issuerCommonName, out);
out += issuerLen;
*out++ = ASN1_SEQUENCE;
*out++ = datesSize;
out += appendDate(year, month, day, hour, 0, 0, out);
out += appendDate(year + expireYears, month, day, hour, 0, 0, out);
// subject
appendSequenceHeader(subjectLen, out);
out += subjectHeaderLen;
appendIssuerOrSubject(_subjectCountryName,
_subjectStateProvinceName,
_subjectLocalityName,
_subjectOrganizationName,
_subjectOrganizationalUnitName,
_subjectCommonName, out);
out += subjectLen;
// public key
appendPublicKey(publicKey, out);
out += publicKeyLen;
if (authorityKeyIdentifierLen) {
appendAuthorityKeyIdentifier(serialNumberAndAuthorityKeyIdentifier.authorityKeyIdentifier, out);
out += authorityKeyIdentifierLen;
} else {
// null sequence
*out++ = 0xA3;
*out++ = 0x02;
*out++ = 0x30;
*out++ = 0x00;
}
// signature
appendSignature(compressedCert.signature, out);
out += signatureLen;
return 1;
}
byte* ECCX08CertClass::bytes() {
return _bytes;
}
int ECCX08CertClass::length() {
return _length;
}
void ECCX08CertClass::setIssuerCountryName(const String& countryName) {
_issuerCountryName = countryName;
}
void ECCX08CertClass::setIssuerStateProvinceName(const String& stateProvinceName) {
_issuerStateProvinceName = stateProvinceName;
}
void ECCX08CertClass::setIssuerLocalityName(const String& localityName) {
_issuerLocalityName = localityName;
}
void ECCX08CertClass::setIssuerOrganizationName(const String& organizationName) {
_issuerOrganizationName = organizationName;
}
void ECCX08CertClass::setIssuerOrganizationalUnitName(const String& organizationalUnitName) {
_issuerOrganizationalUnitName = organizationalUnitName;
}
void ECCX08CertClass::setIssuerCommonName(const String& commonName) {
_issuerCommonName = commonName;
}
void ECCX08CertClass::setSubjectCountryName(const String& countryName) {
_subjectCountryName = countryName;
}
void ECCX08CertClass::setSubjectStateProvinceName(const String& stateProvinceName) {
_subjectStateProvinceName = stateProvinceName;
}
void ECCX08CertClass::setSubjectLocalityName(const String& localityName) {
_subjectLocalityName = localityName;
}
void ECCX08CertClass::setSubjectOrganizationName(const String& organizationName) {
_subjectOrganizationName = organizationName;
}
void ECCX08CertClass::setSubjectOrganizationalUnitName(const String& organizationalUnitName) {
_subjectOrganizationName = organizationalUnitName;
}
void ECCX08CertClass::setSubjectCommonName(const String& commonName) {
_subjectCommonName = commonName;
}
int ECCX08CertClass::versionLength() {
return 3;
}
int ECCX08CertClass::issuerOrSubjectLength(const String& countryName,
const String& stateProvinceName,
const String& localityName,
const String& organizationName,
const String& organizationalUnitName,
const String& commonName) {
int length = 0;
int countryNameLength = countryName.length();
int stateProvinceNameLength = stateProvinceName.length();
int localityNameLength = localityName.length();
int organizationNameLength = organizationName.length();
int organizationalUnitNameLength = organizationalUnitName.length();
int commonNameLength = commonName.length();
if (countryNameLength) {
length += (11 + countryNameLength);
}
if (stateProvinceNameLength) {
length += (11 + stateProvinceNameLength);
}
if (localityNameLength) {
length += (11 + localityNameLength);
}
if (organizationNameLength) {
length += (11 + organizationNameLength);
}
if (organizationalUnitNameLength) {
length += (11 + organizationalUnitNameLength);
}
if (commonNameLength) {
length += (11 + commonNameLength);
}
return length;
}
int ECCX08CertClass::publicKeyLength() {
return (2 + 2 + 9 + 10 + 4 + 64);
}
int ECCX08CertClass::authorityKeyIdentifierLength(const byte authorityKeyIdentifier[]) {
bool set = false;
// check if the authority key identifier is non-zero
for (int i = 0; i < AUTHORITY_KEY_IDENTIFIER_LENGTH; i++) {
if (authorityKeyIdentifier[i] != 0) {
set = true;
break;
}
}
return (set ? 37 : 0);
}
int ECCX08CertClass::signatureLength(const byte signature[]) {
const byte* r = &signature[0];
const byte* s = &signature[32];
int rLength = 32;
int sLength = 32;
while (*r == 0x00 && rLength) {
r++;
rLength--;
}
if (*r & 0x80) {
rLength++;
}
while (*s == 0x00 && sLength) {
s++;
sLength--;
}
if (*s & 0x80) {
sLength++;
}
return (21 + rLength + sLength);
}
int ECCX08CertClass::serialNumberLength(const byte serialNumber[]) {
int length = SERIAL_NUMBER_LENGTH;
while (*serialNumber == 0 && length) {
serialNumber++;
length--;
}
if (*serialNumber & 0x80) {
length++;
}
return (2 + length);
}
int ECCX08CertClass::sequenceHeaderLength(int length) {
if (length > 255) {
return 4;
} else if (length > 127) {
return 3;
} else {
return 2;
}
}
void ECCX08CertClass::appendVersion(int version, byte out[]) {
out[0] = ASN1_INTEGER;
out[1] = 0x01;
out[2] = version;
}
void ECCX08CertClass::appendIssuerOrSubject(const String& countryName,
const String& stateProvinceName,
const String& localityName,
const String& organizationName,
const String& organizationalUnitName,
const String& commonName,
byte out[]) {
if (countryName.length() > 0) {
out += appendName(countryName, 0x06, out);
}
if (stateProvinceName.length() > 0) {
out += appendName(stateProvinceName, 0x08, out);
}
if (localityName.length() > 0) {
out += appendName(localityName, 0x07, out);
}
if (organizationName.length() > 0) {
out += appendName(organizationName, 0x0a, out);
}
if (organizationalUnitName.length() > 0) {
out += appendName(organizationalUnitName, 0x0b, out);
}
if (commonName.length() > 0) {
out += appendName(commonName, 0x03, out);
}
}
void ECCX08CertClass::appendPublicKey(const byte publicKey[], byte out[]) {
int subjectPublicKeyDataLength = 2 + 9 + 10 + 4 + 64;
// subject public key
*out++ = ASN1_SEQUENCE;
*out++ = (subjectPublicKeyDataLength) & 0xff;
*out++ = ASN1_SEQUENCE;
*out++ = 0x13;
// EC public key
*out++ = ASN1_OBJECT_IDENTIFIER;
*out++ = 0x07;
*out++ = 0x2a;
*out++ = 0x86;
*out++ = 0x48;
*out++ = 0xce;
*out++ = 0x3d;
*out++ = 0x02;
*out++ = 0x01;
// PRIME 256 v1
*out++ = ASN1_OBJECT_IDENTIFIER;
*out++ = 0x08;
*out++ = 0x2a;
*out++ = 0x86;
*out++ = 0x48;
*out++ = 0xce;
*out++ = 0x3d;
*out++ = 0x03;
*out++ = 0x01;
*out++ = 0x07;
*out++ = 0x03;
*out++ = 0x42;
*out++ = 0x00;
*out++ = 0x04;
memcpy(out, publicKey, 64);
}
void ECCX08CertClass::appendAuthorityKeyIdentifier(const byte authorityKeyIdentifier[], byte out[]) {
// [3]
*out++ = 0xa3;
*out++ = 0x23;
// sequence
*out++ = ASN1_SEQUENCE;
*out++ = 0x21;
// sequence
*out++ = ASN1_SEQUENCE;
*out++ = 0x1f;
// 2.5.29.35 authorityKeyIdentifier(X.509 extension)
*out++ = 0x06;
*out++ = 0x03;
*out++ = 0x55;
*out++ = 0x1d;
*out++ = 0x23;
// octet string
*out++ = 0x04;
*out++ = 0x18;
// sequence
*out++ = ASN1_SEQUENCE;
*out++ = 0x16;
*out++ = 0x80;
*out++ = 0x14;
memcpy(out, authorityKeyIdentifier, 20);
}
void ECCX08CertClass::appendSignature(const byte signature[], byte out[]) {
// signature algorithm
*out++ = ASN1_SEQUENCE;
*out++ = 0x0a;
*out++ = ASN1_OBJECT_IDENTIFIER;
*out++ = 0x08;
// ECDSA with SHA256
*out++ = 0x2a;
*out++ = 0x86;
*out++ = 0x48;
*out++ = 0xce;
*out++ = 0x3d;
*out++ = 0x04;
*out++ = 0x03;
*out++ = 0x02;
const byte* r = &signature[0];
const byte* s = &signature[32];
int rLength = 32;
int sLength = 32;
while (*r == 0 && rLength) {
r++;
rLength--;
}
while (*s == 0 && sLength) {
s++;
sLength--;
}
if (*r & 0x80) {
rLength++;
}
if (*s & 0x80) {
sLength++;
}
*out++ = ASN1_BIT_STRING;
*out++ = (rLength + sLength + 7);
*out++ = 0;
*out++ = ASN1_SEQUENCE;
*out++ = (rLength + sLength + 4);
*out++ = ASN1_INTEGER;
*out++ = rLength;
if ((*r & 0x80) && rLength) {
*out++ = 0;
rLength--;
}
memcpy(out, r, rLength);
out += rLength;
*out++ = ASN1_INTEGER;
*out++ = sLength;
if ((*s & 0x80) && sLength) {
*out++ = 0;
sLength--;
}
memcpy(out, s, sLength);
out += rLength;
}
void ECCX08CertClass::appendSerialNumber(const byte serialNumber[], byte out[]) {
int length = SERIAL_NUMBER_LENGTH;
while (*serialNumber == 0 && length) {
serialNumber++;
length--;
}
if (*serialNumber & 0x80) {
length++;
}
*out++ = ASN1_INTEGER;
*out++ = length;
if (*serialNumber & 0x80) {
*out++ = 0x00;
length--;
}
memcpy(out, serialNumber, length);
}
int ECCX08CertClass::appendName(const String& name, int type, byte out[]) {
int nameLength = name.length();
*out++ = ASN1_SET;
*out++ = nameLength + 9;
*out++ = ASN1_SEQUENCE;
*out++ = nameLength + 7;
*out++ = ASN1_OBJECT_IDENTIFIER;
*out++ = 0x03;
*out++ = 0x55;
*out++ = 0x04;
*out++ = type;
*out++ = ASN1_PRINTABLE_STRING;
*out++ = nameLength;
memcpy(out, name.c_str(), nameLength);
return (nameLength + 11);
}
void ECCX08CertClass::appendSequenceHeader(int length, byte out[]) {
*out++ = ASN1_SEQUENCE;
if (length > 255) {
*out++ = 0x82;
*out++ = (length >> 8) & 0xff;
} else if (length > 127) {
*out++ = 0x81;
}
*out++ = (length) & 0xff;
}
int ECCX08CertClass::appendDate(int year, int month, int day, int hour, int minute, int second, byte out[]) {
bool useGeneralizedTime = (year > 2049);
if (useGeneralizedTime) {
*out++ = 0x18;
*out++ = 0x0f;
*out++ = '0' + (year / 1000);
*out++ = '0' + ((year % 1000) / 100);
*out++ = '0' + ((year % 100) / 10);
*out++ = '0' + (year % 10);
} else {
year -= 2000;
*out++ = 0x17;
*out++ = 0x0d;
*out++ = '0' + (year / 10);
*out++ = '0' + (year % 10);
}
*out++ = '0' + (month / 10);
*out++ = '0' + (month % 10);
*out++ = '0' + (day / 10);
*out++ = '0' + (day % 10);
*out++ = '0' + (hour / 10);
*out++ = '0' + (hour % 10);
*out++ = '0' + (minute / 10);
*out++ = '0' + (minute % 10);
*out++ = '0' + (second / 10);
*out++ = '0' + (second % 10);
*out++ = 0x5a; // UTC
return (useGeneralizedTime ? 17 : 15);
}
int ECCX08CertClass::appendEcdsaWithSHA256(byte out[]) {
*out++ = ASN1_SEQUENCE;
*out++ = 0x0A;
*out++ = ASN1_OBJECT_IDENTIFIER;
*out++ = 0x08;
*out++ = 0x2A;
*out++ = 0x86;
*out++ = 0x48;
*out++ = 0xCE;
*out++ = 0x3D;
*out++ = 0x04;
*out++ = 0x03;
*out++ = 0x02;
return 12;
}

141
main/ECCX08Cert.h Normal file
View file

@ -0,0 +1,141 @@
/*
This file is part of ArduinoIoTCloud.
Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to license@arduino.cc.
*/
#ifndef _ECCX08_CERT_H_
#define _ECCX08_CERT_H_
/******************************************************************************
* INCLUDE
******************************************************************************/
#include <Arduino.h>
/******************************************************************************
* CLASS DECLARATION
******************************************************************************/
class ECCX08CertClass {
public:
ECCX08CertClass();
virtual ~ECCX08CertClass();
int beginCSR(int keySlot, bool newPrivateKey = true);
String endCSR();
int beginStorage(int compressedCertSlot, int serialNumberAndAuthorityKeyIdentifierSlot);
void setSignature(byte signature[]);
void setIssueYear(int issueYear);
void setIssueMonth(int issueMonth);
void setIssueDay(int issueDay);
void setIssueHour(int issueHour);
void setExpireYears(int expireYears);
void setSerialNumber(const byte serialNumber[]);
void setAuthorityKeyIdentifier(const byte authorityKeyIdentifier[]);
int endStorage();
int beginReconstruction(int keySlot, int compressedCertSlot, int serialNumberAndAuthorityKeyIdentifierSlot);
int endReconstruction();
byte* bytes();
int length();
void setIssuerCountryName(const String& countryName);
void setIssuerStateProvinceName(const String& stateProvinceName);
void setIssuerLocalityName(const String& localityName);
void setIssuerOrganizationName(const String& organizationName);
void setIssuerOrganizationalUnitName(const String& organizationalUnitName);
void setIssuerCommonName(const String& commonName);
void setSubjectCountryName(const String& countryName);
void setSubjectStateProvinceName(const String& stateProvinceName);
void setSubjectLocalityName(const String& localityName);
void setSubjectOrganizationName(const String& organizationName);
void setSubjectOrganizationalUnitName(const String& organizationalUnitName);
void setSubjectCommonName(const String& commonName);
private:
int versionLength();
int issuerOrSubjectLength(const String& countryName,
const String& stateProvinceName,
const String& localityName,
const String& organizationName,
const String& organizationalUnitName,
const String& commonName);
int publicKeyLength();
int authorityKeyIdentifierLength(const byte authorityKeyIdentifier[]);
int signatureLength(const byte signature[]);
int serialNumberLength(const byte serialNumber[]);
int sequenceHeaderLength(int length);
void appendVersion(int version, byte out[]);
void appendIssuerOrSubject(const String& countryName,
const String& stateProvinceName,
const String& localityName,
const String& organizationName,
const String& organizationalUnitName,
const String& commonName,
byte out[]);
void appendPublicKey(const byte publicKey[], byte out[]);
void appendAuthorityKeyIdentifier(const byte authorityKeyIdentifier[], byte out[]);
void appendSignature(const byte signature[], byte out[]);
void appendSerialNumber(const byte serialNumber[], byte out[]);
int appendName(const String& name, int type, byte out[]);
void appendSequenceHeader(int length, byte out[]);
int appendDate(int year, int month, int day, int hour, int minute, int second, byte out[]);
int appendEcdsaWithSHA256(byte out[]);
private:
int _keySlot;
int _compressedCertSlot;
int _serialNumberAndAuthorityKeyIdentifierSlot;
String _issuerCountryName;
String _issuerStateProvinceName;
String _issuerLocalityName;
String _issuerOrganizationName;
String _issuerOrganizationalUnitName;
String _issuerCommonName;
String _subjectCountryName;
String _subjectStateProvinceName;
String _subjectLocalityName;
String _subjectOrganizationName;
String _subjectOrganizationalUnitName;
String _subjectCommonName;
byte _temp[108];
byte* _bytes;
int _length;
};
#endif /* _ECCX08_CERT_H_ */

49
main/http_client.c Normal file
View file

@ -0,0 +1,49 @@
// esp_http_client.c
#include <dirent.h>
#include <sys/stat.h>
#include "esp_log.h"
#include <stdio.h>
#include "esp_http_client.h"
#define MAX_HTTP_RECV_BUFFER 128
static const char* TAG = "HTTP_CLIENT";
int downloadAndSaveFile(char * url, FILE * f, const char * cert_pem)
{
char *buffer = (char*)malloc(MAX_HTTP_RECV_BUFFER);
if (buffer == NULL) {
return -1;
}
esp_http_client_config_t config = {
.url = url,
.cert_pem = cert_pem,
.timeout_ms = 20000,
};
esp_http_client_handle_t client = esp_http_client_init(&config);
esp_err_t err;
if ((err = esp_http_client_open(client, 0)) != ESP_OK) {
ESP_LOGE(TAG, "esp_http_client_open failed: %d", err);
free(buffer);
return -1;
}
int content_length = esp_http_client_fetch_headers(client);
int total_read_len = 0, read_len;
while (total_read_len < content_length) {
read_len = esp_http_client_read(client, buffer, MAX_HTTP_RECV_BUFFER);
fwrite(buffer, sizeof(uint8_t), read_len, f);
if (read_len <= 0) {
break;
}
total_read_len += read_len;
ESP_LOGV(TAG, "esp_http_client_read data received: %d, total %d", read_len, total_read_len);
}
ESP_LOGV(TAG, "connection closed, cleaning up, total %d bytes received", total_read_len);
esp_http_client_close(client);
esp_http_client_cleanup(client);
free(buffer);
return 0;
}

View file

@ -20,7 +20,20 @@
#include <rom/uart.h> #include <rom/uart.h>
extern "C" { extern "C" {
#include <driver/periph_ctrl.h> #include "esp_private/periph_ctrl.h"
#include "soc/gpio_periph.h"
#include "soc/periph_defs.h"
// #include <driver/periph_ctrl.h>
#include <driver/uart.h>
#include <esp_bt.h>
#include "esp_spiffs.h"
#include "esp_log.h"
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include "esp_partition.h"
} }
#include <Arduino.h> #include <Arduino.h>
@ -32,8 +45,57 @@ extern "C" {
#define SPI_BUFFER_LEN SPI_MAX_DMA_LEN #define SPI_BUFFER_LEN SPI_MAX_DMA_LEN
int debug = 0; // UART debug is enabled on boot
int debug = 1;
//--------------------------------------------------------------------
// ADAFRUIT CHANGE
//--------------------------------------------------------------------
// contains SPIS and BT/BLE UART pin definitions
#if !__has_include("board.h")
#error "Board is not supported, please add -DBOARD=<board_name> to the build command"
#endif
#include "board.h"
#define AIRLIFT 1 // Adafruit Airlift
#define NINA_PRINTF(...) do { if (debug) { ets_printf(__VA_ARGS__); } } while (0)
#if defined(CONFIG_IDF_TARGET_ESP32)
extern const struct __sFILE_fake __sf_fake_stdin;
extern const struct __sFILE_fake __sf_fake_stdout;
extern const struct __sFILE_fake __sf_fake_stderr;
// dev, dma, mosi, miso, sclk, cs, ready
SPISClass SPIS(VSPI_HOST, 1, AIRLIFT_MOSI, AIRLIFT_MISO, AIRLIFT_SCK, AIRLIFT_CS, AIRLIFT_BUSY);
#endif
#if defined(CONFIG_IDF_TARGET_ESP32C6)
// UART for BLE HCI
// CONFIG_BT_LE_HCI_UART_RTS_PIN and CONFIG_BT_LE_HCI_UART_CTS_PIN are defined in boards/{BOARD}/sdkconfig
// and used by hci_driver_uart_config() in hci_driver_uart.c. It should matches with BUSY and BOOT pins.
#ifndef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#error "Please Enable Uart for HCI"
#endif
#if CONFIG_BT_LE_HCI_UART_CTS_PIN != 9
#error "CTS pin must be the same as BOOT pin"
#endif
// dev, dma, mosi, miso, sclk, cs, ready
SPISClass SPIS(SPI2_HOST, SPI_DMA_CH_AUTO,
AIRLIFT_MOSI, AIRLIFT_MISO, AIRLIFT_SCK, AIRLIFT_CS, AIRLIFT_BUSY);
#endif
// prevent initArduino() to release BT memory
extern "C" bool btInUse() {
return true;
}
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
uint8_t* commandBuffer; uint8_t* commandBuffer;
uint8_t* responseBuffer; uint8_t* responseBuffer;
@ -68,31 +130,126 @@ void setDebug(int d) {
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[1], PIN_FUNC_GPIO); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[1], PIN_FUNC_GPIO);
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[3], PIN_FUNC_GPIO); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[3], PIN_FUNC_GPIO);
#if CONFIG_IDF_TARGET_ESP32
_GLOBAL_REENT->_stdin = (FILE*) &__sf_fake_stdin; _GLOBAL_REENT->_stdin = (FILE*) &__sf_fake_stdin;
_GLOBAL_REENT->_stdout = (FILE*) &__sf_fake_stdout; _GLOBAL_REENT->_stdout = (FILE*) &__sf_fake_stdout;
_GLOBAL_REENT->_stderr = (FILE*) &__sf_fake_stderr; _GLOBAL_REENT->_stderr = (FILE*) &__sf_fake_stderr;
#endif
ets_install_putc1(NULL); ets_install_putc1(NULL);
ets_install_putc2(NULL); ets_install_putc2(NULL);
} }
} }
void setup() { void setupWiFi();
setDebug(debug); void setupBluetooth();
void setup() {
#ifndef CMAKE_BUILD_TYPE_DEBUG
setDebug(0);
#endif
#if !AIRLIFT
// put SWD and SWCLK pins connected to SAMD as inputs // put SWD and SWCLK pins connected to SAMD as inputs
pinMode(15, INPUT); pinMode(15, INPUT);
pinMode(21, INPUT); pinMode(21, INPUT);
#endif
pinMode(AIRLIFT_CS, INPUT);
if (digitalRead(AIRLIFT_CS) == LOW) {
setupBluetooth();
} else {
setupWiFi();
}
}
// #define UNO_WIFI_REV2
void setupBluetooth() {
NINA_PRINTF("*** BLUETOOTH\n");
periph_module_enable(PERIPH_UART1_MODULE);
periph_module_enable(PERIPH_UHCI0_MODULE);
esp_bt_controller_config_t btControllerConfig = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
#if defined(CONFIG_IDF_TARGET_ESP32)
#if defined(AIRLIFT)
// TX GPIO1 & RX GPIO3 on ESP32 'hardware' UART
// RTS on ESP_BUSY (GPIO33)
// CTS on GPIO0 (GPIO0)
uart_set_pin(UART_NUM_1, 1, 3, AIRLIFT_RTS, AIRLIFT_CTS);
#elif defined(UNO_WIFI_REV2)
uart_set_pin(UART_NUM_1, 1, 3, 33, 0); // TX, RX, RTS, CTS
#elif defined(NANO_RP2040_CONNECT)
uart_set_pin(UART_NUM_1, 1, 3, 33, 12); // TX, RX, RTS, CTS
#else
uart_set_pin(UART_NUM_1, 23, 12, 18, 5);
#endif
uart_set_hw_flow_ctrl(UART_NUM_1, UART_HW_FLOWCTRL_CTS_RTS, 5);
btControllerConfig.hci_uart_no = UART_NUM_1;
#if defined(AIRLIFT)
btControllerConfig.hci_uart_baudrate = 115200;
#elif defined(UNO_WIFI_REV2) || defined(NANO_RP2040_CONNECT)
btControllerConfig.hci_uart_baudrate = 115200;
#else
btControllerConfig.hci_uart_baudrate = 912600;
#endif
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
// UART is configured by CONFIG_BT_LE_HCI_UART_XYZ in sdkconfig.defaults.esp32c6
#endif
esp_err_t ret = esp_bt_controller_init(&btControllerConfig);
if (ESP_OK != ret) {
setDebug(1);
NINA_PRINTF("esp_bt_controller_init failed: 0x%x\n", ret);
while (1) {}
}
while (esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE);
esp_bt_controller_enable(ESP_BT_MODE_BLE);
#if defined(CONFIG_IDF_TARGET_ESP32)
esp_bt_sleep_enable();
#endif
vTaskSuspend(NULL);
while (1) {
vTaskDelay(portMAX_DELAY);
}
}
void setupWiFi() {
NINA_PRINTF("WIFI ON\n");
esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
SPIS.begin(); SPIS.begin();
esp_vfs_spiffs_conf_t conf = {
.base_path = "/fs",
.partition_label = "storage",
.max_files = 20,
.format_if_mount_failed = true
};
esp_err_t ret = esp_vfs_spiffs_register(&conf);
(void) ret;
if (WiFi.status() == WL_NO_SHIELD) { if (WiFi.status() == WL_NO_SHIELD) {
if (!debug) {
setDebug(1);
}
NINA_PRINTF("*** NOSHIELD\n");
while (1); // no shield while (1); // no shield
} }
commandBuffer = (uint8_t*)heap_caps_malloc(SPI_BUFFER_LEN, MALLOC_CAP_DMA); commandBuffer = (uint8_t*)heap_caps_malloc(SPI_BUFFER_LEN, MALLOC_CAP_DMA);
responseBuffer = (uint8_t*)heap_caps_malloc(SPI_BUFFER_LEN, MALLOC_CAP_DMA); responseBuffer = (uint8_t*)heap_caps_malloc(SPI_BUFFER_LEN, MALLOC_CAP_DMA);
NINA_PRINTF("*** CommandHandler Begin\n");
CommandHandler.begin(); CommandHandler.begin();
} }

7
partitions.csv Normal file
View file

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000
phy_init, data, phy, 0xf000, 0x1000
certs, data, 0x04, 0x10000, 0x20000
factory, app, factory, 0x30000, 0x180000
storage, data, spiffs, 0x1B0000,0x40000
1 # Name, Type, SubType, Offset, Size
2 # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
3 nvs, data, nvs, 0x9000, 0x6000
4 phy_init, data, phy, 0xf000, 0x1000
5 certs, data, 0x04, 0x10000, 0x20000
6 factory, app, factory, 0x30000, 0x180000
7 storage, data, spiffs, 0x1B0000,0x40000

537
sdkconfig
View file

@ -1,537 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#
#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y
#
# Bootloader config
#
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
CONFIG_LOG_BOOTLOADER_LEVEL_ERROR=
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=
CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=
CONFIG_LOG_BOOTLOADER_LEVEL=0
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V=
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
#
# Security features
#
CONFIG_SECURE_BOOT_ENABLED=
CONFIG_FLASH_ENCRYPTION_ENABLED=
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0"
CONFIG_ESPTOOLPY_BAUD_115200B=y
CONFIG_ESPTOOLPY_BAUD_230400B=
CONFIG_ESPTOOLPY_BAUD_921600B=
CONFIG_ESPTOOLPY_BAUD_2MB=
CONFIG_ESPTOOLPY_BAUD_OTHER=
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=115200
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_FLASHMODE_QIO=
CONFIG_FLASHMODE_QOUT=
CONFIG_FLASHMODE_DIO=y
CONFIG_FLASHMODE_DOUT=
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ_26M=
CONFIG_ESPTOOLPY_FLASHFREQ_20M=
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
CONFIG_ESPTOOLPY_BEFORE_NORESET=
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
CONFIG_ESPTOOLPY_AFTER_NORESET=
CONFIG_ESPTOOLPY_AFTER="hard_reset"
CONFIG_MONITOR_BAUD_9600B=
CONFIG_MONITOR_BAUD_57600B=
CONFIG_MONITOR_BAUD_115200B=y
CONFIG_MONITOR_BAUD_230400B=
CONFIG_MONITOR_BAUD_921600B=
CONFIG_MONITOR_BAUD_2MB=
CONFIG_MONITOR_BAUD_OTHER=
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_MONITOR_BAUD=115200
#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=y
CONFIG_PARTITION_TABLE_TWO_OTA=
CONFIG_PARTITION_TABLE_CUSTOM=
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
CONFIG_APP_OFFSET=0x10000
#
# Compiler options
#
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
CONFIG_OPTIMIZATION_LEVEL_RELEASE=
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=
CONFIG_CXX_EXCEPTIONS=
CONFIG_STACK_CHECK_NONE=y
CONFIG_STACK_CHECK_NORM=
CONFIG_STACK_CHECK_STRONG=
CONFIG_STACK_CHECK_ALL=
CONFIG_STACK_CHECK=
#
# Component config
#
#
# Application Level Tracing
#
CONFIG_ESP32_APPTRACE_DEST_TRAX=
CONFIG_ESP32_APPTRACE_DEST_NONE=y
CONFIG_ESP32_APPTRACE_ENABLE=
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
#
# FreeRTOS SystemView Tracing
#
CONFIG_AWS_IOT_SDK=
#
# Bluetooth
#
CONFIG_BT_ENABLED=
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
CONFIG_BT_RESERVE_DRAM=0
#
# ESP32-specific
#
CONFIG_ESP32_DEFAULT_CPU_FREQ_80=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=80
CONFIG_MEMMAP_SMP=y
CONFIG_SPIRAM_SUPPORT=
CONFIG_MEMMAP_TRACEMEM=
CONFIG_MEMMAP_TRACEMEM_TWOBANKS=
CONFIG_ESP32_TRAX=
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=
CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
CONFIG_ESP32_ENABLE_COREDUMP=
CONFIG_TWO_UNIVERSAL_MAC_ADDRESS=
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048
CONFIG_MAIN_TASK_STACK_SIZE=3584
CONFIG_IPC_TASK_STACK_SIZE=1024
CONFIG_TIMER_TASK_STACK_SIZE=3584
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
CONFIG_NEWLIB_NANO_FORMAT=
CONFIG_CONSOLE_UART_DEFAULT=
CONFIG_CONSOLE_UART_CUSTOM=
CONFIG_CONSOLE_UART_NONE=y
CONFIG_CONSOLE_UART_NUM=0
CONFIG_ULP_COPROC_ENABLED=
CONFIG_ULP_COPROC_RESERVE_MEM=0
CONFIG_ESP32_PANIC_PRINT_HALT=
CONFIG_ESP32_PANIC_PRINT_REBOOT=y
CONFIG_ESP32_PANIC_SILENT_REBOOT=
CONFIG_ESP32_PANIC_GDBSTUB=
CONFIG_ESP32_DEBUG_OCDAWARE=y
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=300
CONFIG_INT_WDT_CHECK_CPU1=y
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_PANIC=
CONFIG_TASK_WDT_TIMEOUT_S=5
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
CONFIG_BROWNOUT_DET=y
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
CONFIG_BROWNOUT_DET_LVL_SEL_1=
CONFIG_BROWNOUT_DET_LVL_SEL_2=
CONFIG_BROWNOUT_DET_LVL_SEL_3=
CONFIG_BROWNOUT_DET_LVL_SEL_4=
CONFIG_BROWNOUT_DET_LVL_SEL_5=
CONFIG_BROWNOUT_DET_LVL_SEL_6=
CONFIG_BROWNOUT_DET_LVL_SEL_7=
CONFIG_BROWNOUT_DET_LVL=0
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
CONFIG_ESP32_TIME_SYSCALL_USE_RTC=
CONFIG_ESP32_TIME_SYSCALL_USE_FRC1=
CONFIG_ESP32_TIME_SYSCALL_USE_NONE=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
CONFIG_ESP32_XTAL_FREQ_40=y
CONFIG_ESP32_XTAL_FREQ_26=
CONFIG_ESP32_XTAL_FREQ_AUTO=
CONFIG_ESP32_XTAL_FREQ=40
CONFIG_DISABLE_BASIC_ROM_CONSOLE=
CONFIG_NO_BLOBS=
CONFIG_ESP_TIMER_PROFILING=
CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS=
#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=6
CONFIG_ESP32_WIFI_NVS_ENABLED=y
#
# PHY
#
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION=
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20
#
# Power Management
#
CONFIG_PM_ENABLE=
#
# ADC-Calibration
#
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
CONFIG_ADC_CAL_LUT_ENABLE=y
#
# Ethernet
#
CONFIG_DMA_RX_BUF_NUM=10
CONFIG_DMA_TX_BUF_NUM=10
CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE=
CONFIG_EMAC_TASK_PRIORITY=20
#
# FAT Filesystem support
#
CONFIG_FATFS_CODEPAGE_DYNAMIC=
CONFIG_FATFS_CODEPAGE_437=y
CONFIG_FATFS_CODEPAGE_720=
CONFIG_FATFS_CODEPAGE_737=
CONFIG_FATFS_CODEPAGE_771=
CONFIG_FATFS_CODEPAGE_775=
CONFIG_FATFS_CODEPAGE_850=
CONFIG_FATFS_CODEPAGE_852=
CONFIG_FATFS_CODEPAGE_855=
CONFIG_FATFS_CODEPAGE_857=
CONFIG_FATFS_CODEPAGE_860=
CONFIG_FATFS_CODEPAGE_861=
CONFIG_FATFS_CODEPAGE_862=
CONFIG_FATFS_CODEPAGE_863=
CONFIG_FATFS_CODEPAGE_864=
CONFIG_FATFS_CODEPAGE_865=
CONFIG_FATFS_CODEPAGE_866=
CONFIG_FATFS_CODEPAGE_869=
CONFIG_FATFS_CODEPAGE_932=
CONFIG_FATFS_CODEPAGE_936=
CONFIG_FATFS_CODEPAGE_949=
CONFIG_FATFS_CODEPAGE_950=
CONFIG_FATFS_CODEPAGE=437
CONFIG_FATFS_LFN_NONE=y
CONFIG_FATFS_LFN_HEAP=
CONFIG_FATFS_LFN_STACK=
CONFIG_FATFS_FS_LOCK=0
CONFIG_FATFS_TIMEOUT_MS=10000
CONFIG_FATFS_PER_FILE_CACHE=y
#
# FreeRTOS
#
CONFIG_FREERTOS_UNICORE=
CONFIG_FREERTOS_CORETIMER_0=y
CONFIG_FREERTOS_CORETIMER_1=
CONFIG_FREERTOS_HZ=100
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=
CONFIG_FREERTOS_ASSERT_DISABLE=
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
CONFIG_FREERTOS_ISR_STACKSIZE=1536
CONFIG_FREERTOS_LEGACY_HOOKS=
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
CONFIG_SUPPORT_STATIC_ALLOCATION=
CONFIG_TIMER_TASK_PRIORITY=1
CONFIG_TIMER_TASK_STACK_DEPTH=2048
CONFIG_TIMER_QUEUE_LENGTH=10
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
CONFIG_FREERTOS_USE_TRACE_FACILITY=
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=
CONFIG_FREERTOS_DEBUG_INTERNALS=
#
# Heap memory debugging
#
CONFIG_HEAP_POISONING_DISABLED=y
CONFIG_HEAP_POISONING_LIGHT=
CONFIG_HEAP_POISONING_COMPREHENSIVE=
CONFIG_HEAP_TRACING=
#
# libsodium
#
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
#
# Log output
#
CONFIG_LOG_DEFAULT_LEVEL_NONE=
CONFIG_LOG_DEFAULT_LEVEL_ERROR=
CONFIG_LOG_DEFAULT_LEVEL_WARN=
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_COLORS=y
#
# LWIP
#
CONFIG_L2_TO_L3_COPY=
CONFIG_LWIP_MAX_SOCKETS=10
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
CONFIG_LWIP_SO_RCVBUF=y
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_IP_FRAG=
CONFIG_LWIP_IP_REASSEMBLY=
CONFIG_LWIP_STATS=
CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y
CONFIG_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
#
# DHCP server
#
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
CONFIG_LWIP_AUTOIP=
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
#
# TCP
#
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1436
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=5744
CONFIG_TCP_WND_DEFAULT=5744
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
CONFIG_TCP_OVERSIZE_MSS=y
CONFIG_TCP_OVERSIZE_QUARTER_MSS=
CONFIG_TCP_OVERSIZE_DISABLE=
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=2048
CONFIG_PPP_SUPPORT=
#
# ICMP
#
CONFIG_LWIP_MULTICAST_PING=
CONFIG_LWIP_BROADCAST_PING=
#
# LWIP RAW API
#
CONFIG_LWIP_MAX_RAW_PCBS=16
#
# mbedTLS
#
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
CONFIG_MBEDTLS_DEBUG=
CONFIG_MBEDTLS_HARDWARE_AES=y
CONFIG_MBEDTLS_HARDWARE_MPI=
CONFIG_MBEDTLS_HARDWARE_SHA=
CONFIG_MBEDTLS_HAVE_TIME=y
CONFIG_MBEDTLS_HAVE_TIME_DATE=
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
CONFIG_MBEDTLS_TLS_SERVER_ONLY=
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=
CONFIG_MBEDTLS_TLS_DISABLED=
CONFIG_MBEDTLS_TLS_SERVER=y
CONFIG_MBEDTLS_TLS_CLIENT=y
CONFIG_MBEDTLS_TLS_ENABLED=y
#
# TLS Key Exchange Methods
#
CONFIG_MBEDTLS_PSK_MODES=
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
CONFIG_MBEDTLS_SSL_PROTO_SSL3=
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=
CONFIG_MBEDTLS_SSL_ALPN=y
CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y
#
# Symmetric Ciphers
#
CONFIG_MBEDTLS_AES_C=y
CONFIG_MBEDTLS_CAMELLIA_C=
CONFIG_MBEDTLS_DES_C=
CONFIG_MBEDTLS_RC4_DISABLED=y
CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT=
CONFIG_MBEDTLS_RC4_ENABLED=
CONFIG_MBEDTLS_BLOWFISH_C=
CONFIG_MBEDTLS_XTEA_C=
CONFIG_MBEDTLS_CCM_C=y
CONFIG_MBEDTLS_GCM_C=y
CONFIG_MBEDTLS_RIPEMD160_C=
#
# Certificates
#
CONFIG_MBEDTLS_PEM_PARSE_C=y
CONFIG_MBEDTLS_PEM_WRITE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
#
# OpenSSL
#
CONFIG_OPENSSL_DEBUG=
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
CONFIG_OPENSSL_ASSERT_EXIT=
#
# PThreads
#
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
#
# SPI Flash driver
#
CONFIG_SPI_FLASH_VERIFY_WRITE=
CONFIG_SPI_FLASH_ENABLE_COUNTERS=
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS=
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED=
#
# SPIFFS Configuration
#
CONFIG_SPIFFS_MAX_PARTITIONS=3
#
# SPIFFS Cache Configuration
#
CONFIG_SPIFFS_CACHE=y
CONFIG_SPIFFS_CACHE_WR=y
CONFIG_SPIFFS_CACHE_STATS=
CONFIG_SPIFFS_PAGE_CHECK=y
CONFIG_SPIFFS_GC_MAX_RUNS=10
CONFIG_SPIFFS_GC_STATS=
CONFIG_SPIFFS_OBJ_NAME_LEN=32
CONFIG_SPIFFS_USE_MAGIC=y
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
CONFIG_SPIFFS_META_LENGTH=4
CONFIG_SPIFFS_USE_MTIME=y
#
# Debug Configuration
#
CONFIG_SPIFFS_DBG=
CONFIG_SPIFFS_API_DBG=
CONFIG_SPIFFS_GC_DBG=
CONFIG_SPIFFS_CACHE_DBG=
CONFIG_SPIFFS_CHECK_DBG=
CONFIG_SPIFFS_TEST_VISUALISATION=
#
# tcpip adapter
#
CONFIG_IP_LOST_TIMER_INTERVAL=120
#
# Wear Levelling
#
CONFIG_WL_SECTOR_SIZE_512=
CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096

1
sdkconfig.debug Normal file
View file

@ -0,0 +1 @@
CONFIG_LOG_DEFAULT_LEVEL_INFO=y

29
sdkconfig.defaults Normal file
View file

@ -0,0 +1,29 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 5.3.1 Project Minimal Configuration
#
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_APP_EXCLUDE_PROJECT_VER_VAR=y
CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_AUTOSTART_ARDUINO=y
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN=y
CONFIG_ARDUHAL_ESP_LOG=y
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_ORPHAN_SECTIONS_WARNING=y
CONFIG_BT_ENABLED=y
CONFIG_BT_CONTROLLER_ONLY=y
CONFIG_ESP_PHY_REDUCE_TX_POWER=y
CONFIG_ESP_WIFI_CSI_ENABLED=y
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_LOG_DEFAULT_LEVEL_WARN=y
CONFIG_LWIP_IRAM_OPTIMIZATION=y
CONFIG_LWIP_MAX_SOCKETS=6
CONFIG_LWIP_TCP_SYNMAXRTX=6
# CONFIG_LWIP_TCP_MSS=1436
# CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
# CONFIG_LWIP_TCP_WND_DEFAULT=5744
# CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y

29
tools/decode_backtrace.py Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env python3
"""Simple script that translates "Backtrace:" lines from the ESP output to files
and line numbers.
Run with: python3 tools/decode_backtrace.py <board>
Enter the backtrace line at the "? " prompt. CTRL-C to exit the script.
"""
import subprocess
import sys
while True:
addresses = input("? ")
if addresses.startswith("Backtrace:"):
addresses = addresses[len("Backtrace:") :]
if addresses.startswith("Stack memory:"):
addresses = addresses[len("Stack memory:") :]
addresses = addresses.strip().split()
addresses = [address.split(":")[0] for address in addresses]
for address in addresses:
result = subprocess.run(
["xtensa-esp32s2-elf-addr2line", "-aipfe", "build/nina-fw.elf"]
+ [address],
capture_output=True,
)
stdout = result.stdout.decode("utf-8")
if "?? ??" not in stdout:
print(stdout.strip())

101
tools/nina-fw-create-roots.sh Executable file
View file

@ -0,0 +1,101 @@
#!/bin/bash
echo '' > roots.pem
for filename in *.0
do
is_amazon=$(openssl x509 -in $filename -text -nocert | grep "O = Amazon")
is_google=$(openssl x509 -in $filename -text -nocert | grep "O = Google Trust Services LLC")
is_comodo=$(openssl x509 -in $filename -text -nocert | grep "O = Comodo CA Limited")
is_comodo_uppercase=$(openssl x509 -in $filename -text -nocert | grep "O = COMODO CA Limited")
is_digicert=$(openssl x509 -in $filename -text -nocert | grep "O = DigiCert")
is_isrg=$(openssl x509 -in $filename -text -nocert | grep "O = Internet Security Research Group")
is_verisign=$(openssl x509 -in $filename -text -nocert | grep "O = \"VeriSign, Inc.\"")
is_baltimore=$(openssl x509 -in $filename -text -nocert | grep "O = Baltimore")
is_globalsign=$(openssl x509 -in $filename -text -nocert | grep "O = GlobalSign")
is_starfield=$(openssl x509 -in $filename -text -nocert | grep "O = \"Starfield Technologies, Inc.\"")
is_dst=$(openssl x509 -in $filename -text -nocert | grep "O = Digital Signature Trust Co.")
is_cybertrust=$(openssl x509 -in $filename -text -nocert | grep "O = \"Cybertrust, Inc\"")
is_usertrust=$(openssl x509 -in $filename -text -nocert | grep "O = The USERTRUST Network")
openssl_opts="-text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions"
if [ ! -z "$is_amazon" ]
then
echo $is_amazon
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_google" ]
then
echo $is_google
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_comodo_uppercase" ]
then
echo $is_comodo_uppercase
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_comodo" ]
then
echo $is_comodo
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_digicert" ]
then
echo $is_digicert
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_isrg" ]
then
echo $is_isrg
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_verisign" ]
then
echo $is_verisign
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_baltimore" ]
then
echo $is_baltimore
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_globalsign" ]
then
echo $is_globalsign
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_starfield" ]
then
echo $is_starfield
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_dst" ]
then
echo $is_dst
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_cybertrust" ]
then
echo $is_cybertrust
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
if [ ! -z "$is_usertrust" ]
then
echo $is_usertrust
openssl x509 -in $filename $openssl_opts >> roots.pem
fi
done

54
tools/sslcheck.sh Executable file
View file

@ -0,0 +1,54 @@
#!/bin/bash
while getopts "c:l:e" opt;do
case $opt in
c ) export CER_FILE="$OPTARG";;
l ) export URL_LIST="$OPTARG";;
e ) export SHOW_ERR=1;;
* )
echo "Unknown parameter."
exit 1
;;
esac
done
if [ $# -eq 0 ] ; then
echo "Usage: $(basename $0) [-c /path/to/certificate/file.pem] [-l path/to/url/list.txt]"
echo
echo " -c specify certificate file to test"
echo " -l specify url list"
echo " -e show curl errors in log"
echo
echo "Example:"
echo " $(basename $0) -c roots.pem -l url_list.txt"
exit 0
fi
export SHOW_ERR=${SHOW_ERR:-0}
echo
echo SHOW_ERR=$SHOW_ERR
echo
for i in $(cat $URL_LIST)
do
echo -n "$i "
# -s: silent
# -S: show error
# -m: max time
# --cacert: path to certificate pem file
# --capath: local certificate path
# --output: stdout output
if [ "$SHOW_ERR" -eq 1 ] ; then
m=$(curl "$i" -s -S -m 60 --cacert $CER_FILE --capath /dev/null --output /dev/null --stderr -)
else
curl "$i" -s -m 60 --cacert $CER_FILE --capath /dev/null --output /dev/null
fi
#curl --cacert roots.pem --trace-ascii log.log -K url_list.txt
if [ $? -eq 0 ] ; then
echo -e "\e[32m PASS \e[39m"
else
echo -n -e "\e[31m FAIL \e[39m"
echo $m
fi
done

503
tools/url-check.txt Normal file
View file

@ -0,0 +1,503 @@
SHOW_ERR=1
https://google.com  PASS 
https://apple.co  PASS 
https://youtube.co  PASS 
https://play.google.com  PASS 
https://support.google.com  PASS 
https://cloudflare.com  PASS 
https://blogger.com  PASS 
https://microsoft.com  PASS 
https://linkedin.com  PASS 
https://docs.google.com  PASS 
https://youtu.be  PASS 
https://wordpress.org  PASS 
https://maps.google.com  PASS 
https://en.wikipedia.org  PASS 
https://mozilla.org  PASS 
https://accounts.google.com  PASS 
https://googleusercontent.com  FAIL curl: (6) Could not resolve host: googleusercontent.com
https://europa.eu  PASS 
https://sites.google.com  PASS 
https://drive.google.com  PASS 
https://vimeo.com  PASS 
https://adobe.com  PASS 
https://plus.google.com  PASS 
https://es.wikipedia.org  PASS 
https://pt.wikipedia.org  PASS 
https://uol.com.br  PASS 
https://bbc.co.uk  PASS 
https://amazon.com  PASS 
https://cnn.com  PASS 
https://bp.blogspot.com  FAIL curl: (6) Could not resolve host: bp.blogspot.com
https://facebook.com  PASS 
https://vk.com  PASS 
https://istockphoto.com  PASS 
https://github.com  PASS 
https://line.me  PASS 
https://www.yahoo.com  PASS 
https://wikimedia.org  PASS 
https://forbes.com  PASS 
https://opera.com  PASS 
https://creativecommons.org  PASS 
https://brandbucket.com  PASS 
https://imdb.com  PASS 
https://google.de  PASS 
https://dropbox.com  PASS 
https://google.co.jp  PASS 
https://live.com  PASS 
https://bbc.com  PASS 
https://myspace.com  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://mail.ru  PASS 
https://reuters.com  PASS 
https://jimdofree.com  PASS 
https://theguardian.com  PASS 
https://google.es  PASS 
https://medium.com  PASS 
https://news.google.com  PASS 
https://dailymotion.com  PASS 
https://mail.google.com  PASS 
https://www.weebly.com  PASS 
https://w3.org  PASS 
https://t.me  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://feedburner.com  PASS 
https://whatsapp.com  PASS 
https://issuu.com  PASS 
https://fr.wikipedia.org  PASS 
https://policies.google.com  PASS 
https://hugedomains.com  PASS 
https://abril.com.br  PASS 
https://developers.google.com  PASS 
https://globo.com  PASS 
https://google.com.br  PASS 
https://nih.gov  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://slideshare.net  PASS 
https://nytimes.com  PASS 
https://gstatic.com  PASS 
https://msn.com  PASS 
https://paypal.com  PASS 
https://get.google.com  PASS 
https://www.gov.uk  PASS 
https://who.int  PASS 
https://latimes.com  PASS 
https://steampowered.com  PASS 
https://bit.ly  PASS 
https://cdc.gov  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://news.yahoo.com  PASS 
https://wikia.com  PASS 
https://apache.org  PASS 
https://nasa.gov  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://twitter.com  PASS 
https://un.org  PASS 
https://books.google.com  PASS 
https://aboutads.info  PASS 
https://time.com  PASS 
https://draft.blogger.com  PASS 
https://change.org  PASS 
https://fandom.com  PASS 
https://google.it  PASS 
https://rakuten.co.jp  PASS 
https://tools.google.com  PASS 
https://buydomains.com  PASS 
https://webmd.com  PASS 
https://myaccount.google.com  PASS 
https://dailymail.co.uk  PASS 
https://translate.google.com  PASS 
https://independent.co.uk  PASS 
https://google.co.uk  PASS 
https://networkadvertising.org  PASS 
https://booking.com  PASS 
https://thesun.co.uk  PASS 
https://hatena.ne.jp  PASS 
https://cpanel.com  PASS 
https://pinterest.com  PASS 
https://ebay.com  PASS 
https://cpanel.net  PASS 
https://archive.org  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://telegraph.co.uk  PASS 
https://gravatar.com  PASS 
https://marketingplatform.google.com  PASS 
https://washingtonpost.com  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://de.wikipedia.org  PASS 
https://plesk.com  PASS 
https://wired.com  PASS 
https://namecheap.com  PASS 
https://search.google.com  PASS 
https://fb.com  PASS 
https://files.wordpress.com  PASS 
https://mediafire.com  PASS 
https://dan.com  PASS 
https://google.pl  PASS 
https://android.com  PASS 
https://aol.com  PASS 
https://telegram.me  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://picasaweb.google.com  PASS 
https://abcnews.go.com  PASS 
https://wsj.com  PASS 
https://it.wikipedia.org  PASS 
https://scribd.com  PASS 
https://usatoday.com  PASS 
https://google.fr  PASS 
https://youronlinechoices.com  PASS 
https://lefigaro.fr  PASS 
https://goo.gl  PASS 
https://samsung.com  PASS 
https://terra.com.br  PASS 
https://amazon.co.jp  PASS 
https://id.wikipedia.org  PASS 
https://huffingtonpost.com  PASS 
https://cnet.com  PASS 
https://huffpost.com  PASS 
https://ig.com.br  FAIL curl: (7) Failed to connect to ig.com.br port 443: Connection timed out
https://office.com  PASS 
https://businessinsider.com  PASS 
https://4shared.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://wa.me  PASS 
https://amazon.co.uk  PASS 
https://bloomberg.com  PASS 
https://ok.ru  PASS 
https://amazon.de  PASS 
https://harvard.edu  PASS 
https://foxnews.com  PASS 
https://photos.google.com  PASS 
https://aliexpress.com  PASS 
https://elpais.com  PASS 
https://google.ru  PASS 
https://tinyurl.com  PASS 
https://academia.edu  PASS 
https://twitch.tv  PASS 
https://surveymonkey.com  PASS 
https://rambler.ru  PASS 
https://stanford.edu  PASS 
https://wikihow.com  PASS 
https://eventbrite.com  PASS 
https://disney.com  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://wiley.com  PASS 
https://welt.de  PASS 
https://indiatimes.com  PASS 
https://pl.wikipedia.org  PASS 
https://nginx.com  PASS 
https://cbc.ca  PASS 
https://spotify.com  PASS 
https://xbox.com  PASS 
https://icann.org  PASS 
https://repubblica.it  PASS 
https://arxiv.org  PASS 
https://alibaba.com  PASS 
https://mega.nz  PASS 
https://usnews.com  FAIL curl: (28) Operation timed out after 60001 milliseconds with 0 bytes received
https://enable-javascript.com  PASS 
https://ziddu.com  PASS 
https://picasa.google.com  PASS 
https://lemonde.fr  PASS 
https://themeforest.net  PASS 
https://imageshack.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://sedo.com  PASS 
https://sciencedaily.com  PASS 
https://sputniknews.com  PASS 
https://netflix.com  PASS 
https://storage.googleapis.com  PASS 
https://theatlantic.com  PASS 
https://imageshack.us  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://goodreads.com  PASS 
https://php.net  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://loc.gov  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://disqus.com  PASS 
https://news.com.au  PASS 
https://photobucket.com  PASS 
https://lycos.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://qq.com  PASS 
https://forms.gle  PASS 
https://ikea.com  FAIL curl: (28) Connection timed out after 60001 milliseconds
https://ea.com  PASS 
https://cambridge.org  FAIL curl: (28) Connection timed out after 60000 milliseconds
https://trustpilot.com  PASS 
https://biglobe.ne.jp  PASS 
https://clickbank.net  FAIL curl: (6) Could not resolve host: clickbank.net
https://allaboutcookies.org  PASS 
https://mirror.co.uk  PASS 
https://nikkei.com  PASS 
https://abc.net.au  PASS 
https://ign.com  PASS 
https://walmart.com  PASS 
https://ipv4.google.com  PASS 
https://bandcamp.com  PASS 
https://m.wikipedia.org  PASS 
https://metro.co.uk  PASS 
https://depositfiles.com  PASS 
https://wp.com  PASS 
https://stackoverflow.com  PASS 
https://oup.com  PASS 
https://amazon.es  PASS 
https://ietf.org  PASS 
https://hp.com  PASS 
https://bund.de  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://secureserver.net  PASS 
https://cornell.edu  PASS 
https://techcrunch.com  PASS 
https://buzzfeed.com  PASS 
https://britannica.com  PASS 
https://yahoo.co.jp  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://gofundme.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://ft.com  PASS 
https://alexa.com  PASS 
https://ytimg.com  FAIL curl: (6) Could not resolve host: ytimg.com
https://abc.es  PASS 
https://npr.org  PASS 
https://kickstarter.com  PASS 
https://shutterstock.com  PASS 
https://columbia.edu  PASS 
https://google.nl  PASS 
https://unesco.org  FAIL curl: (28) Connection timed out after 60001 milliseconds
https://instagram.com  PASS 
https://my.yahoo.com  PASS 
https://researchgate.net  PASS 
https://urbandictionary.com  PASS 
https://bloglovin.com  PASS 
https://google.com.tw  PASS 
https://umich.edu  PASS 
https://chicagotribune.com  FAIL curl: (51) SSL: no alternative certificate subject name matches target host name 'chicagotribune.com'
https://list-manage.com  FAIL curl: (51) SSL: no alternative certificate subject name matches target host name 'list-manage.com'
https://ted.com  PASS 
https://playstation.com  PASS 
https://psychologytoday.com  PASS 
https://ovh.com  PASS 
https://privacyshield.gov  FAIL curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to privacyshield.gov:443
https://ggpht.com  FAIL curl: (6) Could not resolve host: ggpht.com
https://groups.google.com  PASS 
https://pixabay.com  PASS 
https://yandex.ru  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://dw.com  PASS 
https://addtoany.com  PASS 
https://code.google.com  PASS 
https://instructables.com  PASS 
https://quora.com  PASS 
https://gizmodo.com  PASS 
https://huawei.com  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://weibo.com  PASS 
https://nypost.com  PASS 
https://discord.com  PASS 
https://rottentomatoes.com  PASS 
https://netvibes.com  PASS 
https://mozilla.com  PASS 
https://noaa.gov  PASS 
https://economist.com  PASS 
https://google.co.in  PASS 
https://ovh.net  FAIL curl: (60) SSL certificate problem: certificate has expired More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://newsweek.com  PASS 
https://nydailynews.com  FAIL curl: (35) error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
https://sapo.pt  PASS 
https://ibm.com  PASS 
https://fda.gov  FAIL curl: (6) Could not resolve host: fda.gov
https://hm.com  PASS 
https://addthis.com  FAIL curl: (35) error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
https://nginx.org  PASS 
https://ovh.co.uk  PASS 
https://guardian.co.uk  PASS 
https://ria.ru  PASS 
https://gnu.org  PASS 
https://cbsnews.com  PASS 
https://www.wix.com  PASS 
https://yelp.com  PASS 
https://asus.com  FAIL curl: (7) Failed to connect to asus.com port 443: Connection refused
https://amazon.fr  PASS 
https://search.yahoo.com  PASS 
https://20minutos.es  PASS 
https://discord.gg  PASS 
https://ja.wikipedia.org  PASS 
https://express.co.uk  PASS 
https://espn.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://doubleclick.net  PASS 
https://naver.com  PASS 
https://google.co.id  PASS 
https://shopify.com  PASS 
https://digg.com  PASS 
https://bitly.com  PASS 
https://pbs.org  PASS 
https://mit.edu  PASS 
https://t.co  PASS 
https://sciencemag.org  PASS 
https://sciencedirect.com  PASS 
https://soundcloud.com  PASS 
https://engadget.com  PASS 
https://tripadvisor.com  PASS 
https://oracle.com  PASS 
https://blackberry.com  PASS 
https://nbcnews.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://mashable.com  PASS 
https://smh.com.au  PASS 
https://gmail.com  PASS 
https://bing.com  PASS 
https://thetimes.co.uk  PASS 
https://www.wikipedia.org  PASS 
https://sfgate.com  PASS 
https://berkeley.edu  PASS 
https://ca.gov  PASS 
https://adssettings.google.com  PASS 
https://washington.edu  PASS 
https://afternic.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://nationalgeographic.com  PASS 
https://akamaihd.net  FAIL curl: (6) Could not resolve host: akamaihd.net
https://whitehouse.gov  PASS 
https://spiegel.de  PASS 
https://rapidshare.com  FAIL curl: (7) Failed to connect to rapidshare.com port 443: Connection refused
https://e-monsite.com  PASS 
https://finance.yahoo.com  PASS 
https://detik.com  PASS 
https://box.com  PASS 
https://elmundo.es  PASS 
https://rt.com  PASS 
https://mysql.com  PASS 
https://nature.com  PASS 
https://cnbc.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://godaddy.com  FAIL curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to godaddy.com:443
https://sendspace.com  PASS 
https://theverge.com  PASS 
https://about.com  PASS 
https://ru.wikipedia.org  PASS 
https://variety.com  PASS 
https://www.over-blog.com  PASS 
https://googleblog.com  PASS 
https://yadi.sk  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://zendesk.com  PASS 
https://google.ca  PASS 
https://deezer.com  PASS 
https://utexas.edu  PASS 
https://standard.co.uk  PASS 
https://princeton.edu  PASS 
https://merriam-webster.com  PASS 
https://sina.com.cn  PASS 
https://techradar.com  PASS 
https://corriere.it  PASS 
https://axs.com  PASS 
https://wiktionary.org  PASS 
https://airbnb.com  PASS 
https://xinhuanet.com  FAIL curl: (7) Failed to connect to xinhuanet.com port 443: Connection timed out
https://feedburner.google.com  PASS 
https://wisc.edu  PASS 
https://prnewswire.com  PASS 
https://ed.gov  PASS 
https://worldbank.org  PASS 
https://investopedia.com  PASS 
https://imgur.com  PASS 
https://orange.fr  PASS 
https://nvidia.com  PASS 
https://wn.com  PASS 
https://megaupload.com  FAIL curl: (6) Could not resolve host: megaupload.com
https://ameblo.jp  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://politico.com  PASS 
https://foursquare.com  PASS 
https://www.canalblog.com  PASS 
https://bp1.blogger.com  PASS 
https://dribbble.com  PASS 
https://cia.gov  PASS 
https://irs.gov  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://fortune.com  PASS 
https://epa.gov  PASS 
https://statista.com  PASS 
https://groups.yahoo.com  PASS 
https://undeveloped.com  PASS 
https://springer.com  PASS 
https://elsevier.com  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://prezi.com  PASS 
https://mixcloud.com  PASS 
https://vkontakte.ru  PASS 
https://skype.com  PASS 
https://viglink.com  PASS 
https://marketwatch.com  PASS 
https://dreniq.com  PASS 
https://amazon.in  PASS 
https://storage.canalblog.com  PASS 
https://dot.tk  FAIL curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to dot.tk:443
https://eff.org  PASS 
https://plos.org  PASS 
https://home.neustar  PASS 
https://theglobeandmail.com  PASS 
https://thefreedictionary.com  PASS 
https://histats.com  PASS 
https://zeit.de  PASS 
https://narod.ru  PASS 
https://sports.yahoo.com  PASS 
https://yale.edu  PASS 
https://daum.net  PASS 
https://jstor.org  PASS 
https://ucoz.ru  PASS 
https://gooyaabitemplates.com  PASS 
https://hbr.org  PASS 
https://slate.com  PASS 
https://com.com  PASS 
https://howstuffworks.com  PASS 
https://pcmag.com  PASS 
https://so-net.ne.jp  PASS 
https://billboard.com  PASS 
https://cmu.edu  PASS 
https://goo.ne.jp  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://freepik.com  PASS 
https://thoughtco.com  PASS 
https://feedproxy.google.com  PASS 
https://pexels.com  PASS 
https://espn.go.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://fb.me  PASS 
https://ubuntu.com  PASS 
https://thenextweb.com  PASS 
https://over-blog-kiwi.com  PASS 
https://weather.com  PASS 
https://lonelyplanet.com  PASS 
https://en.wordpress.com  PASS 
https://ebay.co.uk  PASS 
https://iso.org  PASS 
https://thestar.com  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://businessinsider.com.au  PASS 
https://usgs.gov  PASS 
https://jhu.edu  PASS 
https://answers.yahoo.com  PASS 
https://google.com.au  PASS 
https://orkut.com.br  FAIL curl: (28) Connection timed out after 60001 milliseconds
https://amazon.ca  PASS 
https://kotaku.com  PASS 
https://softonic.com  PASS 
https://prestashop.com  FAIL curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://target.com  PASS 
https://timeout.com  PASS 
https://canada.ca  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://000webhost.com  PASS 
https://fifa.com  PASS 
https://parallels.com  PASS 
https://reverbnation.com  PASS 
https://oecd.org  PASS 
https://si.edu  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://sky.com  PASS 
https://insider.com  PASS 
https://canva.com  PASS 
https://soratemplates.com  PASS 
https://iubenda.com  PASS 
https://offset.com  PASS 
https://snapchat.com  PASS 
https://evernote.com  PASS 
https://scientificamerican.com  PASS 
https://psu.edu  PASS 
https://rollingstone.com  PASS 
https://cam.ac.uk  FAIL curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
https://doi.org  PASS 
https://etsy.com  PASS 
https://inc.com  PASS 
https://nicovideo.jp  PASS 
https://ap.org  PASS 
https://adweek.com  PASS 
https://dictionary.com  PASS 
https://newyorker.com  PASS 
https://channel4.com  PASS 
https://steamcommunity.com  PASS 
https://about.me  PASS 
https://nokia.com  PASS 
https://coursera.org  PASS 
https://rediff.com  PASS 
https://venturebeat.com  PASS 
https://www.livejournal.com  PASS 
https://biblegateway.com  PASS 
https://mystrikingly.com  PASS 
https://softpedia.com  PASS 
https://unicef.org  PASS 
https://debian.org  PASS 
https://fastcompany.com  PASS 

View file

@ -0,0 +1,932 @@
https://www.facebook.com/
https://www.yahoo.com/
https://www.live.com/
https://www.wikipedia.org/
https://www.msn.com/
https://www.microsoft.com/
https://www.blogspot.com/
https://www.baidu.com/
https://www.qq.com/
https://www.mozilla.com/
https://www.sina.com.cn/
https://www.wordpress.com/
https://www.bing.com/
https://www.adobe.com/
https://www.163.com/
https://www.taobao.com/
https://www.soso.com/
https://www.twitter.com/
https://www.youku.com/
https://www.ask.com/
https://www.sohu.com/
https://www.amazon.com/
https://www.windows.com/
https://www.ebay.com/
https://www.yahoo.co.jp/
https://www.apple.com/
https://www.tudou.com/
https://www.conduit.com/
https://www.hotmail.com/
https://www.flickr.com/
https://www.photobucket.com/
https://www.tianya.cn/
https://www.about.com/
https://www.cnet.com/
https://www.hao123.com/
https://www.iefxz.com/
https://www.xunlei.com/
https://www.paypal.com/
https://www.go.com/
https://www.fc2.com/
https://www.bbc.co.uk/
https://www.imdb.com/
https://www.orkut.com/
https://www.sogou.com/
https://www.56.com/
https://www.aol.com/
https://www.craigslist.org/
https://www.rakuten.co.jp/
https://www.imageshack.us/
https://www.ku6.com/
https://www.blogger.com/
https://www.goo.ne.jp/
https://www.ifeng.com/
https://www.linkedin.com/
https://www.yandex.ru/
https://www.mail.ru/
https://www.partypoker.com/
https://www.answers.com/
https://www.alibaba.com/
https://www.hi5.com/
https://www.cnn.com/
https://www.amazon.co.jp/
https://www.4shared.com/
https://www.ameblo.jp/
https://www.skype.com/
https://www.renren.com/
https://www.dailymotion.com/
https://www.naver.com/
https://www.weather.com/
https://www.mozilla.org/
https://www.mediafire.com/
https://www.bit.ly/
https://www.hp.com/
https://www.livedoor.jp/
https://www.ehow.com/
https://www.nifty.com/
https://www.vkontakte.ru/
https://www.alipay.com/
https://www.nytimes.com/
https://www.sourceforge.net/
https://www.fbcdn.net/
https://www.xtendmedia.com/
https://www.xinhuanet.com/
https://www.wikimedia.org/
https://www.pconline.com.cn/
https://www.daum.net/
https://www.4399.com/
https://www.bankofamerica.com/
https://www.ebay.de/
https://www.uol.com.br/
https://www.zol.com.cn/
https://www.mop.com/
https://www.alexa.com/
https://www.biglobe.ne.jp/
https://www.scribd.com/
https://www.softonic.com/
https://www.mapquest.com/
https://www.dell.com/
https://www.people.com.cn/
https://www.facebook.com/
https://www.yahoo.com/
https://www.live.com/
https://www.wikipedia.org/
https://www.msn.com/
https://www.microsoft.com/
https://www.blogspot.com/
https://www.baidu.com/
https://www.qq.com/
https://www.mozilla.com/
https://www.sina.com.cn/
https://www.wordpress.com/
https://www.bing.com/
https://www.adobe.com/
https://www.kaixin001.com/
https://www.geocities.jp/
https://www.ebay.co.uk/
https://www.hatena.ne.jp/
https://www.seesaa.net/
https://www.badoo.com/
https://www.126.com/
https://www.paipai.com/
https://www.avg.com/
https://www.pps.tv/
https://www.odnoklassniki.ru/
https://www.free.fr/
https://www.infoseek.co.jp/
https://www.zynga.com/
https://www.depositfiles.com/
https://www.metacafe.com/
https://www.chase.com/
https://www.thepiratebay.org/
https://www.kakaku.com/
https://www.cctv.com/
https://www.optmd.com/
https://www.hotfile.com/
https://www.com.com/
https://www.ning.com/
https://www.ocn.ne.jp/
https://www.vk.com/
https://www.game2.com.cn/
https://www.youdao.com/
https://www.getpersonas.com/
https://www.tripadvisor.com/
https://www.nate.com/
https://www.livejournal.com/
https://www.soufun.com/
https://www.zedo.com/
https://www.thefreedictionary.com/
https://www.2ch.net/
https://www.tinypic.com/
https://www.java.com/
https://www.narod.ru/
https://www.xici.net/
https://www.walmart.com/
https://www.114la.com/
https://www.joy.cn/
https://www.addthis.com/
https://www.globo.com/
https://www.360.cn/
https://www.cocolog-nifty.com/
https://www.netflix.com/
https://www.target.com/
https://www.58.com/
https://www.cyworld.com/
https://www.tom.com/
https://www.amazon.de/
https://www.netlog.com/
https://www.amazon.co.uk/
https://www.reference.com/
https://www.douban.com/
https://www.eastmoney.com/
https://www.livedoor.com/
https://www.hexun.com/
https://www.liveperson.net/
https://www.7k7k.com/
https://www.miniclip.com/
https://www.so-net.ne.jp/
https://www.39.net/
https://www.nih.gov/
https://www.sakura.ne.jp/
https://www.rambler.ru/
https://www.reuters.com/
https://www.kugou.com/
https://www.mixi.jp/
https://www.terra.com.br/
https://www.tripod.com/
https://www.mcafee.com/
https://www.att.com/
https://www.weather.com.cn/
https://www.tagged.com/
https://www.2345.com/
https://www.zing.vn/
https://www.exblog.jp/
https://www.chinamobile.com/
https://www.expedia.com/
https://www.ameba.jp/
https://www.tinyurl.com/
https://www.chinanews.com.cn/
https://www.commentcamarche.net/
https://www.allabout.co.jp/
https://www.taringa.net/
https://www.nicovideo.jp/
https://www.domaintools.com/
https://www.excite.co.jp/
https://www.autohome.com.cn/
https://www.typepad.com/
https://www.ezinearticles.com/
https://www.shopping.com/
https://www.deviantart.com/
https://www.marketgid.com/
https://www.ikea.com/
https://www.yomiuri.co.jp/
https://www.maktoob.com/
https://www.web.de/
https://www.informharry.com/
https://www.alimama.com/
https://www.ynet.com/
https://www.softpedia.com/
https://www.china.com/
https://www.6.cn/
https://www.5599.net/
https://www.cntv.cn/
https://www.booking.com/
https://www.orange.fr/
https://www.verycd.com/
https://www.multiply.com/
https://www.comcast.net/
https://www.skycn.com/
https://www.libero.it/
https://www.onet.pl/
https://www.rediff.com/
https://www.americanexpress.com/
https://www.dailymail.co.uk/
https://www.alot.com/
https://www.nasza-klasa.pl/
https://www.pchome.net/
https://www.51job.com/
https://www.okwave.jp/
https://www.70yx.com/
https://www.rakuten.ne.jp/
https://www.nikkeibp.co.jp/
https://www.mlb.com/
https://www.huffingtonpost.com/
https://www.bestbuy.com/
https://www.freelotto.com/
https://www.yahoo.net/
https://www.docstoc.com/
https://www.csdn.net/
https://www.digg.com/
https://www.macromedia.com/
https://www.tumblr.com/
https://www.twitpic.com/
https://www.impress.co.jp/
https://www.foxsports.com/
https://www.wikia.com/
https://www.t-online.de/
https://www.verizonwireless.com/
https://www.justin.tv/
https://www.ups.com/
https://www.wp.pl/
https://www.docin.com/
https://www.pdfqueen.com/
https://www.dangdang.com/
https://www.focus.cn/
https://www.ziddu.com/
https://www.hubpages.com/
https://www.kioskea.net/
https://www.babylon.com/
https://www.last.fm/
https://www.wellsfargo.com/
https://www.gmx.net/
https://www.friendster.com/
https://www.wsj.com/
https://www.slideshare.net/
https://www.foxnews.com/
https://www.ganji.com/
https://www.iza.ne.jp/
https://www.51.com/
https://www.metrolyrics.com/
https://www.yesky.com/
https://www.usps.com/
https://www.mainichi.jp/
https://www.irs.gov/
https://www.bigpoint.com/
https://www.china.com.cn/
https://www.iciba.com/
https://www.hulu.com/
https://www.gmarket.co.kr/
https://www.tabelog.com/
https://www.gamespot.com/
https://www.symantec.com/
https://www.nokia.com/
https://www.pcpop.com/
https://www.torrentz.com/
https://www.pptv.com/
https://www.telegraph.co.uk/
https://www.duowan.com/
https://www.joins.com/
https://www.wordreference.com/
https://www.ign.com/
https://www.huanqiu.com/
https://www.aweber.com/
https://www.guardian.co.uk/
https://www.samsung.com/
https://www.skyrock.com/
https://www.sun.com/
https://www.the2009.cn/
https://www.musica.com/
https://www.icq.com/
https://www.allegro.pl/
https://www.virgilio.it/
https://www.nhk.or.jp/
https://www.linekong.com/
https://www.hudong.com/
https://www.comcast.com/
https://www.pcauto.com.cn/
https://www.sponichi.co.jp/
https://www.isohunt.com/
https://www.traviangames.com/
https://www.zimbio.com/
https://www.robtex.com/
https://www.wretch.cc/
https://www.japanpost.jp/
https://www.onlinedown.net/
https://www.godaddy.com/
https://www.vimeo.com/
https://www.qidian.com/
https://www.mapion.co.jp/
https://www.washingtonpost.com/
https://www.118114.cn/
https://www.ieaddons.com/
https://www.wikimapia.org/
https://www.jiayuan.com/
https://www.sanspo.com/
https://www.whitepages.com/
https://www.yelp.com/
https://www.real.com/
https://www.bizrate.com/
https://www.amazon.cn/
https://www.hc360.com/
https://www.17173.com/
https://www.ineedfile.com/
https://www.360buy.com/
https://www.8684.cn/
https://www.pplive.com/
https://www.over-blog.com/
https://www.baixaki.com.br/
https://www.beemp3.com/
https://www.cnzz.com/
https://www.usatoday.com/
https://www.tenpay.com/
https://www.asahi.com/
https://www.surveymonkey.com/
https://www.21cn.com/
https://www.nba.com/
https://www.informer.com/
https://www.intuit.com/
https://www.letitbit.net/
https://www.plala.or.jp/
https://www.homedepot.com/
https://www.ctrip.com/
https://www.opera.com/
https://www.37cs.com/
https://www.jiji.com/
https://www.ucoz.ru/
https://www.webmd.com/
https://www.sonico.com/
https://www.avast.com/
https://www.linternaute.com/
https://www.letv.com/
https://www.ip138.com/
https://www.careerbuilder.com/
https://www.ibm.com/
https://www.associatedcontent.com/
https://www.gnavi.co.jp/
https://www.rincondelvago.com/
https://www.indiatimes.com/
https://www.ddmap.com/
https://www.veoh.com/
https://www.dtiblog.com/
https://www.zylom.com/
https://www.monografias.com/
https://www.auction.co.kr/
https://www.fedex.com/
https://www.liveinternet.ru/
https://www.koubei.com/
https://www.game2.cn/
https://www.suite101.com/
https://www.squidoo.com/
https://www.teacup.com/
https://www.addictinggames.com/
https://www.filehippo.com/
https://www.sdo.com/
https://www.ustream.tv/
https://www.tistory.com/
https://www.115.com/
https://www.liutilities.com/
https://www.jalan.net/
https://www.webs.com/
https://www.naqigs.com/
https://www.it168.com/
https://www.etology.com/
https://www.everesttech.net/
https://www.intelius.com/
https://www.sina.com/
https://www.pomoho.com/
https://www.serving-sys.com/
https://www.sciencedirect.com/
https://www.ccbill.com/
https://www.incredimail.com/
https://www.capitalone.com/
https://www.yellowpages.com/
https://www.geocities.co.jp/
https://www.ebay.it/
https://www.glispa.com/
https://www.hotels.com/
https://www.opendns.com/
https://www.engadget.com/
https://www.chosun.com/
https://www.y8.com/
https://www.ourtoolbar.com/
https://www.oricon.co.jp/
https://www.downloadhelper.net/
https://www.oyunlar1.com/
https://www.vector.co.jp/
https://www.cmbchina.com/
https://www.farmville.com/
https://www.120ask.com/
https://www.chip.de/
https://www.atwiki.jp/
https://www.zhaopin.com/
https://www.freeonlinegames.com/
https://www.wordpress.org/
https://www.latimes.com/
https://www.fotolog.com/
https://www.mp3raid.com/
https://www.boston.com/
https://www.mobile.de/
https://www.aufeminin.com/
https://www.wikihow.com/
https://www.11st.co.kr/
https://www.yaplog.jp/
https://www.merriam-webster.com/
https://www.itmedia.co.jp/
https://www.cookpad.com/
https://www.mercadolivre.com.br/
https://www.tu.tv/
https://www.wauee.com/
https://www.priceline.com/
https://www.zshare.net/
https://www.qunar.com/
https://www.ryanair.com/
https://www.interia.pl/
https://www.ig.com.br/
https://www.monster.com/
https://www.archive.org/
https://www.alice.it/
https://www.xinmin.cn/
https://www.fixya.com/
https://www.nikkansports.com/
https://www.funshion.com/
https://www.sears.com/
https://www.bild.de/
https://www.ebay.fr/
https://www.iminent.com/
https://www.uploading.com/
https://www.baofeng.com/
https://www.1ting.com/
https://www.kuwo.cn/
https://www.bitauto.com/
https://www.tiexue.net/
https://www.mpnrs.com/
https://www.nowdownloadall.com/
https://www.southwest.com/
https://www.ce.cn/
https://www.in.com/
https://www.allrecipes.com/
https://www.travelocity.com/
https://www.people.com/
https://www.timesonline.co.uk/
https://www.dealtime.com/
https://www.ticketmaster.com/
https://www.mtv.com/
https://www.gazeta.pl/
https://www.bin-layer.de/
https://www.9wee.com/
https://www.donga.com/
https://www.lowes.com/
https://www.fanpop.com/
https://www.cnxad.com/
https://www.angelfire.com/
https://www.blackberry.com/
https://www.01net.com/
https://www.wunderground.com/
https://www.news.cn/
https://www.sapo.pt/
https://www.nydailynews.com/
https://www.mtime.com/
https://www.univision.com/
https://www.sfr.fr/
https://www.winamp.com/
https://www.webshots.com/
https://www.enet.com.cn/
https://www.made-in-china.com/
https://www.constantcontact.com/
https://www.examiner.com/
https://www.pandora.tv/
https://www.abril.com.br/
https://www.indeed.com/
https://www.overstock.com/
https://www.xywy.com/
https://www.gizmodo.com/
https://www.wiktionary.org/
https://www.shinobi.jp/
https://www.pandora.com/
https://www.dianping.com/
https://www.repubblica.it/
https://www.360doc.com/
https://www.duote.com/
https://www.176.com/
https://www.intel.com/
https://www.accountonline.com/
https://www.altervista.org/
https://www.rapid-downloads.com/
https://www.xe.com/
https://www.pixnet.net/
https://www.ebuddy.com/
https://www.radikal.ru/
https://www.webgame.com.cn/
https://www.jcpenney.com/
https://www.armorgames.com/
https://www.information.com/
https://www.downloadcave.com/
https://www.orbitz.com/
https://www.ca.gov/
https://www.zaycev.net/
https://www.imvu.com/
https://www.rian.ru/
https://www.usagc.org/
https://www.metroflog.com/
https://www.medicinenet.com/
https://www.classmates.com/
https://www.windowsmedia.com/
https://www.detik.com/
https://www.mk.co.kr/
https://www.microsofttranslator.com/
https://www.verizon.net/
https://www.cartoonnetwork.com/
https://www.mt.co.kr/
https://www.rr.com/
https://www.fresheye.com/
https://www.sweetim.com/
https://www.stumbleupon.com/
https://www.myvideo.de/
https://www.hotpepper.jp/
https://www.pcgames.com.cn/
https://www.costco.com/
https://www.uploaded.to/
https://www.xiaonei.com/
https://www.24h.com.vn/
https://www.mafiawars.com/
https://www.priceminister.com/
https://www.w3.org/
https://www.nhaccuatui.com/
https://www.vnexpress.net/
https://www.foxnetworks.com/
https://www.freakshare.net/
https://www.rutracker.org/
https://www.elmundo.es/
https://www.torrentreactor.net/
https://www.best-price.com/
https://www.nasa.gov/
https://www.mdinfo.com/
https://www.limewire.com/
https://www.wer-kennt-wen.de/
https://www.nikkei.com/
https://www.gap.com/
https://www.wiley.com/
https://www.time.com/
https://www.elsevier.com/
https://www.howstuffworks.com/
https://www.agame.com/
https://www.che168.com/
https://www.corriere.it/
https://www.xorg.pl/
https://www.wachovia.com/
https://www.thesun.co.uk/
https://www.girlsgogames.com/
https://www.piriform.com/
https://www.rbc.ru/
https://www.spiegel.de/
https://www.tbs.co.jp/
https://www.europa.eu/
https://www.btjunkie.org/
https://www.vancl.com/
https://www.citibank.com/
https://www.clubpenguin.com/
https://www.verizon.com/
https://www.forbes.com/
https://www.delta.com/
https://www.sky.com/
https://www.nikkei.co.jp/
https://www.norton.com/
https://www.rapid4me.com/
https://www.seznam.cz/
https://www.zoosk.com/
https://www.jstor.org/
https://www.19lou.com/
https://www.juegos.com/
https://www.easyjet.com/
https://www.hyves.nl/
https://www.cbsnews.com/
https://www.yoka.com/
https://www.mylife.com/
https://www.jrj.com.cn/
https://www.businessweek.com/
https://www.partypoker.it/
https://www.shop-pro.jp/
https://www.taleo.net/
https://www.dantri.com.vn/
https://www.pcworld.com/
https://www.xcar.com.cn/
https://www.chinaz.com/
https://www.nike.com/
https://www.ya.ru/
https://www.picnik.com/
https://www.pchome.com.tw/
https://www.with2.net/
https://www.pogo.com/
https://www.fanbox.com/
https://www.95599.cn/
https://www.evite.com/
https://www.hankooki.com/
https://www.stayfriends.de/
https://www.gutefrage.net/
https://www.logmein.com/
https://www.break.com/
https://www.mercadolibre.com.mx/
https://www.blogcu.com/
https://www.winzip.com/
https://www.bahn.de/
https://www.topshareware.com/
https://www.acer.com/
https://www.mynet.com/
https://www.urbandictionary.com/
https://www.sanook.com/
https://www.rayfile.com/
https://www.usenet.nl/
https://www.encyclopedia.com/
https://www.imagevenue.com/
https://www.qip.ru/
https://www.discovery.com/
https://www.yam.com/
https://www.265.com/
https://www.mashable.com/
https://www.me.com/
https://www.yandex.ua/
https://www.foodnetwork.com/
https://www.freewebs.com/
https://www.sonyericsson.com/
https://www.61.com/
https://www.articlesbase.com/
https://www.mufg.jp/
https://www.xrea.com/
https://www.chinacars.com/
https://www.cri.cn/
https://www.movies-links.tv/
https://www.match.com/
https://www.livescore.com/
https://www.zhcw.com/
https://www.ebay.com.au/
https://www.istockphoto.com/
https://www.speedtest.net/
https://www.sprint.com/
https://www.superpages.com/
https://www.infospace.com/
https://www.accuweather.com/
https://www.doctissimo.fr/
https://www.msn.com.cn/
https://www.t-mobile.com/
https://www.tuenti.com/
https://www.tmz.com/
https://www.otto.de/
https://www.gemius.pl/
https://www.shoplocal.com/
https://www.barnesandnoble.com/
https://www.pclady.com.cn/
https://www.ninemsn.com.au/
https://www.wanfangdata.com.cn/
https://www.pronto.com/
https://www.baixing.com/
https://www.worldstarhiphop.com/
https://www.yahoo.com.tw/
https://www.cnki.com.cn/
https://www.w3schools.com/
https://www.unlimited-downloads.biz/
https://www.carview.co.jp/
https://www.zjol.com.cn/
https://www.bebo.com/
https://www.hinet.net/
https://www.buzzle.com/
https://www.schuelervz.net/
https://www.nationalgeographic.com/
https://www.local.com/
https://www.tv.com/
https://www.kaskus.us/
https://www.etsy.com/
https://www.eastday.com/
https://www.shumenol.com/
https://www.sendspace.com/
https://www.citysearch.com/
https://www.zaobao.com/
https://www.ed.gov/
https://www.irctc.co.in/
https://www.downtr.net/
https://www.playstation.com/
https://www.elpais.com/
https://www.utorrent.com/
https://www.blogmura.com/
https://www.mapbar.com/
https://www.readnovel.com/
https://www.m1905.com/
https://www.marriott.com/
https://www.popeater.com/
https://www.jsoftj.com/
https://www.tweetmeme.com/
https://www.hm.com/
https://www.travelzoo.com/
https://www.torrentdownloads.net/
https://www.izlesene.com/
https://www.studivz.net/
https://www.hilton.com/
https://www.kayak.com/
https://www.zappos.com/
https://www.realtor.com/
https://www.abchina.com/
https://www.hurra.com/
https://www.aa.com/
https://www.uuu9.com/
https://www.cricinfo.com/
https://www.52pk.com/
https://www.searchignite.com/
https://www.chinadaily.com.cn/
https://www.newegg.com/
https://www.timeanddate.com/
https://www.direct.gov.uk/
https://www.pctools.com/
https://www.27.cn/
https://www.tgbus.com/
https://www.fc2web.com/
https://www.mozdev.org/
https://www.marca.com/
https://www.udn.com/
https://www.amazon.fr/
https://www.weblio.jp/
https://www.changyou.com/
https://www.daily.co.jp/
https://www.thefind.com/
https://www.nttdocomo.co.jp/
https://www.kohls.com/
https://www.walkerplus.com/
https://www.babycenter.com/
https://www.ow.ly/
https://www.toocle.com/
https://www.webcrawler.com/
https://www.stackoverflow.com/
https://www.ekolay.net/
https://www.kuronekoyamato.co.jp/
https://www.vzw.com/
https://www.buzznet.com/
https://www.wetter.com/
https://www.dospy.com/
https://www.fidelity.com/
https://www.gismeteo.ru/
https://www.ft.com/
https://www.freedownloadscenter.com/
https://www.bidders.co.jp/
https://www.tesco.com/
https://www.azlyrics.com/
https://www.legacy.com/
https://www.tf1.fr/
https://www.nhl.com/
https://www.mycom.co.jp/
https://www.rtl.de/
https://www.hankyung.com/
https://www.edeng.cn/
https://www.immobilienscout24.de/
https://www.gigazine.net/
https://www.marketwatch.com/
https://www.xuite.net/
https://www.techcrunch.com/
https://www.inowdownload.com/
https://www.kooora.com/
https://www.zdnet.com/
https://www.causes.com/
https://www.imagebam.com/
https://www.thesaurus.com/
https://www.boc.cn/
https://www.kapook.com/
https://www.argos.co.uk/
https://www.kp.ru/
https://www.uniblue.com/
https://www.boosj.com/
https://www.meebo.com/
https://www.redtram.com/
https://www.qianlong.com/
https://www.top100.cn/
https://www.ancestry.com/
https://www.pricegrabber.com/
https://www.pkr.com/
https://www.php.net/
https://www.ea.com/
https://www.rutube.ru/
https://www.qingdaonews.com/
https://www.sbs.co.kr/
https://www.shvoong.com/
https://www.kaspersky.com/
https://www.bigfishgames.com/
https://www.xing.com/
https://www.sing365.com/
https://www.bloomberg.com/
https://www.newhua.com/
https://www.asiae.co.kr/
https://www.aolnews.com/
https://www.bdr130.net/
https://www.picktorrent.com/
https://www.pixmania.com/
https://www.wired.com/
https://www.vatgia.com/
https://www.divx.com/
https://www.ana.co.jp/
https://www.fandango.com/
https://www.seoul.co.kr/
https://www.appspot.com/
https://www.bandoo.com/
https://www.city-data.com/
https://www.wisegeek.com/
https://www.ocnk.net/
https://www.hunantv.com/
https://www.kijiji.ca/
https://www.cnki.net/
https://www.panasonic.jp/
https://www.allocine.fr/
https://www.chinahr.com/
https://www.emagister.com/
https://www.manta.com/
https://www.rayli.com.cn/
https://www.asahi-net.or.jp/
https://www.dreamstime.com/
https://www.lastminute.com/
https://www.nick.com/
https://www.deezer.com/
https://www.bohelady.com/
https://www.esmas.com/
https://www.vente-privee.com/
https://www.lyricsmode.com/
https://www.findarticles.com/
https://www.47news.jp/
https://www.staples.com/
https://www.songs.pk/
https://www.bomb-mp3.com/
https://www.cqvip.com/
https://www.autoscout24.de/
https://www.victoriassecret.com/
https://www.acrobat.com/
https://www.national-lottery.co.uk/
https://www.mayoclinic.com/
https://www.zillow.com/
https://www.onemanga.com/
https://www.playsushi.com/
https://www.answerbag.com/
https://www.ukr.net/
https://www.citicards.com/
https://www.kaixin.com/
https://www.kbs.co.kr/
https://www.toysrus.com/
https://www.freshwap.net/
https://www.vertor.com/
https://www.mahalo.com/
https://www.hurriyet.com.tr/
https://www.mercadolibre.com.ar/
https://www.shangdu.com/
https://www.barbie.com/
https://www.interpark.com/
https://www.mizuhobank.co.jp/
https://www.hotwire.com/
https://www.kompas.com/
https://www.rising.com.cn/
https://www.blurtit.com/
https://www.newgrounds.com/
https://www.mundoanuncio.com/
https://www.marktplaats.nl/
https://www.ringtonematcher.com/
https://www.goal.com/
https://www.xs8.cn/
https://www.mthai.com/
https://www.clarin.com/
https://www.openoffice.org/
https://www.ciao.de/
https://www.jal.co.jp/
https://www.lyrics007.com/
https://www.ovguide.com/
https://www.ultimate-guitar.com/
https://www.mobile01.com/
https://www.vdisk.cn/
https://www.buy.com/
https://www.computerbild.de/
https://www.usgs.gov/
https://www.te3p.com/
https://www.cooks.com/
https://www.mcssl.com/
https://www.reverso.net/
https://www.merchantcircle.com/
https://www.tiancity.com/
https://www.dropbox.com/
https://www.yfrog.com/
https://www.tiscali.it/
https://www.xbox.com/
https://www.easy-share.com/
https://www.autotrader.com/
https://www.gotomeeting.com/
https://www.download-gate.com/
https://www.nfl.com/
https://www.experts-exchange.com/
https://www.cool.ne.jp/
https://www.fx120.net/
https://www.ntv.co.jp/
https://www.meinvz.net/
https://www.king.com/
https://www.virginmedia.com/
https://www.google.com/
https://www.youtube.com/

View file

@ -0,0 +1,500 @@
https://google.com
https://apple.co
https://youtube.co
https://play.google.com
https://support.google.com
https://cloudflare.com
https://blogger.com
https://microsoft.com
https://linkedin.com
https://docs.google.com
https://youtu.be
https://wordpress.org
https://maps.google.com
https://en.wikipedia.org
https://mozilla.org
https://accounts.google.com
https://googleusercontent.com
https://europa.eu
https://sites.google.com
https://drive.google.com
https://vimeo.com
https://adobe.com
https://plus.google.com
https://es.wikipedia.org
https://pt.wikipedia.org
https://uol.com.br
https://bbc.co.uk
https://amazon.com
https://cnn.com
https://bp.blogspot.com
https://facebook.com
https://vk.com
https://istockphoto.com
https://github.com
https://line.me
https://www.yahoo.com
https://wikimedia.org
https://forbes.com
https://opera.com
https://creativecommons.org
https://brandbucket.com
https://imdb.com
https://google.de
https://dropbox.com
https://google.co.jp
https://live.com
https://bbc.com
https://myspace.com
https://mail.ru
https://reuters.com
https://jimdofree.com
https://theguardian.com
https://google.es
https://medium.com
https://news.google.com
https://dailymotion.com
https://mail.google.com
https://www.weebly.com
https://w3.org
https://t.me
https://feedburner.com
https://whatsapp.com
https://issuu.com
https://fr.wikipedia.org
https://policies.google.com
https://hugedomains.com
https://abril.com.br
https://developers.google.com
https://globo.com
https://google.com.br
https://nih.gov
https://slideshare.net
https://nytimes.com
https://gstatic.com
https://msn.com
https://paypal.com
https://get.google.com
https://www.gov.uk
https://who.int
https://latimes.com
https://steampowered.com
https://bit.ly
https://cdc.gov
https://news.yahoo.com
https://wikia.com
https://apache.org
https://nasa.gov
https://twitter.com
https://un.org
https://books.google.com
https://aboutads.info
https://time.com
https://draft.blogger.com
https://change.org
https://fandom.com
https://google.it
https://rakuten.co.jp
https://tools.google.com
https://buydomains.com
https://webmd.com
https://myaccount.google.com
https://dailymail.co.uk
https://translate.google.com
https://independent.co.uk
https://google.co.uk
https://networkadvertising.org
https://booking.com
https://thesun.co.uk
https://hatena.ne.jp
https://cpanel.com
https://pinterest.com
https://ebay.com
https://cpanel.net
https://archive.org
https://telegraph.co.uk
https://gravatar.com
https://marketingplatform.google.com
https://washingtonpost.com
https://de.wikipedia.org
https://plesk.com
https://wired.com
https://namecheap.com
https://search.google.com
https://fb.com
https://files.wordpress.com
https://mediafire.com
https://dan.com
https://google.pl
https://android.com
https://aol.com
https://telegram.me
https://picasaweb.google.com
https://abcnews.go.com
https://wsj.com
https://it.wikipedia.org
https://scribd.com
https://usatoday.com
https://google.fr
https://youronlinechoices.com
https://lefigaro.fr
https://goo.gl
https://samsung.com
https://terra.com.br
https://amazon.co.jp
https://id.wikipedia.org
https://huffingtonpost.com
https://cnet.com
https://huffpost.com
https://ig.com.br
https://office.com
https://businessinsider.com
https://4shared.com
https://wa.me
https://amazon.co.uk
https://bloomberg.com
https://ok.ru
https://amazon.de
https://harvard.edu
https://foxnews.com
https://photos.google.com
https://aliexpress.com
https://elpais.com
https://google.ru
https://tinyurl.com
https://academia.edu
https://twitch.tv
https://surveymonkey.com
https://rambler.ru
https://stanford.edu
https://wikihow.com
https://eventbrite.com
https://disney.com
https://wiley.com
https://welt.de
https://indiatimes.com
https://pl.wikipedia.org
https://nginx.com
https://cbc.ca
https://spotify.com
https://xbox.com
https://icann.org
https://repubblica.it
https://arxiv.org
https://alibaba.com
https://mega.nz
https://usnews.com
https://enable-javascript.com
https://ziddu.com
https://picasa.google.com
https://lemonde.fr
https://themeforest.net
https://imageshack.com
https://sedo.com
https://sciencedaily.com
https://sputniknews.com
https://netflix.com
https://storage.googleapis.com
https://theatlantic.com
https://imageshack.us
https://goodreads.com
https://php.net
https://loc.gov
https://disqus.com
https://news.com.au
https://photobucket.com
https://lycos.com
https://qq.com
https://forms.gle
https://ikea.com
https://ea.com
https://cambridge.org
https://trustpilot.com
https://biglobe.ne.jp
https://clickbank.net
https://allaboutcookies.org
https://mirror.co.uk
https://nikkei.com
https://abc.net.au
https://ign.com
https://walmart.com
https://ipv4.google.com
https://bandcamp.com
https://m.wikipedia.org
https://metro.co.uk
https://depositfiles.com
https://wp.com
https://stackoverflow.com
https://oup.com
https://amazon.es
https://ietf.org
https://hp.com
https://bund.de
https://secureserver.net
https://cornell.edu
https://techcrunch.com
https://buzzfeed.com
https://britannica.com
https://yahoo.co.jp
https://gofundme.com
https://ft.com
https://alexa.com
https://ytimg.com
https://abc.es
https://npr.org
https://kickstarter.com
https://shutterstock.com
https://columbia.edu
https://google.nl
https://unesco.org
https://instagram.com
https://my.yahoo.com
https://researchgate.net
https://urbandictionary.com
https://bloglovin.com
https://google.com.tw
https://umich.edu
https://chicagotribune.com
https://list-manage.com
https://ted.com
https://playstation.com
https://psychologytoday.com
https://ovh.com
https://privacyshield.gov
https://ggpht.com
https://groups.google.com
https://pixabay.com
https://yandex.ru
https://dw.com
https://addtoany.com
https://code.google.com
https://instructables.com
https://quora.com
https://gizmodo.com
https://huawei.com
https://weibo.com
https://nypost.com
https://discord.com
https://rottentomatoes.com
https://netvibes.com
https://mozilla.com
https://noaa.gov
https://economist.com
https://google.co.in
https://ovh.net
https://newsweek.com
https://nydailynews.com
https://sapo.pt
https://ibm.com
https://fda.gov
https://hm.com
https://addthis.com
https://nginx.org
https://ovh.co.uk
https://guardian.co.uk
https://ria.ru
https://gnu.org
https://cbsnews.com
https://www.wix.com
https://yelp.com
https://asus.com
https://amazon.fr
https://search.yahoo.com
https://20minutos.es
https://discord.gg
https://ja.wikipedia.org
https://express.co.uk
https://espn.com
https://doubleclick.net
https://naver.com
https://google.co.id
https://shopify.com
https://digg.com
https://bitly.com
https://pbs.org
https://mit.edu
https://t.co
https://sciencemag.org
https://sciencedirect.com
https://soundcloud.com
https://engadget.com
https://tripadvisor.com
https://oracle.com
https://blackberry.com
https://nbcnews.com
https://mashable.com
https://smh.com.au
https://gmail.com
https://bing.com
https://thetimes.co.uk
https://www.wikipedia.org
https://sfgate.com
https://berkeley.edu
https://ca.gov
https://adssettings.google.com
https://washington.edu
https://afternic.com
https://nationalgeographic.com
https://akamaihd.net
https://whitehouse.gov
https://spiegel.de
https://rapidshare.com
https://e-monsite.com
https://finance.yahoo.com
https://detik.com
https://box.com
https://elmundo.es
https://rt.com
https://mysql.com
https://nature.com
https://cnbc.com
https://godaddy.com
https://sendspace.com
https://theverge.com
https://about.com
https://ru.wikipedia.org
https://variety.com
https://www.over-blog.com
https://googleblog.com
https://yadi.sk
https://zendesk.com
https://google.ca
https://deezer.com
https://utexas.edu
https://standard.co.uk
https://princeton.edu
https://merriam-webster.com
https://sina.com.cn
https://techradar.com
https://corriere.it
https://axs.com
https://wiktionary.org
https://airbnb.com
https://xinhuanet.com
https://feedburner.google.com
https://wisc.edu
https://prnewswire.com
https://ed.gov
https://worldbank.org
https://investopedia.com
https://imgur.com
https://orange.fr
https://nvidia.com
https://wn.com
https://megaupload.com
https://ameblo.jp
https://politico.com
https://foursquare.com
https://www.canalblog.com
https://bp1.blogger.com
https://dribbble.com
https://cia.gov
https://irs.gov
https://fortune.com
https://epa.gov
https://statista.com
https://groups.yahoo.com
https://undeveloped.com
https://springer.com
https://elsevier.com
https://prezi.com
https://mixcloud.com
https://vkontakte.ru
https://skype.com
https://viglink.com
https://marketwatch.com
https://dreniq.com
https://amazon.in
https://storage.canalblog.com
https://dot.tk
https://eff.org
https://plos.org
https://home.neustar
https://theglobeandmail.com
https://thefreedictionary.com
https://histats.com
https://zeit.de
https://narod.ru
https://sports.yahoo.com
https://yale.edu
https://daum.net
https://jstor.org
https://ucoz.ru
https://gooyaabitemplates.com
https://hbr.org
https://slate.com
https://com.com
https://howstuffworks.com
https://pcmag.com
https://so-net.ne.jp
https://billboard.com
https://cmu.edu
https://goo.ne.jp
https://freepik.com
https://thoughtco.com
https://feedproxy.google.com
https://pexels.com
https://espn.go.com
https://fb.me
https://ubuntu.com
https://thenextweb.com
https://over-blog-kiwi.com
https://weather.com
https://lonelyplanet.com
https://en.wordpress.com
https://ebay.co.uk
https://iso.org
https://thestar.com
https://businessinsider.com.au
https://usgs.gov
https://jhu.edu
https://answers.yahoo.com
https://google.com.au
https://orkut.com.br
https://amazon.ca
https://kotaku.com
https://softonic.com
https://prestashop.com
https://target.com
https://timeout.com
https://canada.ca
https://000webhost.com
https://fifa.com
https://parallels.com
https://reverbnation.com
https://oecd.org
https://si.edu
https://sky.com
https://insider.com
https://canva.com
https://soratemplates.com
https://iubenda.com
https://offset.com
https://snapchat.com
https://evernote.com
https://scientificamerican.com
https://psu.edu
https://rollingstone.com
https://cam.ac.uk
https://doi.org
https://etsy.com
https://inc.com
https://nicovideo.jp
https://ap.org
https://adweek.com
https://dictionary.com
https://newyorker.com
https://channel4.com
https://steamcommunity.com
https://about.me
https://nokia.com
https://coursera.org
https://rediff.com
https://venturebeat.com
https://www.livejournal.com
https://biblegateway.com
https://mystrikingly.com
https://softpedia.com
https://unicef.org
https://debian.org
https://fastcompany.com