These are chat archives for SmingHub/Sming

Mar 2016
Mar 18 2016 07:55

Does anyone know how to set server and user for the mqtt client at runtime, in the example it is done in the constructor at compile time, but I would like to do it with values from appsettings.h

@linlun That is relatively straightforward: As a global variable in your application you declare a pointer to MqttClient

MqttClient *mqtt;

and then inside the function that you want to initialize the mqtt client object you write

void someFunction() {
       // .. here you read the config 
       mqtt = new MqttClient(<settings1...>);

See this code example:

Mar 18 2016 14:55
@avr39-ripe :
Have the lwip compile running now. Can go into deeper investigation.
Alexander V. Ribchansky
Mar 18 2016 14:56
@hreintke good news! and how you start compiling lwip? I try type "make" in rtos_sdk subdir and it just say that target "force" is done already... :(
any magic Makefile??
Mar 18 2016 15:01

Took some time to find as my makefile knowledge is minimal. I hacked in the makefiles :
in makefile from sdk directory :

    AR = C:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar
    CC = C:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
    NM = C:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-nm
    CPP = C:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++
    OBJCOPY = C:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-objcopy
    OBJDUMP = C:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-objdump

In makefile from third_party

TARGET = eagle
#FLAVOR = release
FLAVOR = debug



then make in the sdk dir

Alexander V. Ribchansky
Mar 18 2016 15:01
@hreintke oh, thanks fo sharing.. will look on it at the evening..
Mar 18 2016 17:07
@slaff Tnx, works great
Curtis Pope
Mar 18 2016 19:01
@teicors I'm seeing a behavior where when you connect to a wifi network, it loses its connection to the AP. Even if you re-connect to the AP, it seems that DHCP isn't enabled and it doesn't get an IP. This just spins with a spinner as the user never gets feedback that the connection was successful.
Mar 18 2016 19:21
@piperpilot you're right. I was focused on the log and not to the (in my case) the phone. The esp connect the new ssid and he takes the new ip while the phone is spinning.
Now I can ping the esp with the address of my wifi while on my phone still remain the animation.