Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPA/WPA2 Enterprise support [ch1317] #1289

merged 179 commits into from Jun 14, 2017


Copy link

commented Apr 5, 2017

Do not merge


WPA Enterprise support was required :)


Apart from implementing WPA Enterprise support (with EAP-TLS and PEAP/MSCHAPv2 authentication), this PR includes a newer WICED: 3.7.0-7. See the relevant photon-wiced branch for a list of WICED fixes/enhancements.

Steps to Test

Example App




  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Add additional tests
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to after merging (add links to docs and issues)


  • [PR #1289] [Implements #914] [Photon/P1] WPA/WPA2 Enterprise support added (PEAP/MSCHAPv2 and EAP-TLS)! [Photon/P1] Automatic cipher/security detection when configuring WiFi settings over Serial.


  • [PR #1269] [Closes #1165] Cloud connection can be closed gracefully allowing confirmable messages to reach the cloud before the connection is terminated


  • [PR #1289] Fixes a stack overlap with system-part2 static RAM on Photon/P1
  • [PR #1289] Fixes a memory leak when Thread is terminated
  • [PR #1289] Fixes a deadlock in SoftAP, when connection is terminated prematurely

@avtolstoy avtolstoy added this to the 0.7.0 milestone Apr 5, 2017

@technobly technobly added the feature label Apr 5, 2017

@technobly technobly changed the title WPA Enterprise support WPA/WPA2 Enterprise support Apr 5, 2017

@technobly technobly changed the title WPA/WPA2 Enterprise support WPA/WPA2 Enterprise support [ch1317] Apr 5, 2017

avtolstoy and others added 26 commits Mar 2, 2017
IMPORTANT: Photon/P1 system-part2 RAM increased due to overlap with s…

A check has been added to the linker file to catch this error.

system-part2 now uses 4k RAM from the 16k of reserved heap space.
This should not break compatibility with user apps built with earlier versions of firmware.
Thread stack memory leak fix/workaround for Photon/P1
Relevant tests: THREAD_02_thread_doesnt_leak_memory, APPLICATION_WATCHDOG_03_doesnt_leak_memory
system-part2 RAM optimizations:
- Removes duplicate USART- and USBSerial static buffers. Allocate them on heap if needed.
- Stubs for __cxa_atexit and __cxa_finalize. Frees around 1.5k
avtolstoy and others added 22 commits Jun 6, 2017
Merge pull request #1343 from spark/fix/disable_iwdg
Fix endless IWDG reset loop
Moves part1 size optimizations into a separate mbedtls_communication.…
…inc file which gets compiled as part of communication library. Helps to avoid linking issues when recompiling without 'clean'
Reverted conditional in dtls_message_channel.cpp due to a0e736367cee6…
…7b0654f75c17f67846ed0bb1d9d. _gettimeofday in system-part1 should use millis() from system-part2
Photon/P1: wpa minor fixes
- wpa supplicant should not be canceled from an ISR.
- implemented tls_host_malloc/tls_host_calloc/tls_host_free to easier debug WICED crypto allocations
Update Supplicant_BESL.a:
- Wake tls_agent, peap and supplicant threads to cancel the connection attempt faster
- Declare tls_host_malloc/tls_host_callc/tls_host_free as weak functions
…to reduce stack usage during cloud handshake

@technobly technobly force-pushed the feature/photon/wiced-3.7.0-7 branch from 688fbde to afd6d6f Jun 14, 2017

Copy link

left a comment

💯 super feature!!!

@technobly technobly merged commit ad64959 into develop Jun 14, 2017

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/travis-ci/push The Travis CI build is in progress

This comment has been minimized.

Copy link

commented Jun 16, 2017

I have tried the wiced branch because of the new FreeRTOS features.
I found a TCPServer issue with enabled system thread which I suspect to be related: #1344

@technobly technobly deleted the feature/photon/wiced-3.7.0-7 branch Mar 14, 2018


This comment has been minimized.

Copy link

commented on 596f738 Aug 30, 2018

    int readChar(Reader& reader, char *c) {
        uint8_t tmp = 0;
        int result =, 1);
        if (result >= 0) {
                *c = tmp;

        return result;

If result is 0, read back 0 byte or 1 byte?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
6 participants
You can’t perform that action at this time.