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++

Problem about LAN

Altera_Forum
Honored Contributor II
1,353 Views

HI all, 

i write a Web Server with NIOS and i need a documentation about the model Client/Server in NIOS. Can i help me? Do you use Berkeley's Socket? 

Thanks a lot, 

Gianluca
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
602 Views

I suggest you read chapter 8 of the Nios II Software Developers Handbook. 

 

The answer to your question is that if you use LWIP and MicroC/OS-II you can just use sockets. You should probably look at the web server example which comes with the kit.
0 Kudos
Altera_Forum
Honored Contributor II
602 Views

I' ve to use Lwip on nios2, but without MicroC/OS-II, i cannot use socket api? 

Do I have to use raw api? Where can i find an example of a tcp server similar to the one 

in chapter 8 of the Nios II Software Developers Handbook? 

 

Thank a lot, 

Michele
0 Kudos
Altera_Forum
Honored Contributor II
602 Views

If you can't use MicroC/OS-II and you wish to use LWIP you have to use the raw API. All the documentation there is can be found in the directory altera\kits\nios2\components\altera_lwip\UCOSII\src\downloads\lwip-1.1.0\doc\rawapi.txt. That said you'll need to modify the code to work standalone, http://www.niosforum.com/forum/index.php?a...t=st&f=16&t=949 (http://www.niosforum.com/forum/index.php?act=st&f=16&t=949) may be a good starting point. 

 

Or you could look at eCos which contains an IP stack and has a sockets API.
0 Kudos
Altera_Forum
Honored Contributor II
602 Views

Thank you for answer me. 

 

I can't use any OS, i' ve just seen rawapi.txt 

but I&#39;ve some difficulties with prototypes... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif  

and so I&#39;m searching for some example to study. 

 

I&#39;ve seen the "Lwip_web_server" example, 

it&#39; s an http server, but I need only a simple tcp server. 

 

Thank you for help.
0 Kudos
Altera_Forum
Honored Contributor II
602 Views

 

--- Quote Start ---  

originally posted by gohan1977@Jul 5 2005, 04:03 AM 

hi all, 

i write a web server with nios and i need a documentation about the model client/server in nios. can i help me? do you use berkeley&#39;s socket? 

thanks a lot, 

gianluca 

--- Quote End ---  

 

There is a standalone port of LWIP with a sample echo server & HTTP server . 

If you cannot use an OS, you will need to use rawapi , so the functions need to be implemented as callbacks, i have an example i can forward. 

 

 

Send me an email to ppk03100 at utdallas dot edu and i will forward it  

 

regards 

Pavan http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif  

 

FYI: I got that port of this grp though its no longer available here.
0 Kudos
Reply