WiFi Communication with ESP8266
Moderator: Benj
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: WiFi Communication with ESP8266
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
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
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: WiFi Communication with ESP8266
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?
Does the same ESP8266 module work on dsPIC without the option and not on 8 bit PIC?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: WiFi Communication with ESP8266
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.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: WiFi Communication with ESP8266
Fixed version of the component.
- Attachments
-
- WLAN_ESP8266.fcpx
- (15.36 KiB) Downloaded 371 times
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: WiFi Communication with ESP8266
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?
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?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: WiFi Communication with ESP8266
I am indeed using those macros and I think only index "0" will be longer than 18 characters.
-
- Posts: 28
- Joined: Mon May 26, 2014 8:51 pm
- Has thanked: 4 times
- Contact:
Re: WiFi Communication with ESP8266
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
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
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: WiFi Communication with ESP8266
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...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
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: WiFi Communication with ESP8266
I really appreciate the effort but it still only shows 18 characters. Tried both versions of the component.
Is there a limitation elsewhere?
Is there a limitation elsewhere?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: WiFi Communication with ESP8266
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: WiFi Communication with ESP8266
There we go! Now it works!
No worries, I'm just happy to get it working. Thanks for all your help!
No worries, I'm just happy to get it working. Thanks for all your help!
-
- Posts: 28
- Joined: Mon May 26, 2014 8:51 pm
- Has thanked: 4 times
- Contact:
Re: WiFi Communication with ESP8266
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.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...
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: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
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.
It's not 100% complete but is fairly reliable.
- Attachments
-
- Test_Esp8266.msg.txt
- (4.35 KiB) Downloaded 341 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: WiFi Communication with ESP8266
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.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.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis