Here we can all chat about fixing the AT+ command structure and the associated responses.

User avatar
By picstart1
#2061 I repeated everything with the GPIO 00 pin at run time in a float condition but got the same results

Musings
I'm beginning to suspect that flasher.exe is very imperfect......it allows the entry of the start location ex 0x40000..but it may have the imperfection of completely ignoring the address selected
and load everything at 0x00000 regardless...certainly the output suggests that this is happening when the 0x4000 bin is being used.
Since esp8266 is fairly new and the early coders are somewhat undisciplined as they try to throw things at the esp8266 and hope they stick mostly because that is the only option given the lack of documentation and that the little documentation available is either out of date or just plain wrong. Eventually correct documentation and provable working code is the only thing that will survive as the wiki process lets robust information trump sketchy and doubtful information. For now everything should be suspected of being imperfect.
I'll try and install python so I can run your python flasher script... though it would be nice to have things evolve into a single flasher for all bins to remove dependencies between flashing and bins.
It is a bit optimistic but evolving to a single set of AT+ commands for the esp8266..variations in dialects that accomplish the exact same thing can be burdensome.
Lazarus has many developers, however there is a testing and consensus process that dictates what's in an official release.
Smoothieware's 3D printing code is perfected by just one or two ( often just one developer) dictating the release after input from select testers.
Maybe this board could be the gate keeper ( via links) to robust firmware software and documentation...Expressif is attempting to bring stability to some of this but so far it has been imperfect

Android apps get star ratings perhaps documentation ,firmware SDK software could be rated by a growing group of members to this board.
User avatar
By saper_2
#2069
igrr wrote:You're welcome! Thanks for trying it out.

Ughh.. now I feel bad because I didn't tried your fw :/ (for now I looking for latest official fw (binaries fully working)...)
igrr wrote:I would actually appreciate if you file those suggestions as issues against my github repo, otherwise i might forget ;)

No problem
igrr wrote:It is possible to set static IP on STA interface, but not with Espressif's API which i'm using right now. If I rewrite the tcp/udp commands on top of lwIP, this will certainly be possible. But i can't give an estimate when this will happen.

I thought so, espressif completely forgot about it (or don't give a ....) - as for me DHCPserver is unwanted feature, I prefer setting up everything manually (including IPs too)...
igrr wrote:Filtering is certainly possible for TCP (though TCP server does not yet work in my firmware), just ignore connections coming from unwanted IPs.
For UDP there's probably an additional command that has to be introduced, like +CIPUDPFILTER="ip address" or something like that.

That could be nice feature but, I was thinking in direction to adding a field to +IPD notification from ESP, e.g.:
Code: Select all+IPD,<channel>,<length>,<client_mac>,<client_ip>

Client MAC and IP in hexadecimal strings (MAC - 12 characters = 6 bytes ; IP - 8 characters - 4 bytes/octets) - this way there is needed less buffer space for "automatically received" info that there is data. Converting hex string byte (2chars) to binary byte take around 40bytes in gcc for avr (for me :) ) - actually parsing pre-formatted MAC (xx:xx:xx:xx:xx:xx)/IP(xxx.xxx.xxx.xxx) will take more space :) .
So, I have been thinking about scenario for receiving data:
We get notification from ESP:
Code: Select all+IPD,<ch>,<len>,<mac>,<ip><cr|lf>

If we want to get all received data, we call:
AT+IPD - this will return data from all channels buffers (I never tried multiple connections so I do not know if there are multiple buffers for data),
or we can call:
AT+IPD=[channel] - to get data from one buffer, or:
AT+IPD=255 - to flush all buffers :) , or we can even flush single buffer with this:
AT+IPD=[channel],1 - optional extra param for flushing specific channel buffer.
Returned data on request could have format that same as in stock fw:
Code: Select all+IPD,<channel>,<len>:<data><cr><lf>

igrr wrote:GSN command prints serial number returned by system_get_chip_id function from the SDK. Comparing my serial with MAC address (returned by +CIPSTAMAC? command) I believe MAC is also generated from this serial number.

I was just curious if SN is a MAC of chip (so I can get mac form it) but if you have already implemented cmd for getting chip mac that's great.

I just pushed (first time in life :lol:) to github a small app for testing comm with ESP8266, works under win+.net4 : https://github.com/saper-2/udp-tcp-sender

[Edit: fixed some typos]
User avatar
By igrr
#2093 I have updated the commands description to include the TCP/UDP commands implemented so far.
saper_2 wrote:
Code: Select all+IPD,<channel>,<length>,<client_mac>,<client_ip>


Client info retrieval can not be implemented currently for UDP contexts (on top of espconn api). Have to switch to lwip to do get remote info. I think I will first implement MQTT on top of lwip and then rewrite the TCP/UDP part using the acquired knowledge :roll:.

saper_2 wrote:AT+IPD=[channel] - to get data from one buffer, or:
AT+IPD=[channel],1 - optional extra param for flushing specific channel buffer.

This is called +CIPRD (Read Data) in my firmware. Will add something like +CIPFD to flush data.

saper_2 wrote:
Code: Select all+IPD,<channel>,<len>:<data><cr><lf>


This is non-standard, parameters in the extended syntax result code should follow the colon.
Except for not printing the received data, this is how my +CIPDR (as in Data Received) unsolicited result code works.
You are then welcome to issue a +CIPRD command to get the data itself (you may want to wait until there is enough to fill the buffer, for example).
User avatar
By saper_2
#2110
igrr wrote:I have updated the commands description to include the TCP/UDP commands implemented so far.

Now we know that this going to be best unofficial FW :)
igrr wrote:Client info retrieval can not be implemented currently for UDP contexts (on top of espconn api). Have to switch to lwip to do get remote info. I think I will first implement MQTT on top of lwip and then rewrite the TCP/UDP part using the acquired knowledge :roll:.

If you could add displaying info of "sender" would be "awesome" - I would vote for MAC because IP can by dynamic and if module is behind router/nat then reported IP will be router ip...
As for me UDP is not reliable, so I'm more interested in TCP. I only consider/use UDP when I have to use 8bit MCU to handle IP stack (e.g. Atmel AVR + ENC28J60 ).
MQTT -> http://en.wikipedia.org/wiki/MQTT, interesting - never too old to learn new term :)
igrr wrote:...
This is called +CIPRD (Read Data) in my firmware. Will add something like +CIPFD to flush data.

saper_2 wrote:
Code: Select all+IPD,<channel>,<len>:<data><cr><lf>


This is non-standard, parameters in the extended syntax result code should follow the colon.

I was just guessing how receiving could work. I've written this before You updated command set so "don't hit me, pretty please :)" ;)
igrr wrote:Except for not printing the received data, this is how my +CIPDR (as in Data Received) unsolicited result code works.
You are then welcome to issue a +CIPRD command to get the data itself (you may want to wait until there is enough to fill the buffer, for example).


I am not welcome, I will do. :lol: