Forum Discussion
21 Replies
- Altera_Forum
Honored Contributor
Hello,
This is the way to get DHCPclient running on your DE_board. 1.) Select dhcpcd-new nothing else as your client from the menuconfig-->User selection--> 2.) In the rc file get the Mac address set up using ifconfing eth0 MAC-ADDRESS 3.) Still in the rc file just go dhcpcd & 4.) That should give you a IP from the server, It took me so long to get this working because my board is new and I had to register it with the admin. But I just stole the MAC-Address from the computer already hooked up and put that as the mac-address and thus instantly got assigned its IP. Note: This is not a perfect method since /etc/dhcp/ directory does not exist in the romfs file system it would be good to have that since dhcpcd tries to write to this file. Also dhcpcd-new says it works only for the 2.0 and 2.4 kernel it actually compiles for 2.6 and thus works fine. Another way of doing this (a better way) is to use udhcp in busy-box but it needs a default.script file which needs to be written in either C-or-perl since sash cannot run bash scripts. I will post the udhcp method once I get it running. regards, - Altera_Forum
Honored Contributor
Tanks !
Now I can do it in DE2 Board , But I find a problem , I layout a new pcb board using EP2C5 and DM9000. now I can't ping the board . The board have not a flash for store HW addr. <div class='quotetop'>QUOTE </div> --- Quote Start --- # ifconfig eth0 Link encap:Ethernet HWaddr 00:07:ED:00:00:00 inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:218 errors:0 dropped:0 overruns:0 frame:0 TX packets:186 errors:14 dropped:0 overruns:0 carrier:14 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif TX bytes:0 (0.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif Interrupt:8 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2208 (2.1 KiB) TX bytes:2208 (2.1 KiB) # # ping 192.168.1.20 PING 192.168.1.20 (192.168.1.20): 56 data bytes 84 bytes from 192.168.1.20: icmp_seq=0 ttl=64 time=0.0 ms 84 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=0.0 ms 84 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.0 ms --- 192.168.1.20 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0.0/0.0/0.0 ms# # ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3): 56 data bytes --- 192.168.1.3 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss# [/b] --- Quote End --- 192.168.1.3 is a address of my pc . So I want to know why?? do you have meet these problem . if you have . pls give me some advice . thanks ! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by alex.liu@Nov 4 2006, 10:05 PM tanks !now i can do it in de2 board , but i find a problem ,
i layout a new pcb board using ep2c5 and dm9000.
now i can't ping the board .
the board have not a flash for store hw addr.
<div class='quotetop'>quote
--- quote end ---
--- quote start ---
# ifconfig
eth0 link encap:ethernet hwaddr 00:07:ed:00:00:00
inet addr:192.168.1.20 bcast:192.168.1.255 mask:255.255.255.0
up broadcast running multicast mtu:1500 metric:1
rx packets:218 errors:0 dropped:0 overruns:0 frame:0
tx packets:186 errors:14 dropped:0 overruns:0 carrier:14
collisions:0 txqueuelen:1000
rx bytes:0 (0.0 http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/cool.gif tx bytes:0 (0.0 http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/cool.gif
interrupt:8
lo link encap:local loopback
inet addr:127.0.0.1 mask:255.0.0.0
up loopback running mtu:16436 metric:1
rx packets:18 errors:0 dropped:0 overruns:0 frame:0
tx packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
rx bytes:2208 (2.1 kib) tx bytes:2208 (2.1 kib)
#
# ping 192.168.1.20
ping 192.168.1.20 (192.168.1.20): 56 data bytes
84 bytes from 192.168.1.20: icmp_seq=0 ttl=64 time=0.0 ms
84 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=0.0 ms
84 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.0 ms
--- 192.168.1.20 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms# # ping 192.168.1.3
ping 192.168.1.3 (192.168.1.3): 56 data bytes
--- 192.168.1.3 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss# --- Quote End --- 192.168.1.3 is a address of my pc . So I want to know why?? do you have meet these problem . if you have . pls give me some advice . thanks ! <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19163)</div> [/b] --- Quote End --- 00:07:ED:00:00:00 is not correct ether addr. Please use 0x-00-07-ED-0A-03-(Random# 0-256) , with "ifconfig eth0 hw ether ....."
- Altera_Forum
Honored Contributor
<div class='quotetop'>QUOTE </div>
--- Quote Start --- 00:07:ED:00:00:00 is not correct ether addr. Please use 0x-00-07-ED-0A-03-(Random# 0-256) , with "ifconfig eth0 hw ether ....." <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19164) --- Quote End --- [/b] --- Quote End --- I have change the hw <div class='quotetop'>QUOTE </div> --- Quote Start --- ifconfig eth0 Link encap:Ethernet HWaddr 00:07:ED:0A:03:25 inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif TX bytes:0 (0.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif Interrupt:5 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:396 (396.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif TX bytes:396 (396.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif # ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2): 56 data bytes --- 192.168.1.2 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss# [/b] --- Quote End --- Hipp But I find a strange things . the LED2 of DM9000 awaly keep flash, do you meet these problem ? I can not ping the board form my pc. - Altera_Forum
Honored Contributor
Hello,
The led keeps on flashing that means that your Dm9000A is being detected but that does not necessarily mean that you are hooked up to the network. If you are using DHCP and not getting any ping to your board that means you are not hooked for sure. Why dont you change the MAc-address this way This is if you are using DHCP: get the MAC-address of one of your computers hooked up to the network and running find its mac-address if you are on windows then use ipconfig on comman prompt should give you the MAc-address. Unhook the computer from the network and set this mac-address as the mac-address for your borad by going ifconfig eth0 hw ether xx-xx-xx-xx-xx-xx (this is the computer mac-address). then go dhcpcd & (this should say something like unable to write to /usr/share/something... and if not able to connect timed-out Next go ifconfig and it will show the new IP address obtained from the DHCP server. you should be able to ping it with your computer. If you have a static IP then: again if you are going through the network get the IP from some other computer which actually works and set that as your IP (unhook this computer from the network) ifconfig eth0 (new IP). trying pinging it from your other computer using this IP. This should work If all of this fails then: I would set up a straight socket connection with server running on the board and client running on the computer. Although this would need you to know raw-ethernet socket programming. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif good-luck. - Altera_Forum
Honored Contributor
madman23 Thank you
Now I think you maybe understand my question. I have do it OK in my DE2 board . I design a board using DM9000, The Sch is the same to DE2 . linux can be run in the same network , but when i use my new board . I find the LED2 Keep flash ,I don't know what's wrong . hardware ? sotfware? could you help me ! thanks ! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by alex.liu@Nov 5 2006, 03:07 PM madman23 thank younow i think you maybe understand my question.
i have do it ok in my de2 board .
i design a board using dm9000, the sch is the same to de2 .
linux can be run in the same network , but when i use my new board . i find the led2 keep flash ,i don't know what's wrong . hardware ? sotfware?
could you help me ! thanks !
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19175)
--- quote end ---
--- Quote End --- I looked at your pinging post. I think you did not ping the right IP becauase the last number is .2 not .20, also I have some questions; 1.) When you hook up the ethernet do you get lights flashing straight away. 2.) If you go ifconfig eth0 down do you still get the leds flashing--> This should not happen. This is just to get some more info about your design. regards,
- Altera_Forum
Honored Contributor
--- Quote End --- I looked at your pinging post. I think you did not ping the right IP becauase the last number is .2 not .20, also I have some questions; 1.) When you hook up the ethernet do you get lights flashing straight away. 2.) If you go ifconfig eth0 down do you still get the leds flashing--> This should not happen. This is just to get some more info about your design. regards, <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19177)</div> --- Quote End --- Dear madman23 Now I use the ethereal to capture the netwrok . I find My borad can send the next inforamtion <div class='quotetop'>QUOTE </div> --- Quote Start --- "No.", "Time", "Source", "Destination", "Protocol", "Info" "1", "0.000000", "192.168.1.21", "Broadcast", "ARP", "Who has 192.168.1.3? Tell 192.168.1.21" "2", "0.000023", "192.168.1.3", "192.168.1.21", "ARP", "192.168.1.3 is at 00:11:25:d2:24:ac" "3", "0.999980", "192.168.1.21", "Broadcast", "ARP", "Who has 192.168.1.3? Tell 192.168.1.21" "4", "1.000003", "192.168.1.3", "192.168.1.21", "ARP", "192.168.1.3 is at 00:11:25:d2:24:ac" "5", "2.999923", "192.168.1.21", "Broadcast", "ARP", "Who has 192.168.1.3? Tell 192.168.1.21" "6", "2.999946", "192.168.1.3", "192.168.1.21", "ARP", "192.168.1.3 is at 00:11:25:d2:24:ac" "7", "3.999902", "192.168.1.21", "Broadcast", "ARP", "Who has 192.168.1.3? Tell 192.168.1.21" "8", "3.999926", "192.168.1.3", "192.168.1.21", "ARP", "192.168.1.3 is at 00:11:25:d2:24:ac"[/b] --- Quote End --- 192.168.1.21 is the board . 192.168.1.3 is my PC . So I think the dm9000 can send the packets to my pc , the baord can't receive the packets . I have check the sch and PCB . It is the same as the reference of DE2 . - Altera_Forum
Honored Contributor
Did you check the design guide or layout guide of DM9000A?
The layout of tx rx pairs are critical. Did you use the same PHY transformer? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@Nov 7 2006, 02:50 PM did you check the design guide or layout guide of dm9000a?the layout of tx rx pairs are critical.
did you use the same phy transformer?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19240)
--- quote end ---
--- Quote End --- Thanks hippo ! I have resolved the problem . this is a hw problem. the PCB layout have some problem . thanks!