This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

rl_net for UDP implementation on lpc4357, KEIL5

Dear Team,

I am implementing UDP protocol on HITEX dev board (lpc4357) using rl_net library with KEILv5.36 compiler 5. I have written the code as per the documentation found on LINK.

Test Setup: HITEX board is connected to windows 10 laptop using ethernet cable. Laptop is running Hercules utility to test UDP.

HITEx board IP: 192.168.0.100, port: 2000

laptop ip: 192.168.0.10             , port: 2005

Problem: 1. Ethernet jack LEDs (orange & green) are glowing on both sides, but i am not able to ping hitex board.

2. While debugging I get successful response for functions but data is not seen on hercules terminal.

3. I am using network debug facility in keil5 and receiving error as "ARP-ERR: Cache_find ETH0 Unresolved MAC".

Does the (3) is causing the problem.

I am attaching my UDP send task below for reference.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Notify the user application about UDP socket events.
uint32_t udp_cb_func (int32_t socket, const NET_ADDR *addr, const uint8_t *buf, uint32_t len)
{
// Data received
if ((buf[0] == 0x01) && (len == 2)) {
// Switch LEDs on and off
//LED_out (buf[1]);
//do something
}
return (0);
}
// Send UDP data to destination client.
void send_udp_data (uint8_t *str)
{
if (udp_sock >= 0 && !udp_open_status) {
// IPv4 address: 192.168.0.10
NET_ADDR addr = { NET_ADDR_IP4, 2005, 192, 168, 0, 10 };
// IPv6 address: [fe80::1c30:6cff:fea2:455e]
// NET_ADDR addr = { NET_ADDR_IP6, 2000,
// 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Hercules window: 

KEIL network debug window:

       

Please help me resolve the issue. Thanks in advance.

0