This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP432E401Y: ADDING WEB PAGES TO HTTP SERVER

Part Number: MSP432E401Y

Tool/software: Code Composer Studio

Hello,

I am trying to add web pages to http server as mentioned in the "NDK API Guide  - http://www.ti.com/lit/ug/spru524k/spru524k.pdf".

I have taken "tcpecho" example for implementation of this.

Though i am able to build it without any errors, i am not getting the web page upon entering the respective ip address.

I am getting the error like: " HTTP 404 File Not Found".

Below figures shows how i added the web pages:

In the "ndkStackThread" function i have added these web files instead of Network open & Close as shown below.

I have changed my RAW_PAGE_COUNT to 20 as well.

Can any one tell me where i missed out to execute properly.

Regards

Kalyan.

  • Hello Kalyan,

    Please refer the following post on this topic: 

    Thanks,

    Sai

  • Hello Sai,

    First of all Thank you for the response.

    I have some doubts, please clarify me:

    1. Can't we add the web files as i mentioned in the  earlier post's.

    2. In the post you have suggested, there is comments like

    So as mentioned above i have added .h file and .html file to the project and the below line in the "URLSimple_process."


    HTTPServer_sendSimpleResponse(ssock, returnCode, contentType,INDEX_SIZE, INDEX); 

    and replaced "if (strcmp(url, "/home.html") == 0)" with the "if (strcmp(url, "/index.html") == 0)"

    And i have replaced InitIP with

    but it didn't worked.

    So could you please suggest me  where should i make changes to make it work.

    Thanks & Regards

    Kalyan

  • Hello,

    I  got struck here.

    Please help me on this topic.

    Regards

    Kalyan.

  • Hello Kalyan,

    kalyan konidela said:

    but it didn't worked.

    So could you please suggest me  where should i make changes to make it work.

    Can you explain what did not work?

    You seem to be using static IP address and serving webpages at the same time. I would recommend to take one step at a time. For example modify the "tcpecho" example to use static IP address. Then add functionality as defined in the forum post I linked to. Doing too many changes at once will make it very hard to debug.

    Thanks,

    Sai

  • Hello sai,

    I started with that static ip addressing  in tcp echo example and it did worked well.

    After that i try to add some web pages to the particular ip address as posted earlier.

    So when i try to open the particular ip address, i am getting like: "HTTP 404 File Not Found".


    ------------------------------------------------------------------

    Can you explain what did not work?

    ------------------------------------------------------------------

    means when i open that address on chrome- i am not getting the Web  pages i have added.

    Thanks & regards

    Kalyan.

  • Hello Kalyan,

    So it looks like the HTTP Webpages are not being served by the MSP432E4.

    Can you put a breakpoint in the application and see if the execution is reaching at the expected section of code when the IP address is entered in the browser?

    Also it will be helpful to capture a wireshark log of the what the browser is transmitting and check if your application is handling the request.

    Thanks,

    Sai

**Attention** This is a public forum