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

UDP send fails

Hi,

netUDP_Send fails with netSatus=netInvalidParameter.

netStatus s = netInitialize ();

char packet[] = "M-SEARCH * HTTP/1.1\r\n" "HOST: 239.255.255.250:1900\r\n" "MAN: \"ssdp:discover\"\r\n" "MX: 1\r\n" "ST: urn:schemas-upnp-org:device:ZonePlayer:1\r\n" "X-RINCON-HOUSEHOLD: HHID_0CIxhbn87mLLeVNz78fjTb0jx2F\r\n\r\n";

int32_t udp_sock;

udp_sock = netUDP_GetSocket (udp_cb_func); if (udp_sock >= 0) { s= netUDP_Open (udp_sock, 0);

NET_ADDR4 addr = { NET_ADDR_IP4, 1900, 239, 255, 255, 250 };

s = netUDP_SetOption (udp_sock, netUDP_OptionTTL, 10);

uint8_t group_ssdp[NET_ADDR_IP4_LEN] = { 239, 255, 255, 250 }; s = netIGMP_Join (0, group_ssdp);

u32 size = sizeof(packet);

s = netUDP_Send (udp_sock, (NET_ADDR *)&addr, (u8*)packet, size);

s = netUDP_Close (udp_sock); s = netUDP_ReleaseSocket (udp_sock);

}

Parents Reply Children
No data