PPP over UART1

ADL, A&D memory, Flash objects, multi-tasking, file system, DOTA.

PPP over UART1

Postby keithnicholas » Thu Jul 04, 2013 11:39 pm

I'm trying to establish a PPP connection over UART1

Code: Select all
r = wip_netInitOpts(
                    WIP_NET_OPT_BUF_MAX, 1500,
                    WIP_NET_OPT_IP_FORWARD, TRUE,
                    WIP_NET_OPT_IP_NAT_TO_TCP, 600,
                    WIP_NET_OPT_IP_ROUTE_MAX, 20,
                    WIP_NET_OPT_SOCK_MAX, 16,
                    WIP_NET_OPT_IP_NAT_DUMPTABLE, TRUE,
                    WIP_NET_OPT_END)) != 0 )   

...

r = wip_bearerOpen( &g_GPRSBearer, "UART1", evh_bearer, NULL);

...

r = wip_bearerSetOpts( g_GPRSBearer,
               WIP_BOPT_DIAL_MSNULLMODEM,  TRUE,               
               WIP_BOPT_END);   // tried playing with turning this option on and off...
...

r = wip_bearerStart( g_GPRSBearer);



This doesn't seem to work, When I monitor the port nothing is coming out the port, According to the docs, the modem should send an LCP packet out the UART to initiate the PPP connection. But its not happening. It will come back with WIP_BERR_PPP_LCP_FAILED

Before trying to establish the connection I set the port to AT+WMFM=0,0,1 to stop it being used as a terminal port and then use it to configure the external modem. I then close that serial port. However I'm not sure this is the right state or not for the PPP connection to be established, and there doesn't seem to be any documentation that talks about what state it should be in.

Any ideas?
keithnicholas
 
Posts: 14
Joined: Wed Jul 07, 2010 4:03 pm
Location: http://geekswithblogs.net/Designingcode
Has thanked: 0 time
Have thanks: 0 time

Re: PPP over UART1

Postby Rex_alex » Wed Jul 10, 2013 9:56 am

Hi,

Use the SDK sample (say tcp server). Configure the application for using PPP over UART1.
Execute the application on UART2.
Then create a new Dial-up onnection with configuration "Coomunication cable between 2 computers" using UART1.

Give the user name and password which are already defined in the application. And connect.

It should work.


Thanks
User avatar
Rex_alex
 
Posts: 1395
Joined: Thu Jan 01, 1970 12:00 am
Has thanked: 0 time
Have thanks: 84 times


Topic Tags

UART, PPP

Return to Operating system

Who is online

Users browsing this forum: No registered users and 2 guests