Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to Transfer data to a microcontoller using UDP protocol?

Status
Not open for further replies.

rkt_167

Junior Member level 1
Joined
Aug 9, 2013
Messages
19
Helped
3
Reputation
6
Reaction score
3
Trophy points
3
Activity points
163
hi..
I am trying to built a GUI to transfer data serially using UDP protocol to a microcontroller.
for that purpose i am using C# in visual studio.
can any tell me about it even a brief description would be fine...like what are the steps i need to follow?
 

What type of UDP communication you want to do, wired based or wireless.

If you wants to do wireless based udp communication, then you can use SIMCOM GSM/GPRS Modems to do so, they have capability to send and reveive data on tcp and udp.


And for wired based communication you have to use a controller having Ethetnet Functionality, i think that can help you.
 
yes it is a wired connection everywhere.....let me explain it a bit actually i am trying to built a GUI which can send data from PC-1 to target board (e.g microcontroller) using various protocols (e.g. UDP,TCP,ethernet frame etc.) from target board I want to display the packets received and it's protocol by sending it another PC-2 i.e. from target board to PC-2.
In GUI I have one window (host window) to select and send data packets to target board.
connection between PC-1 and target board through Ethernet.
connection between target board and PC-2 through RS232.
 

if you have wired 10baseT you can connect to many embedded systems, e.g. Microchip
**broken link removed**

there is the PIC18F97J60 with onboard 10baseT or PIC32s with onbard 10/100baseT or PIC24/dsPIC with an external Ethernet transceiver such as the ENC28J60
 
I have implemented the code to send data from PC to a target board (e.g microcontroller) but just to verify sent data i want to receive it on my PC through loopback (self send) IP addressing e.g 127.0.0.1
can any one help me with the code to receive it on the same PC??
here is the code to send data:
UdpClient udpClient = new UdpClient();
udpClient.Connect("127.0.0.1", 8080);
Byte[] sendBytes = Encoding.ASCII.GetBytes(tbHost.Text);
udpClient.Send(sendBytes, sendBytes.Length);
 

you could have
1. another thread in your program which listens for datagrams on 127.0.0.1
2. another program running on your PC to receive the UDP datagrams on 127.0.0.1
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top