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

SYSTEM_THREAD(ENABLED) breaks TCPServer (develop branch) #1344

tlangmo opened this issue Jun 16, 2017 · 1 comment


Copy link

commented Jun 16, 2017

Bug Report

When using the system thread with SYSTEM_THREAD(ENABLED) the TCPServer does not receive connections.

I suspect it related to the recently incorporated WICED branch.

Expected Behavior

TCPServer should return connected TCPClient objects on TCPServer::available() whenever a TCP connection is opened.

Observed Behavior

With SYSTEM_THREAD(ENABLED) no TCPClients objects are created. Wireshark shows that not even SYN packets are acknowledged. Without system thread it works fine.

I also noticed that sometime the WIFI connection does not get established in the first place when with SYSTEM_THREAD(ENABLED). It flashed green rapidly, so I guess it does not obtain the DHCP address...

Steps to Reproduce

Compile with the following env variables. II tried also MODULAR=n, but the issue remains
Once the software runs, use telnet <IP> to open a tcp connection on port 23

export PATH=$PATH:~/arm_install/gcc-arm-none-eabi-5_3-2016q1/bin
export DEBUG_BUILD=n
export PLATFORM=photon
export USE_SWD_JTAG=n
export MODULAR=y
export APPDIR=~/dev/photon-simple

Test App - This app opens a TCPServer on port 23

#include "application.h"
#include "stdarg.h"


#if Wiring_WiFi

USBSerial1LogHandler logHandler(LOG_LEVEL_INFO);

// When enabled the TCPServer does not work anymore

TCPServer telnet(23);
/* This function is called once at start up ----------------------------------*/
void setup()
    WiFi.setCredentials("SSID", "PASSPHRASE");
    while (WiFi.localIP() == IPAddress()) {

/* This function loops forever --------------------------------------------*/
void loop()
	TCPClient client = telnet.available();
	if (client.connected()) {

@tlangmo tlangmo referenced this issue Jun 16, 2017
5 of 6 tasks complete

@technobly technobly added this to the 0.7.0 milestone Jun 16, 2017


This comment has been minimized.

Copy link

commented Jun 16, 2017

Thanks @tlangmo we are aware of a bug in 0.7.0-rc.1 with SYSTEM_THREAD(ENABLED) that we will fix in 0.7.0-rc.2.

@avtolstoy avtolstoy referenced this issue Jun 20, 2017
6 of 6 tasks complete

@technobly technobly closed this Mar 14, 2018

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