How to configure ethernet card to make it work without router?
I want to connect a desktop to a microcontroller board through ethernet interface. when desktop is connected to the router, it is automatically configured and I can use UDPsocket to send the packet out, I can see the packet sent out info with WireShark software.
But when desktop connected to microcontroller, it cannot be configured correctly since microcontroller cannot provide any ethernet related information. so I manually configure the ethernet card in the desktop with fixed IP address, netmask, gateway. but I still cannot see UDP packet sent out with WireShark software. anything else I need to configure to make it work? thanks
bq. anything else I need to configure to make it work?
Maybe. Are you operating any machine based firewall? Did you bring the configured interface up? How you do that depends on platform.
desktop's OS is ubuntu 12.0. no firewall.
What type of microcontroller are you using? Microchip TCPIP stack?
UDP is by the way not fun to work with in terms of embedded code! Better to use the TCPIP setup instead. Then you don't need to verify every received message, contents and sequence before using the data.
Did you also enble your host IP address in the same ranges etc? Maybe for a test you could send messages on your host to the home server and see if wireshark catches those.
Bit more info might be needed for better help here.
You do know that for direct connection you need a differently wired network cable?
[quote author="utcenter" date="1361433882"]You do know that for direct connection you need a differently wired network cable?[/quote]For modern Ethernet chips it doesn't matter.
shalongbasi@ Do you check connection availability by ping or somehow else? If connection present its hard to say what is problem, try send packets from microcontroller.
What Microcontroller you use?
^^ Maybe the microcontroller's is not all that modern.
I used PIC32MX microcontroller from Microchip with external TLK110 ethernet chip, but I did not include their TCP/IP stack into my codes. for the cable wire, it is ok since it does support Auto-MDIX. I tested microcontroller before with direct connection to desktop PC under WindowsXP, Wireshark can see the incoming packet to PC from microcontroller. But I did not tested it under Linux to see if it can receive packet from Microcontroller. as I said before, I tested the packet sent out from PC, but Wireshark did not catch anything. Maybe ethernet card configuration under linux has problem.