lwIP Connection Initiation Issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

lwIP Connection Initiation Issue

MSARUL
Hello All,
     I`m using lwIP with embOS in SAMA5D3 Controller. Ping is working fine. I`m able to create TCP server on target and able to connect from PC ( Client ) and is able to communicate ( send & receive ), target is responding. But If I try to initiate connection from target ( configured as client ) to PC ( server ), it is not sending SYN packet, it transmits ARP and gets the response from PC ( ARP ) response but after that it`s not sending SYN. It would be helpful if you could help me to find out the issue.

Thanks & Regards,
ARUL PRAKASH M

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: lwIP Connection Initiation Issue

Sergio R. Caprile
Your scenario ? I mean: IP addresses, masks, gateways. Sometimes wrong
configurations "just work".
Your netif setup ?
Your call setup ? How do you initiate your connection ? What does that
function return ? Are you using the RAW API ? The netconn API ? The
socket API ?
Threading rules ?

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: lwIP Connection Initiation Issue

MSARUL
Hello Sergio,
    Sorry for the late response. The target IP address is 192.168.1.3 and mask is 255.255.255.0, gateway is 192.168.1.10. Target is directly to connected to Laptop, no devices in between. I've given the highest priority for TCP Thread task. I'm using raw API. I'm initiating connection by calling tcp_connect function and it gives ERR_OK. I've registered tcp_err function too. If the target couldn't connect then it should atleast invoke that error function right? That function is also not getting invoked. What really confuses me most is, the connect function initiates the connection by sending ARP request and it receives the ARP response but from there it just ignores, no error function is called, no connection is established. Even after this, if I ping target from my laptop it sends the ping response. Hope I've given the information you wanted. Please let me know if you need further information.

Best Regards,
ARUL PRAKASH M

On Fri 1 Mar, 2019, 6:13 PM Sergio R. Caprile, <[hidden email]> wrote:
Your scenario ? I mean: IP addresses, masks, gateways. Sometimes wrong
configurations "just work".
Your netif setup ?
Your call setup ? How do you initiate your connection ? What does that
function return ? Are you using the RAW API ? The netconn API ? The
socket API ?
Threading rules ?

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: lwIP Connection Initiation Issue

Sergio R. Caprile
In reply to this post by Sergio R. Caprile
You forgot to include your device address. If it is 192.168.1.x it is
fine (unless it coincides with any other device in the network...)

The error callback is called when the connection request is rejected or
lwIP gets tired of waiting for an answer. Do you see the SYN in
wireshark or equivalent ? (I believe you say you don't)
The timeout mechanism requires a timing source, pings are answered on
the fly. In fact, most TCP behavior relies on timers. Do you provide
your time source ?
However, the SYN should be able to get out... If SYN is not coming out,
then you are preventing the driver from running, perhaps one of the
locks is not correct.
You seem to have a broken port.
Though you are calling RAW API functions, you have an OS underneath. Are
you running in NO_SYS=1 or NO_SYS=0 ?
All calls to RAW API functions must be on the same thread that calls the
lwIP core.

Make sure you read and understand this:
https://www.nongnu.org/lwip/2_1_x/group__lwip.html
https://www.nongnu.org/lwip/2_1_x/pitfalls.html


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users