HALO GUYS
I'm trying to load a webpage from a EB-023-00-2 card controlled by a PIC16F877A
I'm using Flowcode V6. I tried in so many way but still doesn't work. I should load the page "/add.php?intru=2" on 10.65.225.104
Could you please help me ? Thanks.
EB023 sending GET request
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: EB023 sending GET request
Hi
I'm not sure from your comment if you are using the EB-023-00-2 card controlled by a PIC16F877A as a web page server,
or if you are using it as a client to GET a page from another server?
Have you looked at some of our examples, such as the WiKi ...
http://www.matrixtsl.com/wiki/index.php ... tion_Guide
It would help if you could you post your Flowcode file?
I'm not sure from your comment if you are using the EB-023-00-2 card controlled by a PIC16F877A as a web page server,
or if you are using it as a client to GET a page from another server?
Have you looked at some of our examples, such as the WiKi ...
http://www.matrixtsl.com/wiki/index.php ... tion_Guide
It would help if you could you post your Flowcode file?
Re: EB023 sending GET request
Hello LeighM,
Basically what i want to achieve is to get the EB023002 Card to load the "/add.php?intru=2" page hosted on an external server,
that page is so that it adds a line too the Index page of the server, saying there has been a break in on the alarm system.
For the files, i just messed around with the TCP/IP component so I won't bother posting it.
Hopefully you can help me, thanks, Lawliet.
Basically what i want to achieve is to get the EB023002 Card to load the "/add.php?intru=2" page hosted on an external server,
that page is so that it adds a line too the Index page of the server, saying there has been a break in on the alarm system.
For the files, i just messed around with the TCP/IP component so I won't bother posting it.
Hopefully you can help me, thanks, Lawliet.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: EB023 sending GET request
Setup your TCP/IP component properties (local IP, MAC, Gateway etc)
Call CreateTCPSocket macro to create the local socket,
then call TCPConnect macro with the remote IP and Port
use TxSendByte to put your request string into the send buffer (i.e. "GET /add.php?intru=2 HTTP/1.0\r\n\r\n")
call TxEnd to send the data to the remote server
Use RxDataAvailable macro to test for the reply, call that in a loop with delay and timeout,
if it returns non-zero then use RxReadByte to get the reply.
You can use GetSocketStatus macro to test for the socket status
Finally close the link with TCPClose
Hope that helps
Leigh
Call CreateTCPSocket macro to create the local socket,
then call TCPConnect macro with the remote IP and Port
use TxSendByte to put your request string into the send buffer (i.e. "GET /add.php?intru=2 HTTP/1.0\r\n\r\n")
call TxEnd to send the data to the remote server
Use RxDataAvailable macro to test for the reply, call that in a loop with delay and timeout,
if it returns non-zero then use RxReadByte to get the reply.
You can use GetSocketStatus macro to test for the socket status
Finally close the link with TCPClose
Hope that helps
Leigh
Re: EB023 sending GET request

This is what i did and it still doesn't work, first, i can't use TxSendByte because i don't send a octet.
Anyway i tried with TxSendString, no success.
What's wrong with my Flowcode ?
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: EB023 sending GET request
Check your server socket details in TCPConnect(), most HTTP servers run on port 80, so Hi=0, Lo=80.
It might be worth testing the retval after TCPConnect() to check that the connection has been successful.
The GET request needs terminating with CR/LF (twice as I recall), so you need to add TxSendByte(13) and (10)
Also, after TxEnd it is best to wait for the reply, before closing the socket.
Do you have a display attached to your project?
It would help you to put the return values from the macros onto the display.
It might be worth testing the retval after TCPConnect() to check that the connection has been successful.
The GET request needs terminating with CR/LF (twice as I recall), so you need to add TxSendByte(13) and (10)
Also, after TxEnd it is best to wait for the reply, before closing the socket.
Do you have a display attached to your project?
It would help you to put the return values from the macros onto the display.
Re: EB023
I work with ECIO 40 and E023 (ENC28J60), when i try to create the hex file,with flocode 6, there is a trouble.
The message is:
Ping0ECIO4.c(124): error: total number of array elements can not exceed 0x100 (use -idx 2 compiler command line argument to remove this restriction)
...
How to procede ?
The message is:
Ping0ECIO4.c(124): error: total number of array elements can not exceed 0x100 (use -idx 2 compiler command line argument to remove this restriction)
...
How to procede ?
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: EB023 sending GET request
You need to reduce the size of the buffers/arrays to < 256 bytes.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis