<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RL-ARM udp_send() issue</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/26510/rl-arm-udp_send-issue</link><description> 
Hi all, 

 
I hope someone will be able to help me with my issue. I am trying
to send out an UDP packet but without any luck. The only instance
when I send out the packet succesfully is when I first recieve an UDP
packet and then send a reply to the</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/146479?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2009 04:42:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3d668fce-efdd-4558-86f2-8974537753a0</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/rlarm/rlarm_tn_using_udp_arpempty.htm"&gt;
&lt;a href="http://www.keil.com/support/man/docs/rlarm/rlarm_tn_using_udp_arpempty.htm"&gt;www.keil.com/.../rlarm_tn_using_udp_arpempty.htm&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/144775?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2009 01:54:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:458ac7e2-ced6-41be-8108-4829cf97fdb4</guid><dc:creator>Radovan Burhan</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear Franc,&lt;/p&gt;

&lt;p&gt;
can you tell me what to do in case of this error?&lt;/p&gt;

&lt;p&gt;
ETH ERR: Unresolved MAC for IP: 192.168.1.154&lt;/p&gt;

&lt;p&gt;
This is the reason why replying worked. The processor knew the MAC
of the sending IP.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/142507?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 04:04:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1800f440-9b41-404b-81c9-286750efabe8</guid><dc:creator>Radovan Burhan</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you for the debug hint. There seems to be the problem on
Ethernet layer:&lt;/p&gt;

&lt;p&gt;
ETH ERR: Unresolved MAC for IP: 192.168.1.154&lt;/p&gt;

&lt;p&gt;
This is the error I got.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/139416?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 03:11:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:edc449bf-0a8a-4083-b4b3-331a1522addd</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
Take a look at the &lt;b&gt;LEDClient&lt;/b&gt; example. There is a target
defined for &lt;i&gt;Debug&lt;/i&gt;. Check there how it is configured and do the
same. In the &lt;i&gt;Net_Debug.c&lt;/i&gt; enable UDP debugging to Full
debug.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/130566?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 03:08:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3c554961-9567-43a5-92b4-9bfe97ec1e57</guid><dc:creator>Radovan Burhan</dc:creator><description>&lt;p&gt;&lt;p&gt;
Where do I set this? I am not quite sure what you mean by UDP
debug and Full debug.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/125880?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 03:04:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:aefffa5a-42db-4c97-9bc5-d5496c94671c</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
Use a debug version, enable UDP debug to Full debug and watch the
debug print. You will see what is happening from the debug log.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/115417?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 02:57:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e0ec4bdb-62c4-4b12-a138-9bf8c2b3edc0</guid><dc:creator>Radovan Burhan</dc:creator><description>&lt;p&gt;&lt;p&gt;
That string is not empty. If I enter a text like &amp;quot;Hello world&amp;quot;
inside the result is the same. If it was due to the zero string
length I could never send the packet out. And as I wrote before I
manage to send it out when I first recieve a packet from a certain
address and then reply to the same address.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/103634?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 02:51:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:be9f66c2-2adb-42de-bb1e-a0c1e74d2002</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
Of course, &lt;i&gt;strlen&lt;/i&gt; on a string containing zero bytes will
fail.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/77941?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 02:48:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9fb686f6-565d-4c7b-8cc1-652cc0bff998</guid><dc:creator>Radovan Burhan</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am afraid there is nothing wrong with the socket initialisation.
Socket recieves data but I have problem sending data out. The only
instance when I manage to send out the data is when I first recieve
them from PC and then reply to the same address. Otherwise all
attempts to send out UDP packet end up in an error.&lt;/p&gt;

&lt;p&gt;
My aim is to sned out an UDP packet with NTP request and wait for
reply with time information.&lt;/p&gt;

&lt;p&gt;
Below is the code part for socket initialisation and the function
where data is sent out.&lt;/p&gt;

&lt;p&gt;
init_TcpNet (); udp_soc = udp_get_socket (0, UDP_OPT_SEND_CS |
UDP_OPT_CHK_CS, udp_callback); if (udp_soc != 0) { udp_open (udp_soc,
200); }&lt;/p&gt;

&lt;p&gt;
This is followed by the timer_poll() and main_TcpNet() endless
loop.&lt;/p&gt;

&lt;p&gt;
Function to send data out:&lt;/p&gt;

&lt;p&gt;
unsigned char udp_msg[] =
{&amp;quot;\111\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&amp;quot;};
U8 remip[4] = {192,168,1,154}; U8* sendbuf; U16 len;&lt;/p&gt;

&lt;p&gt;
if (mem_test (localm[NETIF_ETH].IpAdr, 0, 4) == __TRUE) {&lt;br /&gt;
// IP address not yet assigned by DHCP. printf(&amp;quot; return &amp;quot;); return;
}&lt;/p&gt;

&lt;p&gt;
len = strlen(udp_msg); sendbuf = udp_get_buf(len);
str_copy(sendbuf, udp_msg); printf(&amp;quot; Alokace %d %d %d&amp;quot;,sendbuf,
sendbuf[0], udp_msg[0]); answer = udp_send(udp_soc, remip, 200,
sendbuf, len);&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM udp_send() issue</title><link>https://community.arm.com/thread/57305?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2009 02:22:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c5f6ed0e-d7da-494a-ba5f-8f1478af31b6</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
Take a look at the &lt;b&gt;LEDSwitch&lt;/b&gt; and &lt;b&gt;LEDClient&lt;/b&gt; examples.
Enable the UDP port for communication.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>