Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Web Server

Hello,

I'm using the uCLinux ported by Microtronix. I'm trying to use the web server but I can't see the initial page.

I use the open core ethernet. I built the filesystem as described in the linux quick start guide. I can use ftp and telnet but when I type the

IP in the web browser, I can't see the web page.

Can someone help me?

Thanks a lot,

Marco

19 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What direction were those packets in? If you could label every packet with its direction, that would be helpful.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Here is the summary of the Traffic. IP 192.168.1.233 is my PC and IP 192.168.1.239 is the uClinux board.

    Frame number 1 - 9 is the small index.html -> its ok

    Frame number 11 - 19 is the large index.html (index_old.html) -> not ok

    No. Time Source Destination Protocol Info

    1 0.000000 192.168.1.233 192.168.1.239 TCP 1059 > http [SYN] Seq=0 Ack=0 Win=64240 Len=0 MSS=1460

    2 0.004007 192.168.1.239 192.168.1.233 TCP http > 1059 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460

    3 0.004033 192.168.1.233 192.168.1.239 TCP 1059 > http [ACK] Seq=1 Ack=1 Win=64240 Len=0

    4 0.004553 192.168.1.233 192.168.1.239 HTTP GET /index.html HTTP/1.1

    5 0.005852 192.168.1.239 192.168.1.233 TCP http > 1059 [ACK] Seq=1 Ack=266 Win=6432 Len=0

    6 0.017285 192.168.1.239 192.168.1.233 HTTP HTTP/1.0 200 OK (text/html)

    7 0.153002 192.168.1.233 192.168.1.239 TCP 1059 > http [ACK] Seq=266 Ack=347 Win=63894 Len=0

    8 10.017317 192.168.1.239 192.168.1.233 TCP http > 1059 [FIN, ACK] Seq=347 Ack=266 Win=6432 Len=0

    9 10.017377 192.168.1.233 192.168.1.239 TCP 1059 > http [ACK] Seq=266 Ack=348 Win=63894 Len=0

    10 10.027148 192.168.1.233 192.168.1.239 TCP [TCP ZeroWindow] [TCP Dup ACK 9#1] 1059 > http [RST] Seq=266 Ack=348 Win=0 Len=0

    11 11.036714 192.168.1.233 192.168.1.239 TCP 1060 > http [SYN] Seq=0 Ack=0 Win=64240 Len=0 MSS=1460

    12 11.037430 192.168.1.239 192.168.1.233 TCP http > 1060 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460

    13 11.037454 192.168.1.233 192.168.1.239 TCP 1060 > http [ACK] Seq=1 Ack=1 Win=64240 Len=0

    14 11.037967 192.168.1.233 192.168.1.239 HTTP GET /index_old.html HTTP/1.1

    15 11.039311 192.168.1.239 192.168.1.233 TCP http > 1060 [ACK] Seq=1 Ack=338 Win=6432 Len=0

    16 11.050942 192.168.1.239 192.168.1.233 HTTP Continuation

    17 11.050983 192.168.1.233 192.168.1.239 TCP [TCP Dup ACK 13#1] 1060 > http [ACK] Seq=338 Ack=1 Win=64240 Len=0 SLE=2575009540 SRE=2575009617

    18 21.045938 192.168.1.239 192.168.1.233 TCP http > 1060 [FIN, ACK] Seq=1102 Ack=338 Win=6432 Len=0

    19 21.045984 192.168.1.233 192.168.1.239 TCP [TCP Dup ACK 13#2] 1060 > http [ACK] Seq=338 Ack=1 Win=64240 Len=0 SLE=2575009540 SRE=2575009618
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    So what do you get in response if you do:

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    telnet 192.168.1.239 80

    GET /index_old.html HTTP/1.1

    Host: 192.168.1.239[/b]

    --- Quote End ---

    (note the extra blank line at the end.)

    What does the server send back to you?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    do you mean

    telnet

    open 192.168.1.239 80 ?

    Then I have no response until the timeout is reached.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Can you use a unix box or telnet from cygwin under windows? I&#39;m not familiar with the toy tools that come with windows, and I don&#39;t think that windows telnet is powerful enough to do this sort of debugging.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have tested with telnet under linux. I created 2 testcases. Case 1 was a small website. In case 2, I added some characters to this website.

    result case 1:

    Marco@linux:~> telnet 192.168.1.239 80

    Trying 192.168.1.239...

    Connected to 192.168.1.239.

    Escape character is &#39;^]&#39;.

    GET / HTTP/1.1

    Host: 192.168.1.239

    HTTP/1.0 200 OK

    Date: Tue, 30 Nov 1999 00:03:35 GMT

    Server: Boa/0.93.15

    Connection: close

    Content-Type: text/html

    Content-Length: 525

    Last-Modified: Tue, 30 Nov 1999 00:52:25 GMT

    <html>

    <head><title>Microtronix uKit</title></head>

    <body bgcolor="white" text="black">

    <td>Hello html test xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td>

    <td>Hello html test xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td>

    <td>Hello html test xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td>

    <td>Hello html test xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td>

    <td>Hello html test xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td>

    <td>Hello xxxxxxxxxxxxxx</td>

    </body>

    </html>

    Connection closed by foreign host.

    Marco@linux:~>

    result case 2

    Marco@linux:~> telnet 192.168.1.239 80

    Trying 192.168.1.239...

    Connected to 192.168.1.239.

    Escape character is &#39;^]&#39;.

    GET / HTTP/1.1

    Host: 192.168.1.239

    Connection closed by foreign host.

    Marco@linux:~>
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ok, so we can see where it&#39;s failing, at least (at Boa&#39;s end, before it tries to do anything at all).

    Man it would be nice to strace boa to see what it&#39;s up to.

    Failing that, can you cat the file on the filesystem? I mean, just make sure that any old process can read it successfully.

    Also, can you try creating an html file of roughly the same size as old_index.html just to try to eliminate size as an issue?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I made some tests with filetransfer over ftp yesterday.

    I can transfer files with any filesize (small and large files) to the uCLinux board.

    but I couldn&#39;t download these files from uClinux board to the PC.

    I only could download files with size smaller than approximately 520bytes.

    That means files fitting in one ethernet packet.

    I think there is a problem with tx-buffering in the ethernet kernel driver.

    When I compile the kernel, I receive some warnings in open_eth.c.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    I solved my problem. I think the reason was the clock delay (phase) for the SDRAM.

    To solve the problem I changed the CPU clock in 2x Ozsillator clock (65.536MHz).

    The delay for the SDRAM clock is 170 degree.

    Now it runs on the Microtronix Cyclone 1C20 Developement board.