HELP! About the RAW API

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

HELP! About the RAW API

陳 小擁
Hi all :
    Have somebody use Raw API to transmit the data between PC and platform based on ARM ? i have ported LwIP to my platform and i can receieve data form PC to the platform . however , when i try to send data form platform to PC, it can work ! can someone tell me what should i do to use Raw API to send data ? THANKS a lot !!

_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk
_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply | Threaded
Open this post in threaded view
|

Re: HELP! About the RAW API

Prateek Jain
Use tcp_write API
     iErr = tcp_write(pcb, (void *)iSendBuf, (u16_t)strlen((char *) iSendBuf), 1);
You must be having the pcb (which is used to recv the data)
 
Thanks
Prateek Jain


 
On 3/31/06, 陳 小擁 <[hidden email]> wrote:
Hi all :
    Have somebody use Raw API to transmit the data between PC and platform based on ARM ? i have ported LwIP to my platform and i can receieve data form PC to the platform . however , when i try to send data form platform to PC, it can work ! can someone tell me what should i do to use Raw API to send data ? THANKS a lot !!

_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://messenger.yahoo.com.hk/" target="_blank">http://messenger.yahoo.com.hk


_______________________________________________
lwip-users mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.nongnu.org/mailman/listinfo/lwip-users" target="_blank">http://lists.nongnu.org/mailman/listinfo/lwip-users



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

回覆: Re: HELP! About the RAW API

陳 小擁
Hi Prateek :
    I have got the pcb yet ! i find that i just can sent the data for several times . After i skipped the LwIP Code . i find that the pcb->queuelen don't decreased . It means that LwIP didn't get the ACKs from PC . I don't know why . Can you help me or give me some advice ? Thanks !


Prateek Jain <[hidden email]> 說:
Use tcp_write API
     iErr = tcp_write(pcb, (void *)iSendBuf, (u16_t)strlen((char *) iSendBuf), 1);
You must be having the pcb (which is used to recv the data)
 
Thanks
Prateek Jain


_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk
_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply | Threaded
Open this post in threaded view
|

Re: 回覆: Re: HELP! About the RAW API

Prateek Jain
Hi Chansio,
 
   It's difficult to comment on this problem with this information. I have few questions too:
1. Are you able to send data any time? i.e. Is it failing to send data in few cases or you are not able to send at all?
If possible, send the code. Please send the logs too.
 
Regards,
Prateek

 
On 4/24/06, 陳 小擁 <[hidden email]> wrote:
Hi Prateek :
    I have got the pcb yet ! i find that i just can sent the data for several times . After i skipped the LwIP Code . i find that the pcb->queuelen don't decreased . It means that LwIP didn't get the ACKs from PC . I don't know why . Can you help me or give me some advice ? Thanks !


Prateek Jain <[hidden email]> 說:
Use tcp_write API
     iErr = tcp_write(pcb, (void *)iSendBuf, (u16_t)strlen((char *) iSendBuf), 1);
You must be having the pcb (which is used to recv the data)
 
Thanks
Prateek Jain
 


_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://messenger.yahoo.com.hk/" target="_blank">http://messenger.yahoo.com.hk


_______________________________________________
lwip-users mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.nongnu.org/mailman/listinfo/lwip-users" target="_blank">http://lists.nongnu.org/mailman/listinfo/lwip-users



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

回覆: Re: 回覆: Re: HELP! About the RAW API

陳 小擁
Hi Jain :
    Thanks for your relpy !
    It is my code in the attach file . I just add some code in the samplehttp.c. and the section below in what i added :
if((tcp_active_pcbs != NULL) && (i = 50000))
    {
     temp_pcb = tcp_active_pcbs ;   
    // To get the active pcb from tcp_active_pcbs.
     
     
     err = tcp_write(temp_pcb , &abc[j] , sizeof(abc[j]),0) ;
    // use tcp_write to send the data:
   
  tcp_output(temp_pcb) ;
 // use tcp_output after call tcp_write

     if (err = ERR_MEM) 
     {
      Uart_Printf("tcp_output Error \n!");
     }
     
     
     Uart_Printf("We have send %d times \n",j);
    }
  }
 
I define the TCP_SND_QUEUELEN as 4 . My code can send 4 times . after that . It can't send anything else !

Prateek Jain <[hidden email]> 說:
Hi Chansio,
 
   It's difficult to comment on this problem with this information. I have few questions too:
1. Are you able to send data any time? i.e. Is it failing to send data in few cases or you are not able to send at all?
If possible, send the code. Please send the logs too.
 

_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk


LwIP.rar (56K) Download Attachment