I have a working bare metal code that implements simple TCP server using lwip 2.0.2 It runs on Xilinx UltraScale+ Kintex.
Now I want to use raw api.
The code is:
struct raw_pcb *pcb;
pcb = raw_new_ip_type(IPADDR_TYPE_V4 , 0); //pcb!=null
err = raw_bind (pcb, IP4_ADDR_ANY); //err=0
raw_recv(pcb, raw_recv_callback, NULL);
u8_t raw_recv_callback (void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
{
return 0;
}
From a (very) simple windows application I tried to connect and got an error. Can you please advise: In case of using raw api, should I still use tcp API after the bind step ?
In case of using only TCP api, the connection from the remote windows application works fine.
I found few sample code in https://github.com/tmatsuya/xapp1026.git But non of them is using the raw api.
Thank you in advance, Zvika