Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By ozayturay
#14362 WifiStation.getMAC() returns 11 characters instead of 12.

Code: Select allSerial.println("WiFi Connected");
Serial.println("SSID: " + String(WIFI_SSID));
Serial.println("IP: " + WifiStation.getIP().toString());
Serial.println("MAC: " +  WifiStation.getMAC());
Serial.println();


WiFi Connected
SSID: GMRK
IP: 192.168.2.53
MAC: 18fe349ea45
User avatar
By anakod
#14417 I have started new project :)
https://github.com/anakod/esp_microc

Now Sming completely rebased to this library for simplification and memory usage optimisation.

WifiStation.getMAC() returns 11 characters instead of 12.

I think I miss leading zero. Please try again afer update!

I think Sming Framework and Arduino ESP8266 teams should join forces. What works in one doesn't work in the other. This way we could progress faster. ;)

As I wrote, I'm always open to any cooperation.
User avatar
By anakod
#14419
hreintke wrote:I've finally got a first try on tcpserver running.


I have update your code, but doesn't check it yet. Please look, it should work correctly. For server creation use this new constructor:
https://github.com/anakod/Sming/blob/ma ... rver.h#L17
User avatar
By hreintke
#14452 anakod,
I am using it with this callback code:
Code: Select allbool clReceive (TcpClient& client, char *data, int size)
{
   debugf("TcpSever callback : %s, %d bytes \r\n",client.getRemoteIp().toString().c_str(),size );
   debugf("Data : %s", data);
}

TcpServer tserver(clReceive);
TcpServer tserver2(clReceive);

Basicly it works, but after closing/reinitiating the connection sometimes I get reset of the esp.
Not sure yet what is causing this but will check further.
Herman