Code Monkey home page Code Monkey logo

sminghub / sming Goto Github PK

View Code? Open in Web Editor NEW
1.5K 110.0 349.0 96.1 MB

Sming - powerful open source framework simplifying the creation of embedded C++ applications.

Home Page: https://sming.readthedocs.io

License: GNU Lesser General Public License v3.0

C++ 55.38% HTML 6.16% Shell 0.58% C 27.38% Processing 1.15% Objective-C 0.09% CSS 0.59% Perl 0.04% JavaScript 0.54% Makefile 3.28% Assembly 0.15% Python 4.20% XSLT 0.04% Dockerfile 0.04% Batchfile 0.23% CMake 0.07% Awk 0.02% PowerShell 0.05% Euphoria 0.01%
esp8266 espressif iot wifi embedded sming ssl-support arduino async rboot

sming's Introduction

Sming

Sming is an asynchronous embedded C++ framework with superb performance and multiple network features. Sming is open source, modular and supports multiple architectures including ESP8266, ESP32 and RP2040.

Examples

Gitter (chat) Backers Sponsors Download Build Codacy Badge Coverity Badge

If you like Sming, give it a star, or fork it and contribute!

GitHub stars GitHub forks

Getting Started

Sming supports multiple architectures and has a plethora of features. Choose the architecture of your choice to install the needed development software.

You can also try Sming without installing anything locally. We have an interactive tutorial that can be run directly from your browser.

Documentation

The purpose of Sming is to simplify the creation of embedded applications. The documentation will help you get started in no time.

Releases

Stable

  • Sming V5.1.0 - great new features, performance and stability improvements.

Development

To follow the latest development you will need to clone our develop branch:

git clone https://github.com/SmingHub/Sming.git

Examples

The examples are a great way to learn the API and brush up your C++ knowledge. Once you have completed the installation of the development tools, you can get the latest source code:

git clone https://github.com/SmingHub/Sming.git

And check some of the examples:

Basic Blink

Blinking is something like the "Hello World" example for the embedded world. You can check it using the commands below:

cd Sming/samples
cd Basic_Blink
make # -- compiles the application
make flash # -- tries to upload the application to your ESP8266 device.

More information at Sample Projects page.

Simple GPIO Input/Output

#define LED_PIN 2 // GPIO2
...
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH);

For a complete example take a look at the Basic_Blink sample.

Start Serial Communication

Serial.begin(9600);
Serial.println("Hello Sming! Let's do smart things.");

Connect to WiFi

WifiStation.enable(true);
WifiStation.config("LOCAL-NETWORK", "123456789087"); // Put your SSID and password here

Read DHT22 sensor

#include <Libraries/DHTesp/DHTesp.h> // This is just a popular Arduino library!

#define DHT_PIN 0 // GPIO0
DHTesp dht;

void init()
{
  dht.setup(DHT_PIN, DHTesp::DHT22);

  float h = dht.getHumidity();
  float t = dht.getTemperature();
}

Take a look at the code of the Humidity_DHT22 sample.

HTTP Client

HttpClient thingSpeak;
...
thingSpeak.downloadString("http://api.thingspeak.com/update?key=XXXXXXX&field1=" + String(sensorValue), onDataSent);

void onDataSent(HttpClient& client, bool successful)
{
  if (successful) {
    Serial.println("Successful!");
  }
  else {
    Serial.println("Failed");
  }
}

For more examples take a look at the HttpClient, HttpClient_Instapush and HttpClient_ThingSpeak samples.

OTA Application Update

void doUpgrade()
{
  // need a clean object, otherwise if run before and failed will not run again
  if(otaUpdater) {
      delete otaUpdater;
  }
  otaUpdater = new Ota::Network::HttpUpgrader();

  // select rom partition to flash
  auto part = ota.getNextBootPartition();

  // The content located on ROM_0_URL will be stored to the new partition
  otaUpdater->addItem(ROM_0_URL, part);

  // and/or set a callback (called on failure or success without switching requested)
  otaUpdater->setCallback(upgradeCallback);

  // start update
  otaUpdater->start();
}

For a complete example take a look at the Basic_Ota sample.

HTTP Server

server.listen(80);
server.paths.set("/", onIndex);
server.paths.set("/hello", onHello);
server.paths.setDefault(onFile);

Serial.println("=== WEB SERVER STARTED ===");
Serial.println(WifiStation.getIP());

...

void onIndex(HttpRequest &request, HttpResponse &response)
{
  TemplateFileStream *tmpl = new TemplateFileStream("index.html");
  auto &vars = tmpl->variables();
  vars["counter"] = String(counter);
  vars["IP"] = WifiStation.getIP().toString();
  vars["MAC"] = WifiStation.getMAC();
  response.sendTemplate(tmpl);
}

void onFile(HttpRequest &request, HttpResponse &response)
{
  String file = request.getPath();
  if (file[0] == '/')
    file = file.substring(1);

  response.setCache(86400, true);
  response.sendFile(file);
}

For more examples take a look at the HttpServer_ConfigNetwork, HttpServer_Bootstrap, HttpServer_WebSockets and HttpServer_AJAX samples.

Email Client

SmtpClient emailClient;

emailClient.connect(Url("smtp://user:[email protected]"));

MailMessage* mail = new MailMessage();
mail->from = "developers@sming";
mail->to = "iot-developers@world";
mail->subject = "Greetings from Sming";
mail->setBody("Hello");

FileStream* file= new FileStream("image.png");
mail->addAttachment(file);

emailClient.onMessageSent(onMailSent);
emailClient.send(mail);

...

int onMailSent(SmtpClient& client, int code, char* status)
{
    MailMessage* mail = client.getCurrentMessage();

    ...

    if(!client.countPending()) {
        client.quit();
    }

    return 0;
}

See the SmtpClient sample for details.

Live Debugging

Applications based on Sming Framework that are flashed and running on an ESP8266 device can be debugged using interactive debuggers. In order to debug an application it has to be re-compiled with the ENABLE_GDB=1 directive. And then flashed on the device. As shown below:

cd $SMING_HOME/../samples/LiveDebug
make clean
make ENABLE_GDB=1
make flashapp # <-- this will update only the application firmware.

Once the debuggable application is flashed on the device the developers have to run GDB. The easiest way to run the command-line GDB is to execute the following command:

make gdb

Developers using Eclipse CDT can have debugging sessions like the one below: Debugging Session in Eclipse CDT

See LiveDebug sample for details.

Contribute

You can contribute to Sming by:

  • Providing Pull Requests with new features, bug fixes, new ideas, etc. See Contributing for details.
  • Testing our latest source code and reporting issues.
  • Supporting us financially to acquire hardware for testing and implementing or out of gratitude

Financial contributions

We welcome financial contributions in full transparency on our open collective page. They help us improve the project and the community around it. If you would like to support us you can become a backer or a sponsor.

In addition to that anyone who is helping this project can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.

Backers and sponsors

Thank you to all the people who have backed Sming backer

or sponsored it.

sponsor

sming's People

Contributors

adiea avatar aemseemann avatar alonewolfx2 avatar anakod avatar automationd avatar avr39-ripe avatar danielnilsson9 avatar dmarkey avatar dseliskar avatar festlv avatar flexiti avatar frankdownunder avatar harry-boe avatar hreintke avatar johndoe8967 avatar kmihaylov avatar matzz avatar mikee47 avatar nik-sharky avatar patrickjahns avatar pief avatar piperpilot avatar raburton avatar riban-bw avatar slaff avatar slav-at-attachix avatar tavalin avatar tius2000 avatar zendes avatar zgoda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sming's Issues

Separate make & make install for libsming

make command should (re)build libsming, while make install should put libsming to SMING_HOME directory.
This is required for compatability with binary distributions in the future.

Mqtt client is Not stable

Hi
I am flash project name "MqttClient_Hello", and before flash I've been editing
From
procTimer.initializeMs(20 * 1000, publishMessage).start(); // every 20 seconds
To
procTimer.initializeMs(2 * 1000, publishMessage).start(); // every 2 seconds

I noticed that the action publish run stable 1 minutes then stopped.
If I edit the publish every 5 seconds then run stable for 3 minutes then stopped, next 3 minutes then ESP8266 reboot.

I think there are problem in memory, as the video below:
https://www.youtube.com/watch?v=srWKOh7IR7U

Is there a way to run most stable MQTT ?
Thanks.

IPAddress String usage

I am working on my TelnetServer implementation and one of my debugf statements is :

bool TelnetServer::telnetReceive (TcpClient& client, char *data, int size)
{
    debugf("TelnetServer callback : %s, %d bytes \r\n",client.getRemoteIp().toString().c_str(),size );

When compiling the sming framework with this I get the error :

Wiring/IPAddress.h:26:7: error: forward declaration of 'class String'
 class String;
       ^

Updating in IPAdress.h :

//class String;
#include "WString.h"

I can compile without errors.
Do you expect that this update will not influence other use of IPAddress of should I look for another solution.

ets_vsnprintf

Anakod,
In your microc lib I see references to :

int ets_vsprintf(char *str, const char *format, va_list argptr);
int ets_vsnprintf(char *buffer, size_t sizeOfBuffer, const char *format, va_list argptr);

But if I use these functions directly in my sming environment I get the linker error :

 undefined reference to `ets_vsprintf(char*, char const*, __va_list_tag)

Do you know where this functions are located ? Do I need to include another library ?

fileSetContent cannot close file.

I had this issue with last commit but i had before. i lokked in this function and it seems code fine but it cant close file. i dont know why.

DateTime library

Any chance having the comple arduino time library included so we could have the ability to keep track of time, it uses millis() to update time, and then we can sync agains maybe NTP every now and then.

The DateTime library that is included does not help us keep track of time.

https://github.com/PaulStoffregen/Time

Api documentation required

We need to have a clear documentation on sming methods, to see what's available and how it is supposed to work.

MEM CHECK FAIL!!!: After flashing most of the examples

I know a lot of people have this, let's investigate this please and bring serial output to order.

;ld��|�$�|�$�c|ǃ��{�c�b��og�l'o���#x�${l{$8�o��$b'�|��$�c��g'�lćd`�g�lo;���g��lx�o�;�����#g�|d�l�#��ng��d`�g$�d`gs�ۓn��``�g��#�gd���'o��lx�n�{�����d��cg�|쏇p�c��'o�d�$`��dgs�ۓo#l$`;��gc$l ��ՁMEM CHECK FAIL!!!

Errors on compiling with standard and latest Windows SDK and Sming ... ?

My Windows SDK (standard unofficial) is working fine on my other projects (cf ESP-MQTT).

I downloaded your Ming examples and imported them but when I compile the simple blink or any other example, I get the following errors 👍

15:12:28 **** Build of configuration Default for project Basic_Blink ****
mingw32-make.exe -f C:/Users/Xavier/Documents/GitHub/Sming/Basic_Blink/Makefile all
C+ ../Sming/system/stringconversion.cpp
In file included from c:/Espressif/ESP8266_SDK/include/user_interface.h:11:0,
from ../Sming/system/include/esp_systemapi.h:10,
from include/user_config.h:29,
from ../Sming/system/stringconversion.cpp:1:
c:/Espressif/ESP8266_SDK/include/lwip/ip_addr.h:213:23: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F,
^
c:/Espressif/ESP8266_SDK/include/lwip/ip_addr.h:213:31: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F,
^
c:/Espressif/ESP8266_SDK/include/lwip/ip_addr.h:213:40: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F,
^
c:/Espressif/ESP8266_SDK/include/lwip/ip_addr.h:213:49: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F,
^
cc1plus.exe: all warnings being treated as errors
C:/Users/Xavier/Documents/GitHub/Sming/Basic_Blink/Makefile:330: recipe for target 'out/build/../Sming/system/stringconversion.o' failed
mingw32-make.exe: *** [out/build/../Sming/system/stringconversion.o] Error 1

15:12:29 Build Finished (took 485ms)

Did I miss something ? Does anything special need to be done to integrate your environment into Windows SDK ?

Thanks.

Timer very unprecise and unpredictable

Hi,
I tested the Basic_Blink example and compared the output against the Blink example from the Arduino IDE port (version from 7.May). Both examples toggle PIN2 every 500 ms. You can see output below.

The Arduino Blink looks like this. Signal looks as expected.
arduino blink

Now look at the Sming output. Totally weird.
sming blink

I also tried the pull request from hreintke, who updated Timer to use delegates.
Same result.

Any suggestions ?

Regards

Problems with generating spiff files to flash (in example HttpServer_Websockets)

  1. using CHERTS Unofficial Development Kit for Windows (v2.06), but ESP SDK 1.01b1, the make script can't find 'spiffy' to process content in /files. I found spiffy.exe in the NodeLua project, and moved it to various places, including the HttpServer_Websockets directory, but the make file never seemed to find it.

I found that if I commented out line 415 'spiffy;' in C:\Espressif\sming\Sming\Makefile-project.mk, manually ran spiffy.exe in the project folder to build spiff_rom.bin, then ran make all or make rebuild again, make would find and move the manually-generated spiff_rom.bin to the out/firmware dir.

  1. after flashing (a known-good ESP-01) with the compiled bins, the running server can't find the files that should have been in the uploaded spiff_rom.bin. I did open spiff_rom.bin in an editor, and confirmed that contained the expected files... but of course I don't know if spiffy.exe is doing the right thing.

Thanks.

Makefile needs to have debug mode

We need makefiles to have a debug flag that will add debug functionality to the firmware

  • _mcount.as
  • Potentionally cloud debugger
  • Anything else

Problem Build !

😡❓


01:21:39 **** Build of configuration Sming for project LED_WS2812-LAST ****
make all
Building file: ../app/application.cpp
Invoking: GCC C++ Compiler
g++ -I"c:\tools\Sming\Sming" -I"c:\tools\Sming\Sming/system/include" -I"c:\tools\Sming\Sming/Libraries" -I"c:\Espressif/sdk/include" -O2 -g -Wall -c -fmessage-length=0 -MMD -MP -MF"app/application.d" -MT"app/application.d" -o "app/application.o" "../app/application.cpp"
../app/application.cpp:1:25: fatal error: user_config.h: No such file or directory
#include <user_config.h>
^
compilation terminated.
make: *** [app/application.o] Error 1


Thx in advance 💤

HTTPServer_WebSockets example not building

Cannot build Websockets example, getting following error.

LD out/build/app.out
out/build/app_app.a(application.o):(.text._Z14startWebServerv+0x38): undefined reference to HttpServer::setWebSocketBinaryHandler(Delegate<void (WebSocket&, unsigned char*, unsigned int)>)' out/build/app_app.a(application.o): In functionDelegate':
/opt/Sming/Sming/SmingCore/Delegate.h:96: undefined reference to `HttpServer::setWebSocketBinaryHandler(Delegate<void (WebSocket&, unsigned char*, unsigned int)>)'
collect2: error: ld returned 1 exit status
make: * [out/build/app.out] Error 1

Any ideas?

OTA Update Problem

I'm trying to utilize the new OTA feature of Sming and I've wired up my application to listen for an MQTT topic (e.g. /home/garage/large/cmd) for a command to initiate the OTA. It receives the command which includes two files to update: eagle.flash.bin and eagle.irom0text.bin. The JSON formatted command looks as follows:

{
    "cmd": "sw_update",
    "args": [
        {
            "offset": 0,
            "url": "http://192.168.0.113:8000/eagle.flash.bin"
        },
        {
            "offset": 36864,
            "url": "http://192.168.0.113:8000/eagle.irom0text.bin"
        }
    ]
}

The offsets are in decimal but convert to 0x0 => eagle.flash.bin, 0x9000 => eagle.irom0text.bin. Anyway, the software contacts my webserver and successfully downloads the two files just fine. The thing I noticed, however, is that it appears to only flash one of the files/segments instead of both. I'm a little confused looking at HttpFirmwareUpdate::applyUpdate(). It seems like it only flashes a single item. Anyway, after writing to flash it re-boots and just sits there - dead to the world. Perhaps by looking at the included trace you can provide me with some idea of what might be going on or perhaps how I can trouble-shoot this. Any insight into the expected theory of operation would be very helpful as well. Are there limitations which I should be aware of? It seems that it reflashes the same flash region where the code is currently executing out of which seems a little suspect - especially (as I understand it), the ESP8266 does execute in-place from flash by loading chunks of code into an in-memory (SRAM) cache.

Here's the trace:

> MQTT status: MQTT_MSG_PUBLISH (len: 299)
22: 272

/home/garage/large/cmd:
        {
             "cmd": "sw_update",
                                    "args": [
                                                     {
                                                                  "offset": 0,
                                                                                          "url": "http://192.168.0.113:8000/eagle.flash.bin"
                                                                                                                                                    },
                                                                                                                                                              {
                                                                                                                                                                           "offset": 36864,
                            "url": "http://192.168.0.113:8000/eagle.irom0text.bin"
                                                                                          }
                                                                                               ]
                                                                                                }
+TCP connection
sect_first: 40, sect_last: 7c

Software update started successfully
TCP received: 299 bytes
onReadyToSendData: 1
TCP connection send: 41 (41)
TcpClient request completed
onReadyToSendData: 3
onReadyToSendData: 3
onReadyToSendData: 3
onReadyToSendData: 3
TCP sent: 41
onReadyToSendData: 2
onReadyToSendData: 3
Download file:
    (0) http://192.168.0.113:8000/eagle.flash.bin -> 0x0
Download: http://192.168.0.113:8000/eagle.flash.bin
connect to: 192.168.0.113
TcpConnection::connect result:, 0
onReadyToSendData: 3
onReadyToSendData: 3
OnConnected
TCP connected
onReadyToSendData: 0
TCP connection send: 54 (54)
TcpClient request completed
TCP sent: 54
onReadyToSendData: 2
TCP received: 17 bytes
onReadyToSendData: 1
Header pos: 181
Date === Sun, 17 May 2015 17:47:01 GMT
Content-type === application/octet-stream
Content-Length === 32080
Last-Modified === Sun, 17 May 2015 16:41:50 GMT
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
onReadyToSendData: 3
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 145 bytes
onReadyToSendData: 1
TCP received: (null)
TCP connection closing
-TCP connection
jump: 4767
Download file:
    (1) http://192.168.0.113:8000/eagle.irom0text.bin -> 0x9000
Download: http://192.168.0.113:8000/eagle.irom0text.bin
+TCP connection
connect to: 192.168.0.113
TcpConnection::connect result:, 0
onReadyToSendData: 3
OnConnected
TCP connected
onReadyToSendData: 0
TCP connection send: 58 (58)
TcpClient request completed
TCP sent: 58
onReadyToSendData: 2
TCP received: 17 bytes
onReadyToSendData: 1
Header pos: 182
Date === Sun, 17 May 2015 17:47:02 GMT
Content-type === application/octet-stream
Content-Length === 217968
Last-Modified === Sun, 17 May 2015 16:41:50 GMT
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
onReadyToSendData: 3
onReadyToSendData: 3
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
onReadyToSendData: 3
onReadyToSendData: 3
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
onReadyToSendData: 3
onReadyToSendData: 3
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 1460 bytes
onReadyToSendData: 1
TCP received: 614 bytes
onReadyToSendData: 1
TCP received: (null)
TCP connection closing
-TCP connection

Firmware download finished!
         item: 0x0 0x40240000 32097 bytes
         item: 0x9000 0x40249000 217985 bytes
Firmware upgrade started
start write: 0x40000 -> 0x0 254849
write: 0x40000 -> 0x0 (sect: 0), 254849
write: 0x41000 -> 0x1000 (sect: 1), 250753
write: 0x42000 -> 0x2000 (sect: 2), 246657
write: 0x43000 -> 0x3000 (sect: 3), 242561
write: 0x44000 -> 0x4000 (sect: 4), 238465
write: 0x45000 -> 0x5000 (sect: 5), 234369
write: 0x46000 -> 0x6000 (sect: 6), 230273
write: 0x47000 -> 0x7000 (sect: 7), 226177
write: 0x48000 -> 0x8000 (sect: 8), 222081
write: 0x49000 -> 0x9000 (sect: 9), 217985
write: 0x4A000 -> 0xA000 (sect: 10), 213889
write: 0x4B000 -> 0xB000 (sect: 11), 209793
write: 0x4C000 -> 0xC000 (sect: 12), 205697
write: 0x4D000 -> 0xD000 (sect: 13), 201601
write: 0x4E000 -> 0xE000 (sect: 14), 197505
write: 0x4F000 -> 0xF000 (sect: 15), 193409
write: 0x50000 -> 0x10000 (sect: 16), 189313
write: 0x51000 -> 0x11000 (sect: 17), 185217
write: 0x52000 -> 0x12000 (sect: 18), 181121
write: 0x53000 -> 0x13000 (sect: 19), 177025
write: 0x54000 -> 0x14000 (sect: 20), 172929
write: 0x55000 -> 0x15000 (sect: 21), 168833
write: 0x56000 -> 0x16000 (sect: 22), 164737
write: 0x57000 -> 0x17000 (sect: 23), 160641
write: 0x58000 -> 0x18000 (sect: 24), 156545
write: 0x59000 -> 0x19000 (sect: 25), 152449
write: 0x5A000 -> 0x1A000 (sect: 26), 148353
write: 0x5B000 -> 0x1B000 (sect: 27), 144257
write: 0x5C000 -> 0x1C000 (sect: 28), 140161
write: 0x5D000 -> 0x1D000 (sect: 29), 136065
write: 0x5E000 -> 0x1E000 (sect: 30), 131969
write: 0x5F000 -> 0x1F000 (sect: 31), 127873
write: 0x60000 -> 0x20000 (sect: 32), 123777
write: 0x61000 -> 0x21000 (sect: 33), 119681
write: 0x62000 -> 0x22000 (sect: 34), 115585
write: 0x63000 -> 0x23000 (sect: 35), 111489
write: 0x64000 -> 0x24000 (sect: 36), 107393
write: 0x65000 -> 0x25000 (sect: 37), 103297
write: 0x66000 -> 0x26000 (sect: 38), 99201
write: 0x67000 -> 0x27000 (sect: 39), 95105
write: 0x68000 -> 0x28000 (sect: 40), 91009
write: 0x69000 -> 0x29000 (sect: 41), 86913
write: 0x6A000 -> 0x2A000 (sect: 42), 82817
write: 0x6B000 -> 0x2B000 (sect: 43), 78721
write: 0x6C000 -> 0x2C000 (sect: 44), 74625
write: 0x6D000 -> 0x2D000 (sect: 45), 70529
write: 0x6E000 -> 0x2E000 (sect: 46), 66433
write: 0x6F000 -> 0x2F000 (sect: 47), 62337
write: 0x70000 -> 0x30000 (sect: 48), 58241
write: 0x71000 -> 0x31000 (sect: 49), 54145
write: 0x72000 -> 0x32000 (sect: 50), 50049
write: 0x73000 -> 0x33000 (sect: 51), 45953
write: 0x74000 -> 0x34000 (sect: 52), 41857
write: 0x75000 -> 0x35000 (sect: 53), 37761
write: 0x76000 -> 0x36000 (sect: 54), 33665
write: 0x77000 -> 0x37000 (sect: 55), 29569
write: 0x78000 -> 0x38000 (sect: 56), 25473
write: 0x79000 -> 0x39000 (sect: 57), 21377
write: 0x7A000 -> 0x3A000 (sect: 58), 17281
write: 0x7B000 -> 0x3B000 (sect: 59), 13185
write: 0x7C000 -> 0x3C000 (sect: 60), 9089
write: 0x7D000 -> 0x3D000 (sect: 61), 4993
write: 0x7E000 -> 0x3E000 (sect: 62), 897
Firmware upgrade finished

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

ets_main.c 

OneWire library x-pin impact

The OneWire library impacts pins other than the one pin selected.
Easy to reproduce on an ESP-12:

  • put a DS18B20 at pin GPIO12
  • put an LED + resistor at GPIO4 to GND
  • adjust the WORK_PIN define in the Temperature_DS1820 example to 12
  • flash and run the example

The LED at GPIO4 turns on when the OneWire library searches for devices and then turns off again.

Sming projects/examples should be separate from libsming

This will be beneficial for referencing other projects from other repositories, as well as will help making every example an actual project.

As a mere of transition to it we can use submodules that will point to github/anakod/Basic_Blink (or better - github.com/sming/Basic_Blink)

Clarification on background magic

Hi,

Thanks for this amazing project, a great push forward for the ESP8266 ecosystem.

However, I feel a little bit uncomfortable with how the Wifi stack and FTP server (for example) are handled.
On Arduino for ESP8266, the Wifi stack is handled at each end of the loop function, or at an explicit yield or delay call if the loop function takes too long.
An FTP server would be init'ed in the setup function and would be kept alive with kind of a FTP.loop function in the Arduino loop function. This is a behaviour I understand, because I explicitely control it.

This is where I am lost: there is no such loop function, therefore no kind of FTP.loop function. Would you then please clarify the way Swing works? Is Swing event based only, so a blocking function call would block the whole thing (wifi, servers)?

Thanks.

How to keep LED connected to between GPIO2 and GND while reboot

I have a basic problem.

I have flash project Blinky, After the flash, the LED blinks normally (LED connected to between GPIO2 and GND)

But When my ESP01 is restarted (I've removed GPIO0 from GND to switch to normal mode) then the problems: LED Not blink and always bright.

If I temporarily disconnect the LED circuit, the board will boot normally, and after reconnecting, my program works as desired (LED blinks normally).

Is there anything I can do to keep LED connected to between GPIO2 and GND while reboot ? (because of the fact the LED always connected between GND and GPIO2)

Can't compile with esp-open-sdk

Hi, I tried to compile it with esp-open-sdk and I get this error, can someone with different SDK confirm that error ?

ystrem@ubuntu:~/Sming/Basic_Blink$ make
C+ app/application.cpp
In file included from app/application.cpp:1:0:
include/user_config.h:26:40: fatal error: espinc/c_types_compatible.h: No such file or directory
  #include <espinc/c_types_compatible.h>
                                        ^
compilation terminated.
make: *** [out/build/app/application.o] Error 1

Ftp upload crashes after first file

Seeing a few odd things with the FTP code. Using the vanilla example you can upload one file successfully (small html). When you attempt to upload a second small file you get a 150 Connecting response and the next command will give you two consecutive 200 OK responses. I can't get it to upload more than 1 (sometimes 2 files before it starts doing this)

Steps to reproduce on an ESP-01 with 512k flash module
Pull the latest FTPServer example and supporting files
Update SSID and password
Compile
I do a flashinit and then a flash (I believe this Is necessary to clear any old fs remnants)
ESP comes up correctly
Using windows 8.1 built in FTP
Open IPAddress
authenticate with me, 123
lcd to a directory with some static HTML files
set binary mode
put file1.ext - it works you get a connected followed by a Transfer Started followed by a transfer speed summary
put file2.txt - You immediately get a Transfer completed followed by a 200 OK
FTP is hosed at this point and you can't even do a dir, if you exit out and back in you will find the second file is a zero length.

Cut and paste from terminal window
ftp> open 192.168.0.20
Connected to 192.168.0.20.
220 Welcome to Sming FTP
User (192.168.0.20:(none)): me
331 OK
Password:
230 OK
ftp> lcd c:\temp\tinyweb
Local directory now C:\temp\tinyweb.
ftp> binary
250 OK
ftp> put index.html
200 OK
150 Connecting
250 Transfer started
ftp: 2866 bytes sent in 0.08Seconds 36.74Kbytes/sec.
ftp> put api.html
226 Transfer completed
200 OK
ftp> put api.html
150 Connecting
ftp> put api.html
200 OK
200 OK

Makefile-windows.mk problem

I had problem with default makefile for windows on these lines:

GEN_APPBIN   := PATH="$(ESP_HOME)/xtensa-lx106-elf/bin:$(PATH)" && $(SDK_TOOLS)/gen_appbin.exe
GEN_FLASHBIN := PATH="$(ESP_HOME)/xtensa-lx106-elf/bin:$(PATH)" && $(SDK_TOOLS)/gen_flashbin.exe

Because PATH on window contain space and also : is not right path delimiter on windows.
So I completely removed :$(PATH) part and it now works correctly

So it now looks like

GEN_APPBIN   := PATH="$(ESP_HOME)/xtensa-lx106-elf/bin" && $(SDK_TOOLS)/gen_appbin.exe
GEN_FLASHBIN := PATH="$(ESP_HOME)/xtensa-lx106-elf/bin" && $(SDK_TOOLS)/gen_flashbin.exe

PWM unstable/flickering

When driving a LED with PWM it flickers. This is probably caused by timing issues in the PWM implementation which cause a varying duty cycle. The lower the duty cycle is set the more drastic will be the flickering.

Minimum sample to reproduce the problem:

#include <user_config.h>
#include <SmingCore/SmingCore.h>

void init()
{
        analogWrite(2, 50);
}

LED connected between GPIO2 and GND.

choco install sming -y failed

I followed the instructions for installing sming using chocolatey. All went well until this command:
choco install sming -y

It failed with this error. The log basically contains the same error.

Get-BinRoot is going to be deprecated by v1. Many packages no longer require it
since the folders no longer have versions on them.
Installing / updading required mingw packages
Exception calling "Start" with "1" argument(s): "The system cannot find the fil
e specified"
At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.p
s1:76 char:3

  • $s = [System.Diagnostics.Process]::Start($psi)
  • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  • FullyQualifiedErrorId : Win32Exception
    You cannot call a method on a null-valued expression.
    At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.p
    s1:81 char:3
  • $s.StandardError.ReadToEnd() | Out-File $errorFile
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : InvokeMethodOnNull
    You cannot call a method on a null-valued expression.
    At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.p
    s1:82 char:3
  • $s.WaitForExit()
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : InvokeMethodOnNull
    Get-Content : Cannot find path 'C:\Users\hwiguna\AppData\Local\Temp\chocolatey
    -error.stream' because it does not exist
    .
    At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.p
    s1:88 char:21
  •   $innerError = Get-Content $errorFile | Out-String
    
  •                 ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\Users\hwigun...y-error.strea
      m:String) [Get-Content], ItemNotFoundEx
      ception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCon
      tentCommand
      [ERROR] Running C:\tools\mingw64\bin\mingw-get.exe with install mingw32-base --
      reinstall --recursive was not
      successful. Exit code was '' Error Message: .
      At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.p
      s1:92 char:5
  • throw $errorMessage
    
  • ~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: ([ERROR] Running...rror Message
      : .:String) [], RuntimeException
    • FullyQualifiedErrorId : [ERROR] Running C:\tools\mingw64\bin\mingw-get.ex
      e with install mingw32-base --reinstall
      --recursive was not successful. Exit code was '' Error Message: .
      The install of sming was NOT successful.
      Error while running 'C:\ProgramData\chocolatey\lib\sming\tools\chocolateyInstall
      .ps1'.
      See log for details.

Autodiscover: mDNS classes

Sming is a great framework for ESP8266 and is becoming my number one choice for development. What I am missing though are classes that can help the auto-discovery and zero configuration. As a start the possibility to create mDNS client would be great. This way the devices can discover and communicate easier with one another.

Example: New ESP device is connected to my local network. In the network there is a MQTT server and mDNS server that broadcasts the ip and port of the MQTT server. ESP reads the mDNS information about the MQTT server and connects directly without the need for extra configuration from a human.

I looked a bit and may be the code from this project https://github.com/sandeepmistry/esp8266-Arduino/tree/master/esp8266com/esp8266/libraries/ESP8266mDNS can be used as a start.

Compilation issues with SDK 1.1

During compilation with the latest version of the esp-open-sdk (https://github.com/pfalcon/esp-open-sdk/) using Espressif SDK 1.1 I got the following error:

C+ SmingCore/Digital.cpp
SmingCore/Digital.cpp: In function 'void pullup(uint16_t)':
SmingCore/Digital.cpp:78:43: error: 'PIN_PULLDWN_DIS' was not declared in this scope
  PIN_PULLDWN_DIS((EspDigitalPins[pin].mux));
                                           ^
SmingCore/Digital.cpp: In function 'void pulldown(uint16_t)':
SmingCore/Digital.cpp:86:42: error: 'PIN_PULLDWN_EN' was not declared in this scope
  PIN_PULLDWN_EN((EspDigitalPins[pin].mux));
                                          ^
SmingCore/Digital.cpp: In function 'void noPullup(uint16_t)':
SmingCore/Digital.cpp:92:43: error: 'PIN_PULLDWN_DIS' was not declared in this scope
  PIN_PULLDWN_DIS((EspDigitalPins[pin].mux));
                                           ^
make: *** [out/build/SmingCore/Digital.o] Error 1

Issues with windows install

Hi,
First of all, thank you for such great project and all the hard work on it.
I just tried to install in a win32 win7 environment following the nice Wiki Windows-Quickstart but I found several issues with the install.

  1. Just installing with the recommended full install, but it looks like didn't install the Unofficial Development Kit.
    I went ahead and installed manually (latest version) and then installed examples with choco .. but none of the projects build with the same errors as in #86.

Tried to update using choco and got the message "sming v1.0.5.20150507 is the latest version available based on your source(s)"
Obviously this is not the latest version.
How to proceed?

I tried to uninstall using choco to make a clean install, but it seems to leave 1G orphan files and eclipse, etc so there is no uninstall available I guess.

Any advice on how to get latest version running?

Thank you

Help: callback after response sent

Hi,
is there a way to use a callback after the response has been sent?
i.e. so that the list can be deleted?

Thanks.

Vector list;

void onSendList(HttpRequest &request, HttpResponse &response)
{
debugf("onSendList\r\n");

 JsonObjectStream* stream = new JsonObjectStream();
 JsonObject& json = stream->getRoot();

 json["count"] = list.count() / 2;

 for (int i = 0; i < list.count(); i += 2)
 {
    json[list[i + 0].c_str()] = list[i + 1].c_str();
 }

 response.sendJsonObject(stream);  

}

SSD1306 bootloop

Hi, I'm testing SSD1306 example and I get this error. Display starts shows the Adafruit logo then the white circle and then reboot. I'm using ESP12.

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x40100000, len 21280, room 16 
tail 0
chksum 0x95
load 0x3ffe8000, len 2352, room 8 
tail 8
chksum 0x53
load 0x3ffe8930, len 3736, room 0 
tail 8
chksum 0xc9
csum 0xc9
system param error
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
f�������������������������������������l`��l
                                           ���������l��ll��l
                                                            ��








                                                              l��








                                                                 l��








                                                                    l�







                                                                      l�







                                                                        l`�rlfs.start: size:272 Kb, offset:40238000

m

Display start

How to Reconnect mmqt ?

Hi.
I have problem: how to ESP8266 reconnect to MQTT broker when MQTT broker server downtime and startup again.
Thanks.

Be able to define extra libraries per application/project.

We can have an application that is using the smarconfig library, for example. In order to use the existing Makefiles it would be great if we can define something like EXTRA_LIBS per application/project in the project/Makefile-user.mk.

Add ability to write initial web pages to eeprom

When I create a web server (like Mateo example) I want to be able to also put my initial pages into eeprom so that my code would find it.

Currently you have to burn firmware
connect using ftp
load files
reboot - not sure about this step

I would like to be able to do this in one step, so that I load my firmware and then with another action (simple no need for loading ftp and such) load my files.
(currently mateo sample connects to known url and downloads the files from there).

virtualWire library from arduino

Compatible with standard Arduino libraries - use any popular hardware in few lines of code

i saw this line on readme and i am very exciting. how can i use this library? can you ad this library on your project?

WS2812 after 6 changes reboot

Hi, I'm testing the WS2812 example and after 6 changes of color I got reboot. I have ESP12 and using 1metr long LED strip. On Arduino Uno it's ok, so the strip is OK.

UDP support

Hi
This is more of a feature request than a issue per say.
I was just wondering if/whan UDP code is going to be added.
(Need it for a project I'm about to start on).
Keep up the good work
Kind regards
Jimmy

Feature-Request: HTTPS support in HttpClient

It looks like the HttpClient supports only http.

bool HttpClient::startDownload(URL uri, HttpClientMode mode, HttpClientCompletedCallback onCompleted)
{
    //...
    if (uri.Protocol != "http") return false;

It would be very helpful to have also HTTPS support.

Timer issue, large interval

Hi

Think i found an issue with the timers. Setting a long interval causes issues, for example 10 minutes, 10 * 60 * 1000 = 600000ms. Its not related to overflow, but that would happen if setting a longer interval than 71 minutes in the way the Timer class is implemented, intervalUs = intervalMs * 1000 should cause overflow in the uint32 if intervalMs > approx 71 minutes.

Anyway thats not the issue here:
If setting timer interval repeating 10 minutes the callback will be called twice in a row every approx 340 seconds, which is strange. Even if doing it manually with the ets_timer functions the same issue persist in Sming. Also the callback function gets called right away when using large interval, that doesn't happen otherwise.

BUT: if not using Sming framework (only using ESP SDK) and doing it with ets_timer functions there is no issue at all, callback called every 600 seconds as expected. (Same SDK version used)

Have been looking but cannot find the cause, using the exact same ets_timer code without using Sming works, but when using Sming it doesn't.

Any ideas? Seems like a tricky one... :(

OTA firmware flashing

I would like to add this feature request to be able to update firmware from an http source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.