Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread Furiantes Furiantes
Is tcp_new() thread safe too ? or just netcon. My scenario is that: - i will call a TCP staff only in seperated threads. Like do_download = tcp_new() in one thread and than like listen to some port initialized in seperated thread etc. etc. Is that ok to do or not ? With global access can I access

[lwip-users] (no subject)

2013-05-23 Thread William D. Anderson
Hello, I have been beating my head against an issue related to losing netconn buffers and hoped someone on the list might shed some light as to what I should look out for. I have lwip up and running and it responds very reliably to external arp and ping traffic. When I originate pings I can

Re: [lwip-users] ppp problem

2013-05-23 Thread yueyue papa
pppWrite[536910800]: len=0 Why len=0 ? Whether the data is send out though PPP IO? On Fri, May 24, 2013 at 7:30 AM, yueyue papa wrote: > The log is still not clear. First step is simplify the process > > 1. Do not let ethenet interface working if PPP interface is not on. > (Current your P

Re: [lwip-users] ppp problem

2013-05-23 Thread yueyue papa
The log is still not clear. First step is simplify the process 1. Do not let ethenet interface working if PPP interface is not on. (Current your PPP is not on yet.) 2. Enable PPP SIO log. Your log did not provide enough PPP debug information. It is hard to know which kind of problem happen. I

Re: [lwip-users] lwip ppp using gprs modem

2013-05-23 Thread Nikolas Karakotas
It is the new PPP stack sylvain has updated. You need to grab the latest source code from git. It's not in 1.4.1 -Original Message- From: afayek Sent: Thursday, May 23, 2013 11:51 PM To: lwip-users@nongnu.org Subject: Re: [lwip-users] lwip ppp using gprs modem what is these functions

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread Sylvain Rochet
Hi, On Thu, May 23, 2013 at 12:56:07PM -0400, Pomeroy, Marty wrote: > > Do not call tcp_new() or netconn_new() from outside the lwip thread. Not true, netconn API *IS* thread-safe. Sylvain signature.asc Description: Digital signature ___ lwip-use

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread Pomeroy, Marty
Set it up using tcpip_init(). For DHCP (started after the phy is configured), my startup is: { ip_addr_t eth0ipaddr, eth0netmask, eth0gw; IP4_ADDR(ð0gw, 0,0,0,0); // Gateway is for routing. Not used here. IP4_ADDR(ð0ipaddr, 0,0,0,0); // for DHCP, start with this IP IP4_ADDR(ð0ne

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread Pomeroy, Marty
Do not call tcp_new() or netconn_new() from outside the lwip thread. As you say, things will work most of the time... Until you hit the race condition and something breaks. But eventually you will hit the race condition. I use DHCP and the socket API. If you don't have memory limitations,

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread furiantes
Thank you for your reply! I will see that options too. As I see the lwip is already have a thread to serve TCP (main_lwip_thread) This is actully main part of TCP for lwip, if i understand right. A source from lwIP/api/tcpip.c /** * The main lwIP thread. This thread has exclusive access t

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread furiantes
Oh thank you very much! In about PHY i have a problem becouse he don't have interrupt for that, so i need to do a polling. But as you suggested i will try to do with that as you sad it. In my polling timer interrupt call -> tcpip_callback_with_block( s_HandlePhyInterrupt, NULL, 0); Where i wi

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread FreeRTOS Info
On 23/05/2013 16:20, Pomeroy, Marty wrote: > > If I'm seeing this right, you are polling for link status, and want to > figure out which is the better way to poll. > > First, all tcpip thread stuff MUST be done on the tcpip thread, so DO > NOT call it from the timer interrupt. Option 2 is eve

Re: [lwip-users] LPC1768/9 LAN8720 FreeRTOS 7.4 LWIP 1.4.1

2013-05-23 Thread Pomeroy, Marty
If I'm seeing this right, you are polling for link status, and want to figure out which is the better way to poll. First, all tcpip thread stuff MUST be done on the tcpip thread, so DO NOT call it from the timer interrupt. Option 2 is eventually going to cause errors. But better still, most phy

Re: [lwip-users] lwIP for eCos (LPC1768)

2013-05-23 Thread Pomeroy, Marty
This is late to the party, but I always have a second ethernet card on my PC. Configure it and your LPC1768 board with compatible static IP addresses (192.168.1.nn with 255.255.255.0 for mask), and connect them through a switch. I don't know the particular example, but with a lot of these, you c

Re: [lwip-users] ppp problem

2013-05-23 Thread yueyue papa
whether you init your modem? e.g AT command for setup your module. setup the APN, whether the dial process success? On Thu, May 23, 2013 at 10:18 PM, Ahmed Fayek wrote: > Hi, > > I try to run ppp to communicate with a gprs modem and I have this log: > > pppMain: unit 536911872: Connecting

Re: [lwip-users] ppp problem

2013-05-23 Thread yueyue papa
Linux PPPD log, you could see there is AT command and dial command before PPPD working # send (^MAT^M)s3c2440,s3c6410,ok6410,fl2440,arm,linux,winbond,nuvoton,w90p710,w90n745,开源,嵌入式,操作系统,嵌入式开发,嵌入式联盟,linux,ecos,uclinux,t-kernel,freeos,rtems,ucos,skyeye, _0 @+ {! `) {7 B expect (OK) ^M^M;

Re: [lwip-users] ppp problem

2013-05-23 Thread yueyue papa
It is hard to know from your code. Provide the debug log with AT information. On Thu, May 23, 2013 at 10:32 PM, Ahmed Fayek wrote: > yes modem is initialized corectly and PPP channel opened. > > I have this code: > > int connected = 0; > int setup = 0; > int pd;

Re: [lwip-users] ppp problem

2013-05-23 Thread Ahmed Fayek
yes modem is initialized corectly and PPP channel opened. I have this code:           int connected = 0;           int setup = 0;           int pd;           const char *username = "myuser";           const char *password = "mypassword";           /* initialise lwIP. This creates a new thread, t

[lwip-users] ppp problem

2013-05-23 Thread Ahmed Fayek
Hi, I try to run ppp to communicate with a gprs modem and I have this log: pppMain: unit 536911872: Connecting tcpip_thread: CALLBACK 20006808 pppStartCB: unit 536910992 ppp_set_xaccm[536910912]: outACCM=0 20009c40 2a64 5 ppp_send_config[536910904]: outACCM=0 20009c38 0 5 ppp_recv_config[5

Re: [lwip-users] lwip ppp using gprs modem

2013-05-23 Thread afayek
what is these functions you are using?: ppp_new(); ppp_set_netif_statuscallback(); ppp_set_netif_linkcallback(); they are not in lwip stack. -- View this message in context: http://lwip.100.n7.nabble.com/lwip-ppp-using-gprs-modem-tp21391p21425.html Sent from the lwip-users mailing list archi

Re: [lwip-users] lwip ppp using gprs modem

2013-05-23 Thread boisbu
Hi, Is there any possibility to share SIM900D code using PPP? I am evaluating the benefit of using LWIP stack instead of SIM900D embedded TCP/IP protocol. Thanks in advance, -- View this message in context: http://lwip.100.n7.nabble.com/lwip-ppp-using-gprs-modem-tp21391p21424.html Sent fro