Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8341547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:31:02+00:00 2026-06-09T05:31:02+00:00

I am trying to send UDP over a network to a microcontroller. The microcontroller

  • 0

I am trying to send UDP over a network to a microcontroller. The microcontroller has had almost all of the IP stack stripped out to keep it lean, so cannot engage in ARP.
The microcontroller is outputting broadcast packets, which I can receive so I know its IP address and MAC address.
I can send broadcast UDP packets to it, which it receives fine, but when I try to send packets using its IP address, I can see ARP messages in wireshark, “Who has 192.168.1.205? Tell 192.168.1.18”, 205 being the micro, 18 is my PC. The micro does not respond with its MAC address, so I cant send the packet, but I know the MAC address from the packets the micro is sending out anyway.

So my question is can I specify the IP and MAC address using the UdpClient so it does not need to use ARP.. is there anything else I’m not considering?

The broadcast method that works looks like this:

myUdpClient.EnableBroadcast = true;
myUdpClient.Connect(IPAddress.Broadcast, port);
myUdpClient.Send(dataBytes, dataBytes.Length);

The fixed IP method that doesnt currently work looks like this

IPEndPoint ep = new IPEndPoint("192.168.1.205", port);
myUdpClient.Send(dataBytes, dataBytes.Length, ep);

I have looked at using things like

myUdpClient.Client.SendTo(dataBytes, SocketFlags.DontRoute, ep);

but this doesnt work, and is still not making use of the microcontrollers MAC address.. which my application knows and needs to use (I think). I was also hoping some ARP table on the network would have known where the MAC address was seeing as packets with this info are being sent from it..

As a note, I want to keep broadcast to a minimum to reduce the load on other microcontrollers on the network.

Thanks in advance,
Gareth

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:31:03+00:00Added an answer on June 9, 2026 at 5:31 am

    As far as I can see, you have two options, I’m sure someone else has more;

    • Set a static ARP entry in the OS before launching your application. arp -s <ip> <mac> or similar will set it on most OS’s and bypass ARP for further requests to the IP.

    • Use Jpcap to bypass the IP stack entirely, building and sending your own raw packets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send over UDP using the following code, but i'm getting
I am trying to send an image over UDP using JAVA. I have managed
I am trying to send my struct over a UDP socket. struct Packet {
I'm trying to send some small data over UDP using the AsyncUdpSocket library .
I'm trying write a java program to send live microphone data over UDP, then
Trying to send 3rd party scripts over an SSL or SPDY connection is a
im trying to send rest api Users.getLoggedInUser i have all the secret session and
I'm trying to sends XML serializable objects over a network stream. I've already used
I'm trying to send a UDP datagram (containing a protocol buffers message) and getting
I'm trying to send a single UDP packet with a specific payload and my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.