Continuous transmission issue.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Continuous transmission issue.

saiteja@techsourceiot.com
Hi,

I'm trying to send the 4k buffer of float to string converted data from
http_client to http_server. Connection established and able to send the data
but after the first transmission there is no more transmission. A new IP
address is assigning after the first transmission. I was unable to find why
the second IP is generating and the issue where it is going wrong. If I
tried with the predefined 4k string buffer it is working fine without any
errors continuously sending the data to http_server. I'm sharing some screen
shots

screenshot with the real time float to string converted data sending
<http://lwip.100.n7.nabble.com/file/t2182/Screenshot_%2816%29.png>
In this screenshot we can see that a new IP is assigning after the first
transfer.

screenshot with the predefined string data sending
<http://lwip.100.n7.nabble.com/file/t2182/Screenshot_%2818%29.png>
in this screenshot we can see a continuous data is transmitting with the
fixed buffer.

I'm using client poll after the buffer conversion in a while loop for
continuous transmission.

err_t client_poll(void *arg, struct tcp_pcb *pcb)
 {
     struct pbuf *pbuf = NULL;
     err_t ret_code = ERR_OK;
   

     pbuf = pbuf_alloc(PBUF_TRANSPORT, strlen(string), PBUF_RAM);
     if(pbuf != NULL)
     {
        data_send = false;

        strcpy( pbuf->payload,string);
        pbuf->len=strlen(string);

        (void) tcp_write(pcb, pbuf->payload, pbuf->len, 1);
        tcp_output(pcb);
        tcp_sent(pcb, sent);

        pbuf_free(pbuf);

        if(1 == client_close)
        {
        ret_code = tcp_close(pcb);
        }

        data_send = true;
     }

     return ret_code;
 }

Can any one guide me to over come this issue.

Thanks,
Regards
Teja.






--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

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