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.

Making a simple web server with TMS570LS31x

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

Hi,

I am using TMS570LS31x and i want to make a simple web server. I also use LWIP 1.4.1 library to do this webserver. Did anyone work before about this topic? 

Regards.

  • Muhammet,

    Please have a look at the following WIKI page. A lot of information are available for using LwIP on TMS570.

  • First of all, thank you for your answer.
    I had a look at there many times before. I did every step like WIKI page. But now i want working codes for comparing my codes and finding my mistakes.
  • Have you installed the package that is provided at the bottom of the page in the download section?

    After installation, you will find in the installation directory a pre-build application for TMS570LS3137.

    The CCS project as well as Halcogen project are also provided as reference.

  • Hi Jean,

    I have done my simple web server. I want some file i-o operations with my hdk over ethernet cable. For example, when i open internet browser and connect my device, i want to get and post functions. Do you have any idea about it?

    Regards.
  • Can you describe a little more.I am not able to understand your exact requirements.Do you need some buttons on your webserver?

    Do you need some text boxes etc.? which you want to update dynamically?

    Let me know the exact requirements so that I can support you better.

    Regards

    Manoj

  • In my web server, i have 3 buttons which are GET, SET and LED ACTIVE. Also I have some text boxes for setting some values to my functions. I use this function to change and configure my ports number and so.

    Regards.
  • Attached please find the installer for active webserver demo.This demo supports ssh and cgi calls.

    This wiki article explains this project in more detail

     

    This installer is for RM57 and tms570lc43 launchpads. You can compare the lwip folder of your demo and this demo and make related changes to adapt to tms570ls31.You can use the CCS project as a reference and make changes to your ccs project.Let me know if this helps.

    7167.ActiveWebServerDemo-1.0.0-windows-installer.zip

  • Thank you for your helping. I just say something about my project.

    I succeed to set values correctly using httpd.c functions. This functions helped me to actived leds and getting ports number. Now, i need to give a message which is giving information about ports status like ' port numbers are updated'.

    Regards.
  • so you want to dynamically update the web page? Note that if you have field in a web page you cannot update it unless you send a GET request.
    Or there has to be auto refresh of the page or field on the webpage.which sends a GETrequest to update a particular field with new message.This is out of scope of this forum.
    Basically you need to change the java script running in the background of the webpage to send auto-refresh every few seconds so that the new message is got by sending a GET request.

    In the wiki article

    In the io control demo 1
    the text boxes USER LED state ON or OFF and the Current speed percentage are both updated from the code running on the development board


    If you can read the complete code you should be able to understand how the CGI and SSH calls work correctly.

    I am still note completely clear about your second part of the question.It will be helpful if you can describe it more clearly.
  • Hi Manoj,

    I have a problem about web server's login page. I want to add a secure login system for my webserver. What I basically want is that - when I enter the IP of the controller in the browser, it should prompt me for a username and a password. I want to make this system as secure as possible using the lwIP. The page as given below what i want.. I searched something about authorization in lwip library. But i could not find useful things.

    Do you have any idea about this topic?

    Regards.

  • Sorry that I cannot help you on this,

    we do not have much exposure for things related to authorization.The purpose of the demo was to showcase the capabilites.There are lot of other things which can be done but those are out of scope of this demo.

    One way which I think this can be handled is in the java script user enters the text boxes and u do the comparision and authorization using the java script(probably you access a server or database or store the data locally ) and once authorized you submit a get request for the next page to be loaded.

    Update us as you you succeed in handling this authorization.
  • Hi,

    I succeed to make authorization page. Now, i am trying to do security like when i close web page then open again, i want to get log in page. I tried clean my struct which has password and user ID. But i could not get log in page. My steps as given below,

    1- Connect device with device`s ip address.
    2- Some process which i need it.
    3- Click exit button to leave page (I created a exit button).
    4- Try to connect again device with device`s ip address. But i have never succeed yet. I want to see log in page in this step.

    In my code, i clear password and user Id when i clicked exit button.

    I am waiting your response.

    Regars.
  • Hello MUHAMMET,

    I want to add http authorization to my embedded web. Could you share how did you manage to do it?

    Thank you.