View previous topic :: View next topic |
Author |
Message |
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Fri Mar 10, 2006 12:09 pm Post subject: Easy tcp/ip twi problems |
|
|
I just tried for the first time my easy tcp/ip twi board and i cant see a web page from the web server (webserver.bas sample).
I can ping the web server with my pc while he is running).
I tried ping.bas and i can ping my pc.
Any idea ? thank you |
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Fri Mar 10, 2006 1:08 pm Post subject: |
|
|
i use an atmega8, could it be a problem? i think no since i cant ping my pc with the board...
When i do a request on 192.168.1.25 or 192.168.1.25/index.htm (config of the webserver, on port 80) i can see the orange light blinking...
In the hyperterminal i can see :
Code: | init w3100A
CLOSED
Listening on socket : 0 |
it never change, even when i ping or do a request.
EDIT : when i try http://192.168.1.25:6969/ (6969 is the good port, i tried some different port 1000,80,6969...)it says that the server takes too much time to answer. it should means that i can connect the server ? still nothing more in the terminal anyway... |
|
Back to top |
|
|
Frankeman
Joined: 11 Aug 2004 Posts: 948 Location: the Netherlands
|
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Sat Mar 11, 2006 12:30 am Post subject: |
|
|
already tried and same result |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Mar 11, 2006 10:14 am Post subject: |
|
|
Hi,
You need to make sure the EEP file is also programmed !
This file is programmed into the EEPROM space. _________________ Mark |
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Sat Mar 11, 2006 10:45 am Post subject: |
|
|
what the h*** is that EEP file ?? tell me more |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sun Mar 12, 2006 11:36 am Post subject: |
|
|
The webserver sample demonstrates various methods to send data.
Look at the line :
Tempw = Tcpwrite(i , Eeprom , Woffset , Wsize) ' write data
Here the EEPROM is used as a data source. What means that some of the web pages are stored in EEPROM.
BASCOM uses the EEP file extion for this. The EEP is just a binary image.
BASCOM can program this file. Some programmers only understand HEX. For this reason BASCOM also has an option $EEPROMHEX in case you generate the files from bascom data lines.
The EEP file was generated with a simple html editor. There are tools such as BIN2HEX that can convert binary files into Intel HEX files.
I advise to set the fusebit of the micro so the EEPROM does not get erased once it is programmed.
Another option is to change the program and to send data from the flash memory or dynamic generated.
For this case, a conversion from bin to hex would be needed when AVR tools can not read the EEP file. _________________ Mark |
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sun Mar 12, 2006 2:53 pm Post subject: |
|
|
Hi,
I read various things. ABout TWI, webserver.bas, port 6969. A lot is not clear to me. I am not part of the 4400 so i need to determine what is working and what not.
Hereis what you need to do :
- read the Easy TCP manual
- read the Easy TCP TWI manual
- perform the test programs. Use Tools, Easy TCP/IP to perform the TCP and UDP tests.
- Since you use TWI, you need to use the samples from the TWI subdir.
The webserver sample is named webserver_TWI.bas
In general, when you can PING the port, the configuration wend well.
But there are firewalls in routers, PC's that can block a port.
Make sure that these ports are enabled, or disconnect the PC from the internet and enable all fire walls. MAKE SURE there is no internet connection while disabling the firewalls !!!
In general it is a bad idea anyway to leave a development connected to the internet all the time.
The line :
I = Getsocket(0 , Sock_stream , 5000 , 0)
Listen on PORT 5000. So you probably modified the code sample?
Maybe you changed more. It is best to test the samples as provided without mods.
So to get data from this webserver you need to use http://IP:5000/index.htm
you should see data from the browser when you try to look at a page.
the browser send a lot of info.
I think that your problem is the wrong port or firewall. _________________ Mark |
|
Back to top |
|
|
zolsi
Joined: 24 Jan 2006 Posts: 51
|
Posted: Sun Mar 12, 2006 4:02 pm Post subject: |
|
|
Ok it works .
The problems was : the port in the tcp init line is not the port you have to connect to get the wab page.
So its :5000 by default
Thank you mark ! |
|
Back to top |
|
|
|