Thanks,
I don't know what I changed but it started working. Great but bad feeling
when stuff you've been struggling with starts working and you don't know
why.

On Wed, Mar 3, 2021 at 6:41 AM Sidnei Silva <sidneisss1...@gmail.com> wrote:

> Have you checked that there is no firewal on your machine blocking the udp
> port?
>
> Sidnei
>
>
> Em ter., 2 de mar. de 2021 às 18:28, Luciano Moretti <
> luciano.more...@gmail.com> escreveu:
>
>> Hello:
>> I'm trying to send a generic UDP packet on a STM32F407 chip.
>> The HTTP server works, so the hardware is working. I can load the default
>> page on my workstation no issue.
>>
>> I'm trying to just send a UDP packet to a specific IP & Port. LwIP
>> doesn't give an error but the packet doesn't show up in Wireshark.
>>
>> Code:
>>
>> bool sendUDP(ip4_addr_t DestinationIP, uint16_t port, uint8_t *data,
>> uint16_t length)
>> {
>> err_t err;
>> pbuf *p;
>>
>> udp_pcb *upcb = udp_new();
>>
>> // TODO: Clean up error handling here.
>> err = udp_connect( upcb, &DestinationIP, port );
>> p = pbuf_alloc( PBUF_TRANSPORT, length, PBUF_RAM );
>> memcpy(p->payload, data, length);
>> err = udp_send( upcb, p );
>> udp_disconnect( upcb );
>> pbuf_free(p);
>> udp_remove(upcb);
>> return (ERR_OK == err);
>> }
>> _______________________________________________
>> lwip-users mailing list
>> lwip-users@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to