PPP over UART2 with WIP

I have a uart to bluetooth chipset on my board. I want to exchange data between the Q2686 and the PDA in bluetooth. I need PPP to have a reliable connection, error handling, etc…

When the PPP server is running, I would be able to type AT and have OK response, no? I have tried many speed but none worked…4800,9600,19200,38400,57600, 115200.

How can I check that the uart2 is opened and verify the speed when the ppp server is running?

I tried to make an at+wmfm :
at+wmfm?

+WMFM: 0,2,1,1
+WMFM: 0,2,2,1 // The uart2 seems to be active.
+WMFM: 0,2,3,0
+WMFM: 1,2,4,0
+WMFM: 1,2,5,1

OK

Thanks for your quick response

Best regards,

gdt

Hi gdt !

Well, i dont know the wip librairy and i’m not even sure about what you do before sending the AT command.

But maybe the reason is that, when you open PPP connection, UART2 turns to DATA mode… and then wont interpret/execute AT commands…

Hi Colin,

In this case, I suppose I will receive a event in some handler? I never receive an event in my case…
In the ppp protocol, I think there is some initialisation before connection with password etc…isn"t it?

Thanks for replies,

Best regards,

gdt

for PPP protocol, the link will be opened before exchanging user, password and all other stuff… but as this is managed by the wip librairy, i’m not sure about if the UART2 is already in DATA mode.

what function do you do before trying to send “AT” ?? (for ex. what functions do you call)

if UART2 is in data mode, sending AT on it will be interpreted as data… there wont be any event (well, thats what happen with ADL librairy at least)…
but you should receive data (“AT”) in associated UART2 call back function. Add traces in the UART2 “receiveDataHandler” call back function.
that will help to sort out if UART2 is in data mode or at mode…

I have seen that there is already a sample project (tcp_udp) for PPP server over UART. My code is very similar to the sample code. When I run the tcp_udp sample with PPP server, the behavior is the same as my code.

I think my error is located in the way I connect to the PPP server…

Someone knows how to connect to a PPP server over a COM port with a computer?

Thanks in advance

Best regards,

gdt

You have to setup a dialup connection ! Like for old serial modems !

Under Windows XP, network connection panel, choose create a new connection. Then choose “internet connection”, “configure connection”, “using remote access modem”… you’ll be asked for dialup number, user and password…

that’s it

I tried already that (cfr the first post for the log). The problem is that windows sends AT and have no answer from the ‘modem’.
The modem is the uart2 directly connected to the pc via serial cable on a com port.

When I try AT from an hyperterminal, I have no answer from the modem…

Somebody achieve to use the wip sample with PPP server over UART (tcp_udp -> 4.12, WipTcp Server -> 4.20 beta 6)?

Thanks in advance

BEst regards,

gdt

Are you trying to set a dialup connection with Windows AND running an application in modem which handle PPP connection ??? i dont think it is possible if you do that…

Either you use Windows dialup connection and the modem as a simple dumb modem, either you want to handle the PPP connection yourself and make an application for this (but then dont use a Windows dialup connection)…

But maybe i dont understand at all what you’ve done or what you’re trying to do…

You right. I cannot use dialup because I don’t need to dial anything. I just need to initiate PPP connection over a com port.

I will try “connect directly to another computer” this afternoon instead of dialup.

I suppose it’s possible otherwise why create a ppp server over uart in the wip library and in the samples…

Thanks for your replies

If someone have better idea than mine :wink:)

Best regards,

gdt

Hi everyone,

The solution was to use Communication cable between two computers on the uart com port. It’s working quite well. My pc receive an IP address and I can use sockets to send and receive data using PPP.

Thanks for your comments. It helps me to find the solution. If someone have problems. You can contact me.

Best regards

gdt

A couple of other things to take care of when setting up a PPP link with the PC:

  • letting windows assume the PPP server part is not a good idea: it’s tricky and it tends to mess up the login/password of the whole computer.

  • UART2 on q26 isn’t completely wired, and there are some serial ports (esp. some cheap USB/serial converters) which can’t stand that. If your connection fails after dialing occured, try on UART1.

OTOH, working on serial link is really convenient for development stages, you just go to GPRS for the final tests. It’s a real time and money saver.

When I try and run the example “udp_client” and change the startup"adl_main" so it calls “cfg_uart_ppp_client” then the setting up of the ppp client fails within this routine. Here is teh code causing the problem.

appli_entry_point = entry_point;

r = wip_bearerOpen( &b, PPP_BEARER, evh_bearer, NULL);
ASSERT_OK( r);

r = wip_bearerSetOpts( b,
WIP_BOPT_LOGIN, PPP_USER,
WIP_BOPT_PASSWORD, PPP_PASSWORD,
WIP_BOPT_END);
ASSERT_OK( r);
r = wip_bearerStart( b);
ASSERT( 0 == r || WIP_BERR_OK_INPROGRESS == r);

Bothe the functions “wip_bearerOpen” and “wip_bearerSetOpts” return OK but the function “wip_bearerStart” returns an error code of (-29) which is WIP_BERR_DEV - Error from Link Layer initialisation. What does this mean?

How can I actually test a PPP connection. I was planning to have the Wavecomm board connected to the PC, using the PC as a ppp host I guess.

What am I doing wrong

Hi dvorreiter,

I think you have not initialized the tcp stack using the wip_netInit fonction before calling the wip_bearerOpen.

Good luck :wink:

Best regards,

gdt

Thanks for the response but I believe I am setting initialising the port correctly. The adl_main function calls the net init function as follows

r = wip_netInitOpts(
WIP_NET_OPT_DEBUG_PORT, WIP_NET_DEBUG_PORT_UART1, /* WIP traces on UART1 */
//WIP_NET_OPT_DEBUG_PORT, WIP_NET_DEBUG_PORT_UART2,
//WIP_NET_OPT_DEBUG_PORT, WIP_NET_DEBUG_PORT_TRACE,
WIP_NET_OPT_END);

Is this correct?

Also how do you specify the baud rate , data bits stops bits etc of the serial port (UART2) I am using when creating a PPP connection???

In order to test the PPP connection I will need to set up a PPP analyser on a PC so I will need to know communication parameters of UART 2.

Did you check the return value from wip_netInitOpts?
You use UART1 to debug the wip communications, are you sure you use the uart2 for your ppp server? If you use the uart1 to debug the wip and to test the ppp server, it will not work.
You can also try to put a delay between the stack initialisation and you bearerStart.

Good luck

Best regards,

gdt

Hi, I am facing issue with opening UART2 bearer(SL8082BTA device).

/* Initialize the stack /
ret = wip_netInitOpts ( WIP_NET_OPT_DEBUG_PORT, WIP_NET_DEBUG_PORT_UART2,
WIP_NET_OPT_END );
This function wip_netInitOpts is returning OK(Success).
/
Open the UART bearer */
bearerRet = wip_bearerOpen ( &br, PPP_BEARER, cbEvhBearer, NULL );

It is returning -44. I dont know -44 does mean.

Please suggest me how to resolve this issue.

Hi, I am facing issue with opening UART2 bearer(SL8082BTA device).

appli_entry_point = entry_point;
/* Initialize the stack /
ret = wip_netInitOpts ( WIP_NET_OPT_DEBUG_PORT, WIP_NET_DEBUG_PORT_UART2,
WIP_NET_OPT_END );
This function wip_netInitOpts is returning OK(Success).
/
Open the UART bearer */
bearerRet = wip_bearerOpen ( &br, PPP_BEARER, cbEvhBearer, NULL );

It is returning -44. I dont know -44 does mean.

Please suggest me how to resolve this issue.

Hi,
As per my understanding it’s PPP echo…

-Alex

Hi every one,
I am trying to start a UART bear but it is returning WIP_BERR_OK_INPROGRESS after 2 minutes i am getting WIP_BEV_CONN_FAILED event.

Please find below followed steps for stating UART bearer.

ret = wip_netInitOpts ( WIP_NET_OPT_END ); //getting success

bearerRet = wip_bearerOpen ( &br, “UART1”, cbEvhBearer, NULL ); //getting success

bearerRet = wip_bearerSetOpts ( br,
WIP_BOPT_LOGIN, PPP_USER,
WIP_BOPT_PASSWORD, PPP_PASSWORD,
WIP_BOPT_IP_ADDR, localAddr,
WIP_BOPT_IP_DST_ADDR, destAddr,
WIP_BOPT_END ); //getting success

bearerRet = wip_bearerStart ( br ); // Returning WIP_BERR_OK_INPROGRESS.
After 2 minutes i am getting WIP_BEV_CONN_FAILED event.

I am struggling this issue last 1 month but still i am not able to resolve it. Please give me some suggestions it would be really helpful to me. Thanks for advance.

I am facing same issue even with UART2 also. I am working on SL8082BTA and firmware 6.54.1.A1.