Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By fastlink30
#39593 with this routine i print some info on serial, but when quit routine, get errors (as you can see on image attached)
the network object must be 'closed'? how is correct?

void inforeadCommand(void)
{
DynamicJsonBuffer jsonBuffer;

JsonObject& network = jsonBuffer.createObject();

network["HEAP"] = system_get_free_heap_size();
network["IP"] = WifiStation.getIP().toString().c_str();
network["MASK"] = WifiStation.getNetworkMask().toString().c_str();
network["GWAY"] = WifiStation.getNetworkGateway().toString().c_str();
network["DHCP"] = WifiStation.isEnabledDHCP();
network["SSID"] = WifiStation.getSSID().c_str();
network["PASS"] = WifiStation.getPassword().c_str();
network["UDP"] = UDP_PORT_SERIALE;
network["CHAN"] = wifi_get_channel();
network["CHIP_ID"] = system_get_chip_id();
network["SDK"] = system_get_sdk_version();
network["VDD"] = system_get_vdd33();
network["CPU_FREQ"] = system_get_cpu_freq();
network["HOSTNAME"] = wifi_station_get_hostname();

Serial.printf("%s\r\n",network.toJsonString().c_str());
}

another think, how to calculate vdd from the int returned from system_get_vdd33()?
thanks
You do not have the required permissions to view the files attached to this post.