Here we can all chat about fixing the AT+ command structure and the associated responses.
User avatar
By infrared
#51449 Within 2 months of receiving my first shipment of Arduino supplies, I had my solar power logging system sending performance data to my file server (not web server). I decided to use my RPi2 to grab serial out from the nano ( and append new data every minute to the log file. To keep this short, I'll eliminate all the details here. Obviously, I hated wasting the Pi on this simple task so I decided the ESP8266 was the perfect replacement. After researching the abilities of the ESP8266, I have failed to find a way that it could replace the Pi.

From my limited exposure to these new tech toys, I assume there needs to be something like the following, whether implemented in AT+ commands, Basic, Arduino IDE or LUA. This is far from complete or even logically sound, just brainstorming. It's quite possible this enhancement requires far more resources than the ESP8266 can afford. I'm presently testing my RPi-Zero as a Pi-2 replacement, and working fine.

Access network shares:

AT+CIPSMBINIT=0,"SeagateNAS" //close all open files in sharename and remove share
AT+CIPSMBINIT=1,"SeagateNAS:solar.log","","username:password" //map network share name SeagateNAS. Can access other files in share w/o init.
AT+CIPSMBINIT=1,"MyPiZero:20160719.log","","root:dietpi" //map to named share MyPiZERO, file:20160719.log
AT+CIPSMBINIT=? //share status response, all mapped shares: similar to AT+CWSTAT + file access status
AT+CIPSMBINIT=?,"SeagateNAS" //SeagateNAS share status response

AT+CIPSMBSEND=0,"SeagateNAS:solar.log" //delete file if existing
AT+CIPSMBSEND=1,"SeagateNAS:solar.log",TextString //delete file if existing, write TextString as first record in solar.log, close file.
AT+CIPSMBSEND=2,"SeagateNAS:solar.log",TextString //create new file if not existing and write TextString, or append to existing file, close.
AT+CIPSMBSEND=3,"SeagateNAS:solar.log",TextString //append TextString to existing file, close.
AT+CIPSMBSEND=4,"SeagateNAS:solar.log",TextString //append TextString to existing file, add CR, close
AT+CIPSMBSEND=B161,"SeagateNAS:solar.log",TextString //write TextString (or byte) starting at character position 161 in file, close
AT+CIPSMBSEND? //file status response:connecting,share does not exist,file does not exist,write error,OK

AT+CIPSMBGET=1,"MyPiZero:20160719.log",TextString //Retrieve first record (line) in 20160719.log, save pointer
AT+CIPSMBGET=2,"MyPiZero:20160719.log",TextString //Retrieve next record, save pointer
AT+CIPSMBGET=B161:240,"MyPiZero:20160719.log",TextString //Retrieve start byte 161 through ending byte 240 in file.
AT+CIPSMBGET=B1025:1281,"MyPiZero:ChrgCntrlr.log",TextString //Retrieve 256 bytes starting at position 1025 in another file in share.
AT+CIPSMBGET=? //file status response:connecting,share does not exist,file does not exist,read error,OK

1) Written TextString may contain only 1 CR.
2) Files are always closed after any access.
3) Once a share is initialized, other files in that share may be accessed.

Feasible or am I dreaming?

... Duane