ENC28J60
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
ENC28J60
Hi
I am playing around with the ENC28j60 I have flashed the example to an Atmega 328p from the wiki page
I can Ping the module, view a web page but in the wiki example there are 3 pages I can only access one of them
the problem is that Read TCP document request is not returning the “/page1” string, whatever string I write after the IP/ it is only returning the string "GET"
DataPointer is = 54
is this a bug in the component?
Any help for this please?
I am playing around with the ENC28j60 I have flashed the example to an Atmega 328p from the wiki page
I can Ping the module, view a web page but in the wiki example there are 3 pages I can only access one of them
the problem is that Read TCP document request is not returning the “/page1” string, whatever string I write after the IP/ it is only returning the string "GET"
DataPointer is = 54
is this a bug in the component?
Any help for this please?
- Attachments
-
- ENC28J60_Example.fcfx
- (25.78 KiB) Downloaded 369 times
Last edited by Alan_37 on Mon Mar 11, 2019 2:38 pm, edited 2 times in total.
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
Re: ENC28J60 Bug
Hi
Am I doing something wrong or is a component bug?
Although I use flowcode V7 , the new Flowcode V8.1 might have the same bug!
Am I doing something wrong or is a component bug?
Although I use flowcode V7 , the new Flowcode V8.1 might have the same bug!
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: ENC28J60 Bug
Hi,
I think the problem could be that you are not moving the DataPointer after the ReadStringFromBuffer for the "GET" text.
So the next ReadStringFromBuffer expecting the "page1" text will just be returning the "GET" again.
I think the problem could be that you are not moving the DataPointer after the ReadStringFromBuffer for the "GET" text.
So the next ReadStringFromBuffer expecting the "page1" text will just be returning the "GET" again.
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
Re: ENC28J60 Bug
hi LeighM
Thanks for your reply, in the Wiki example the data pointer is being set in the GetTcpDataPointer component macro, I understand this can be set manually but it would require Wireshark to see the data.
I don't know where the data pointer has to be set to get the page1 string output.
What value should put in the data pointer variable?
Thanks
Thanks for your reply, in the Wiki example the data pointer is being set in the GetTcpDataPointer component macro, I understand this can be set manually but it would require Wireshark to see the data.
I don't know where the data pointer has to be set to get the page1 string output.
What value should put in the data pointer variable?
Thanks
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: ENC28J60 Bug
From the DataPointer the text buffer will contain something like "GET /index.html HTTP/1.1"
So you could either say read and compare with "GET /index"
or first compare the "GET" then move the DataPointer on 5 places and read and compare with "index", "page1", "page2" etc
So you could either say read and compare with "GET /index"
or first compare the "GET" then move the DataPointer on 5 places and read and compare with "index", "page1", "page2" etc
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
Re: ENC28J60
Hi LeighM
Yes, it worked just incremented +5 the data pointer that was it so there is no bug.
Just another weird thing I noticed the MCU stop responding if the 2 disabled macros are enabled
don't know why.
Thanks for your help
Yes, it worked just incremented +5 the data pointer that was it so there is no bug.
Just another weird thing I noticed the MCU stop responding if the 2 disabled macros are enabled
don't know why.
Thanks for your help
Last edited by Alan_37 on Mon Mar 11, 2019 4:14 pm, edited 1 time in total.
- Alan_37
- Posts: 179
- Joined: Sun May 01, 2016 8:36 pm
- Has thanked: 51 times
- Been thanked: 54 times
- Contact:
Re: ENC28J60
Hi LeighM
Just found it, it was the buffer size increased it from 255 to 500 and everything now works as it should
You may also want to update the wiki example file with the one attached below.
Thanks very much.
Just found it, it was the buffer size increased it from 255 to 500 and everything now works as it should
You may also want to update the wiki example file with the one attached below.
Thanks very much.
- Attachments
-
- ENC28J60_Example.fcfx
- (25.14 KiB) Downloaded 391 times
Re: ENC28J60
thank you Alan very mych and thank you to all persons for your help, i hace elevators , and i want to do it for rescue, if same one has been locked inside and elevator is far.
Re: ENC28J60
other question please, when i clock for page1 , web will be http://192.168.0.100/page1.htm, if i want to go back for have just 192.168..0.100, without page1.html, what i must do? thank you friends
- 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: ENC28J60
Hello,
The IP address http://192.168.0.100/ is basically just a link to the IP. If you leave the file blank then normally a default file is used usually with the name index.htm.
If you want to have a link to the file then you can simply have a piece of html like this.
The IP address http://192.168.0.100/ is basically just a link to the IP. If you leave the file blank then normally a default file is used usually with the name index.htm.
If you want to have a link to the file then you can simply have a piece of html like this.
Code: Select all
<a href="http://192.168.0.100/">Home</a>
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
Re: ENC28J60
Good morning everyone, sorry if I ask a lot, , I use ENC28j60 for an elevator, and I want an error to appear every time, it is recorded in the myphp database, the problem that I fear, that I do not put in the program flowcode, thank you very much friends
- 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: ENC28J60
Hello,
I'm guessing the MySQL database is running on a LAMP type server (Linux, Apache, MySQL, PHP).
I would setup a PHP page that logs data to the MySQL from parameters that are passed to the page.
You can then pass parameters to the page by using the URL and doing a page request using the ENC28J60 module.
GET 192.168.0.100/?Error=Error123&ErrorType=123&Flowcode=Good
Hope this helps. Let us know if I've got the wrong end of the stick.
I'm guessing the MySQL database is running on a LAMP type server (Linux, Apache, MySQL, PHP).
I would setup a PHP page that logs data to the MySQL from parameters that are passed to the page.
You can then pass parameters to the page by using the URL and doing a page request using the ENC28J60 module.
GET 192.168.0.100/?Error=Error123&ErrorType=123&Flowcode=Good
Hope this helps. Let us know if I've got the wrong end of the stick.
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
Re: ENC28J60
hi all friends., i have a question more , when i toush arduino push button, for example B0.i want to send email to me and go from http://192.168.0.100/page1.htm to 192.168.0.100. thank you very much
- 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: ENC28J60
Hello,
We are discussing how to send an email here and also discussing adding a component for v9 though the component might not be compatible with the ENC28J60 module at the moment.
https://www.flowcode.co.uk/forums/viewt ... 4829#p4829
We are discussing how to send an email here and also discussing adding a component for v9 though the component might not be compatible with the ENC28J60 module at the moment.
https://www.flowcode.co.uk/forums/viewt ... 4829#p4829
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