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.

Sending data to browser in enet.io example

Hi guys;

I need to send an array to browser. I used enet.io example to create a web page. I have searched and found this (https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/475850 ) but i could not find any answer. I need to learn how to use ssi and cgi functions. Do you have any idea?

  • You will need to modify the webpage that is included in the "enet.io" example. Although the "enet.io" example uses SSI and CGI, you could choose to use other methods, if you think it can be done easily.

    I am not very knowledgeable on the other web technologies to comment which is the best way to go.

    Thanks,
    Sai
  • Hi Sai;

    I modified the wep page it is not problem. But I need to use java.ajax to communication between browser and microprocessor. What are the other methods except ssi and cgi? Also i pasted the part of javascript code below. In that line "req.open("GET", "/get_speed?id=" + Math.random(), true);" i could not find what is that get_speed and where is it changing in CCS?

    function speedGet()
    {
    var req = false;
    function speedReturned()
    {
    if(req.readyState == 4)
    {
    if(req.status == 200)
    {
    document.getElementById("current_speed").innerHTML = "<div>" + req.responseText + "</div>";
    }
    }
    }

    if(window.XMLHttpRequest)
    {
    req = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    }
    if(req)
    {
    req.open("GET", "/get_speed?id=" + Math.random(), true);
    req.onreadystatechange = speedReturned;
    req.send(null);
    }
    }
  • i found the functions in io_fs.c. thank you so much