Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
1,720 Views

Cyclone V Linux - Ethernet (TCP/IP) - Question

Hey guys! :) 

 

I've been really confused recently since I got the DE0-SoC board :P (I've worked with Nios and some Texas Instruments DSPs, but never with Linux). 

 

In the project I'm developing, I need a TCP/IP connection among the board and a PC. The PC will work as a client and the board will be responsible to send the data to the PC (we wanna monitor a multi-level converter).  

 

In a way I've been doing some low-level programming, when it comes to these networking and developing on linux I just can't figure out what I should do exactly. Thus my question is if I need to set something up like the TCP Sockets or something at the EMAC, or Linux does it all for me and I only need to set the MAC Address? Do I need also to use the SO's driver? If someone can point where I should go it will help me a lot. 

 

:confused::confused:
0 Kudos
6 Replies
Highlighted
Honored Contributor I
166 Views

Hi, I assume you are referring to the DE0-Nano-SoC board. If you boot the board using the SD image provided, it will boot into linux with Ethernet drivers all ready to go. 

 

Here's the link to the latest SD card image: 

https://rocketboards.org/foswiki/view/documentation/atlassocsdcardimage
0 Kudos
Highlighted
Honored Contributor I
166 Views

Hey! 

 

I've been reading a lot of stuff about the board and how to use linux. I also found an awesome tutorial (https://rocketboards.org/foswiki/view/documentation/ws1introtoalterasocdevices) with some interesting lab tutorials. Let's see if I can get everything to work =P Pretty excited about this board!  

 

Thanks for the reply though. Gonna check the SD image version!
0 Kudos
Highlighted
Honored Contributor I
166 Views

Hi,  

 

I wanted to know if you were able to implement it. I am just getting started and need to do something similar to you. If possible can you share some tips or anything on how you approached the problem?  

 

Maybe even the script you use to send files to PC, how do you establish the connection. Did you make the PC a static IP address?
0 Kudos
Highlighted
Honored Contributor I
166 Views

 

--- Quote Start ---  

Hi,  

 

I wanted to know if you were able to implement it. I am just getting started and need to do something similar to you. If possible can you share some tips or anything on how you approached the problem?  

 

Maybe even the script you use to send files to PC, how do you establish the connection. Did you make the PC a static IP address? 

--- Quote End ---  

 

 

Hey buddy. 

 

Wow, its been a long time... October 16th of 2016 I didn't know anything about Linux. Never worked with it... 

 

Nowadays I have a system that acquires data from a modular multilevel converter in the FPGA and sends to the ARM's SDRAM so I can transfer through TCP/IP to Matlab. 

 

First thing you need to know is how to establish a connection or how to connect to your board. 

 

You can configure PuTTy to connect through an FTP connection (there are plenty of tutorials on how to do this in the rocketboards forum). Also, you can set an static ip using connman (there are tutorials at the rocketboards forum and some other tutorials that approach the Beagle BB board from TI). You will want to do this if you wanna use TCP/IP (so your address will become static, which means Linux will startup with the address you did choose. Also if you wanna ssh the board (it is another style of communication that uses the OTG cable) you have to know the address of the board (the command you run in Linux is ssh root@board_ip - my case is ~ssh root@192.168.7.1~). 

 

Linux has all the drivers ready for you to use, so there is no need for you to deal with the low-level hardware. Everything is high-level and you can use linux on your desktop to compile all programs, and afterwards you can send to your device using ~scp "your_program_executable" root@192.168.7.1:/home/root~ (scp is a secure copy transfer through ssh I guess). 

 

Now if you have never worked with Linux, you will have to learn Linux networking, how to set up a server socket on the board so you can use networking communication and so on... 

 

https://rocketboards.org/ will be your best friend.
0 Kudos
Highlighted
Honored Contributor I
166 Views

 

--- Quote Start ---  

Hey buddy. 

 

First thing you need to know is how to establish a connection or how to connect to your board. 

 

You can configure PuTTy to connect through an FTP connection (there are plenty of tutorials on how to do this in the rocketboards forum). Also, you can set an static ip using connman (there are tutorials at the rocketboards forum and some other tutorials that approach the Beagle BB board from TI). You will want to do this if you wanna use TCP/IP (so your address will become static, which means Linux will startup with the address you did choose. Also if you wanna ssh the board (it is another style of communication that uses the OTG cable) you have to know the address of the board (the command you run in Linux is ssh root@board_ip - my case is ~ssh root@192.168.7.1~). 

 

 

--- Quote End ---  

 

 

Hi, 

 

I have met some problems when trying to connect my board and my PC through a switch. Before that, I used an old router for the Ethernet connections. The connection was established successfully. udhcpc command return an IP address and i was able to perform scp function on Altera Soc EDS command shell to transfer the file to the board. However, when I change the old router with a new switch, the connection cannot be established. The udhcpc command return infinite "Sending discover...". Without IP address, the files cannot be transferred. I was told that since only my laptop and the board were connected to the switch, there is no DHCP in the network and udhcpc could not return an IP address. Hence I was told to set up a static IP address instead. However, after setting up static IP address using ifconfig eth0, the files still couldn't be transferred. It shows connection timed out when I try to scp file to the IP address set earlier. I have read other solutions but its just getting more confused.  

 

My question is  

1. Why the udhcpc can return IP address even though at that time, only laptop and the board are connected to the router? 

2. Should I set up a static IP address for my laptop as well? If that is so, how can I do that? 

 

PS: I am a total newbie in linux and networking. Appreciate for any helps given.  

Below attached are the screenshot taken on Putty and Altera SoC EDS https://alteraforum.com/forum/attachment.php?attachmentid=14182&stc=1
0 Kudos
Highlighted
New Contributor I
99 Views

1. Why the udhcpc can return IP address even though at that time, only laptop and the board are connected to the router? 

A. This is because a local IP address is created, not a network one and you can still connect and send files to this address.

2. Should I set up a static IP address for my laptop as well? If that is so, how can I do that? 

A. I had a similar problem and I set up a static IP although not through boot. So in the terminal/command shell of the HPS (root), I used ifconfig to show me the ethernet connection which was eth0. 

ifconfig eth0 down

ifconfig eth0 198.xx.xxx.xx (whatever IP you want to use)

reconfirm using "ifconfig" command, if the ip address is not there try "ifconfig eth0 up"

This should set up your static IP address, however note that you have to redo this upon restart, if you don't want to do that best to declare this in boot which is a more complicated process. 

I realise that this is a really late, but putting it out there for those that stumble upon this

0 Kudos