Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12620 Discussions

Webser, dynamic output on HTML-Page

Altera_Forum
Honored Contributor II
1,132 Views

Dear Users and Developers,  

 

i am new to the forum and it really took me a long to get here, since i wanted to solve my problem on my own. But i need some help with the Webserver example. 

 

Well, right now I'm using the DSP Development Kit Stratix II / Nios II Edition with the uClinux and the Niche TCP/IP-Stack. 

Quartus II 8.1. 

 

So far i managed to build a basic hardware-design and i wrote some lines of code to control my peripherals and make calculations. It all works fine. 

I started the TCP/IP-Stack and the Webserver Example. 

 

Now .. how do i get my data displayed on a HTML-Page? 

I can use a webinterface to control my board but how can i shoot up my calculated values in ..maybe a text-area or some sort of form. 

How?  

 

My first idea was to write some script, like writing a cgi-application..but is this even supported? 

I really could not figure out the problem how i pass on my values, stored in a c-Variable, to somewhere else which is not "c".  

 

I would really appreciate your help and ideas. :eek: 

 

Regards, chris
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
414 Views

What is so difficult in my question??

0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Hello, 

this is quite simple (but also a lot of coding work!). 

At first you have to place a javascript on your web-site (within the html), wich makes a post request to your webserver. 

Within this post request you can transmit data from your Browser to the webserver. And the webserver can answer this request with either an resource (html-page just like a get-request) or with a string where you can place data from your "C-World". The Browser can handle this reply-string and put the contents into a text-box etc. 

If you are still interested in this i can send you a simple example. The magic word for google / wikipedia is "Ajax". 

Best regards...:rolleyes:
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Hi guys and girls, 

 

has anyone please a link to a simple and lightweight AJAX implementation? 

 

I wish to implement a web interface for setting up and updating (Catchwords: HTML file transfer with progress bar) my custom cycloneIV/Nios2 board. 

Preferred languages are C/C++ on server side and a *lightweight* implementation on client side in HTML/Javascript. 

 

Many thanks in advance 

guinea
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Take a look at any of Altera's board update portal applications. They all (AFAIK) make use of a simple AJAJ (JSON rather than XML...easier to understand/parse IMHO) progress bar. In this case, the code updates the progress bar during uploads of new FPGA/SW "images" to the flash on the development kit. 

 

Regards, 

 

slacker
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

hi slacker, 

 

thx for the info. 

 

greetings
0 Kudos
Reply