Page 4 of 5
Re: WiFi Communication with ESP8266
Posted: Mon Oct 27, 2014 6:53 am
by hyperion007
Thanks Kersing, will do as soon as I get home from work.
Could you tell me what is changed in that version of the component? And it needs to be the latest version with the \r\n option as the older version you modified for me didn't work for with 8-bit PIC, but did work with dsPIC. I'll still try it of course

Re: WiFi Communication with ESP8266
Posted: Mon Oct 27, 2014 8:03 am
by kersing
I fixed a reference to what I think is an unused variable in the current code. However, it is based on the older sources as I do not have the newest ones.
Does the same ESP8266 module work on dsPIC without the option and not on 8 bit PIC?
Re: WiFi Communication with ESP8266
Posted: Mon Oct 27, 2014 8:05 am
by hyperion007
Yes that's what struck me as being strange as well.
Re: WiFi Communication with ESP8266
Posted: Mon Oct 27, 2014 11:50 pm
by hyperion007
I've tried it now, it doesn't work. It won't even create the AP
Re: WiFi Communication with ESP8266
Posted: Tue Oct 28, 2014 12:32 pm
by hyperion007
So I guess we have to wait for Ben to have time to look at this. Hopefully soon as I need this function to complete a prototype that needs to be done in a hurry in order to get a contract for the final product.
Re: WiFi Communication with ESP8266
Posted: Tue Oct 28, 2014 9:24 pm
by kersing
Fixed version of the component.
Re: WiFi Communication with ESP8266
Posted: Tue Oct 28, 2014 9:24 pm
by hyperion007
And I can vouch for it working

Re: WiFi Communication with ESP8266
Posted: Thu Oct 30, 2014 11:09 am
by Benj
Hello,
Here is the component, Jac reported to me that he simply had to re-export the current source but that this broke the GUI for the component.
So here is the current version as used in the latest IoT blogs.
Re: WiFi Communication with ESP8266
Posted: Thu Oct 30, 2014 5:52 pm
by hyperion007
I have another problem now...
There seems to be a 18 character limit when sending string variables from the web form to the PIC.
I have set the string variable to [60] and [80] but still only 18 bytes are received.
Trying to send "123456789012345678901234567890" results in "123456789012345678" and 18=Length$(string_var)
How do I increase this?
Re: WiFi Communication with ESP8266
Posted: Thu Oct 30, 2014 6:10 pm
by Benj
Hello,
Are you using the SetOutValue and GetInValue macros? If so then which specific index receives the long string and I will try and extend it for you.
Otherwise can you post your program so I can see how your collecting the data.
Re: WiFi Communication with ESP8266
Posted: Thu Oct 30, 2014 6:12 pm
by hyperion007
I am indeed using those macros and I think only index "0" will be longer than 18 characters.
Re: WiFi Communication with ESP8266
Posted: Thu Oct 30, 2014 7:44 pm
by ahmedkhalid
Just tried the latest version of the component upload by ben and got this error while making hex file of it.
Error returned from [avr-gcc.exe]
Completed compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat reported error code 1
Re: WiFi Communication with ESP8266
Posted: Thu Oct 30, 2014 11:18 pm
by kersing
ahmedkhalid wrote:Just tried the latest version of the component upload by ben and got this error while making hex file of it.
Error returned from [avr-gcc.exe]
Completed compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat reported error code 1
Please post all output lines as these lines do not contain the information we need to help. (The output can be found in a .txt file starting with the project name located in the same folder your project is saved.) Adding your flowcode file to your post also helps...
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 10:16 am
by Benj
Hello,
Here is a version of the component with the in-coming buffer 0 set to a max of 60 characters. I should be able to allow this to be configurable in the component properties if it becomes a big problem.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 10:22 am
by hyperion007
Thanks! I'll put it to the test tonight.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 10:24 am
by Benj
Hello,
Thought I would go the extra mile while i'm in the source. Here is a version with adjustable length strings for in and out.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 4:33 pm
by hyperion007
I really appreciate the effort but it still only shows 18 characters. Tried both versions of the component.
Is there a limitation elsewhere?
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 5:43 pm
by Benj
Hello,
I've had another look and nothing obvious is jumping out at me.
Is it possible for you to post your program or something that demonstrates the problem. Might need to have a look through the C code to see if I can spot whatever is causing the limitation.
Otherwise could be that WIFI module is truncating the incoming URL request but this seems unlikely.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 5:46 pm
by hyperion007
I'll send you the program via PM right now.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 6:05 pm
by Benj
Cheers for that,
I think I've found the problem now. There was a intermediary string variable which collected the data as part of the CheckForPageRequests macro. I've now changed this so it populates the dynamic sized variables directly.
Fingers crossed this will fix the issue.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 6:06 pm
by hyperion007
Thanks, I'll try it at once

Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 6:10 pm
by Benj
Sorry found another issue now, there is also a fixed 18 character cap!!!
Anyway should be fixed now to cap the number of bytes at 1- the dynamic value to allow room for the null termination. Sorry to give you the run around.
Re: WiFi Communication with ESP8266
Posted: Fri Oct 31, 2014 6:20 pm
by hyperion007
There we go!

Now it works!
No worries, I'm just happy to get it working. Thanks for all your help!
Re: WiFi Communication with ESP8266
Posted: Sun Nov 02, 2014 8:08 pm
by ahmedkhalid
Kersing worte:
Please post all output lines as these lines do not contain the information we need to help. (The output can be found in a .txt file starting with the project name located in the same folder your project is saved.) Adding your flowcode file to your post also helps...
Here is the text file I just initalise the ESP8266 component and tried to make its hex file and got error. I am now using the most latest component version uploaded by benj i.e.
Benj wrote:Sorry found another issue now, there is also a fixed 18 character cap!!!
Anyway should be fixed now to cap the number of bytes at 1- the dynamic value to allow room for the null termination. Sorry to give you the run around.
WLAN_ESP8266.fcpx
Plus one more thing the only way I get rid of this error is by using the component version originally uploaded by benj...
Benj wrote:Hello,
Here is the progress so far...
Here is the component, need to be copied to the "C:\Program Files (x86)\Flowcode 6\components" directory before restarting Flowcode.
The attachment WLAN_ESP8266.fcpx is no longer available
It's not 100% complete but is fairly reliable.
Re: WiFi Communication with ESP8266
Posted: Sun Nov 02, 2014 11:47 pm
by kersing
ahmedkhalid wrote:Here is the text file I just initalise the ESP8266 component and tried to make its hex file and got error. I am now using the most latest component version uploaded by benj i.e.
You could try the component attached to
this forum post. That should get rid of the errors. Keep in mind it is based on an older source so extracting the parameters will not work. I expect Ben will post an updated component with all fixes in the near future.