I had a reply to a service request: SR# 1-784694661
"Currently we don’t have a PPP client, however it is under development and will be available on MQX 3.8 version."
-----Service request reply text ends.----
I have successfully tested the PPP (Point-to-Point) Example Application. The TWR52259 is the ppp server and my computer is the ppp Client and the PC gets the IP address from the TWR52259.
LOCAL_ADDRESS 10.200.1.98 (TWR52259)
PEER_ADDRESS 10.200.1.99 (My PC)
GATEWAY NO GATEWAY AT THIS POINT
And I can ping between them and they respond each other.
Now, what I need is to make the TWR52259 gets connected to a Gateway (i.e. a router, or a modem) and therefore have internet connection through the serial UART cable.
Regarding the reply answer about that there is no a PPP client implementation yet for TWR52259, I have some questions:
1. Is it possible to implement a PPP connection between the TWR52259 and a gateway through the serial UART and be bound to internet just like it is possible with an Ethernet cable connected to the LAN?
TWR52259 ---ppp over uart---- GATEWAY ----- internet
Would be the same as:
TWR52259 ---Ethernet cable---- GATEWAY ----- internet
??
2. ¿Would that be transparent to the application layer of the TWR52259 (i.e. to send an e-mail, httpd server, FTP client/server, TCP/IP socket)?
3. If that is possible, How can I do that then?
During the PPP (Point-to-Point) Example Application test I noted the IPCP_DATA_STRUCT
typedef struct {
void (_CODE_PTR_ IP_UP) (pointer);
void (_CODE_PTR_ IP_DOWN) (pointer);
pointer IP_PARAM;
unsigned ACCEPT_LOCAL_ADDR : 1;
unsigned ACCEPT_REMOTE_ADDR : 1;
unsigned DEFAULT_NETMASK : 1;
unsigned DEFAULT_ROUTE : 1;
unsigned NEG_LOCAL_DNS : 1;
unsigned NEG_REMOTE_DNS : 1;
unsigned ACCEPT_LOCAL_DNS : 1;
/*Ignored if NEG_LOCAL_DNS = 0. */
unsigned ACCEPT_REMOTE_DNS : 1;
/*Ignored if NEG_REMOTE_DNS = 0. */
unsigned : 0;
_ip_address LOCAL_ADDR;
_ip_address REMOTE_ADDR;
_ip_address NETMASK;
/* Ignored if DEFAULT_NETMASK = 1. */
_ip_address LOCAL_DNS;
/* Ignored if NEG_LOCAL_DNS = 0. */
_ip_address REMOTE_DNS;
/* Ignored if NEG_REMOTE_DNS = 0. */
} IPCP_DATA_STRUCT, _PTR_ IPCP_DATA_STRUCT_PTR;
And I believe that it is possible to configure all the parameters of this struct to make the TWR52259 routes all the protocols from the application layer to another router and then to the internet just like it does over Ethernet.
One more thing:
The protocol for a CLIENT-SERVER ppp connection is:
1. The Client sends the "CLIENT" String.
2. The Server responds with "CLIENTSERVER" String
3. Then the negotiation begins and the client binds to the network through ppp.
Now, In the PPP (Point-to-Point) Example Application I noted the following lines at the PPP_start(void) function call:
#ifdef PPP_DEVICE_DUN
_io_dun_install("dun:");
pfile = fopen("dun:", (char_ptr)pfile);
#endif
This was made to install the Dial-Up Networking driver.
In the io_dun.c library are the drivers to communicate to Windows Dial-Up Networking or Windows NT RAS.
Now, Inside the _io_dun_install function we can see the following source code lines:
dev_ptr->RECV = "CLIENT";
dev_ptr->SEND = "CLIENTSERVER";
dev_ptr->RECV_SIZE = 6;
dev_ptr->SEND_SIZE = 12;
But inside the _io_ras_install function we can see it backwards:
dev_ptr->RECV = "CLIENTSERVER";
dev_ptr->SEND = "CLIENT";
dev_ptr->RECV_SIZE = 12;
dev_ptr->SEND_SIZE = 6;
In the PPP (Point-to-Point) Example Application I tried to use _io_ras_install("ras:"); and configure my PC like a ppp server.
Using a signal analysis software tool I saw that the TWR52259 starts now with "CLIENT" and the PC responds with the "CLIENTSERVER" and then some data handshaking between both is seen and in the side of my PC (the SERVER) the CONNECTION LOG says "Connection Established". But in the side of the TWR52259 the _lwsem_wait(&ppp_sem); function never breaks, it is waiting for the PPP_linkup signal and it stays forever there.
Now here my last words....
1. Does what I am doing make any sense or not?
2. "There is no PPP Client implementation yet for the TWR52259. Wait for the MQX 3.8 version." is the final Answer and I am wasting my time tryng to get blood out of a stone?
3. Is it possible to connect to a local Network and to the internet (with a modem or router) through the serial cable (over ppp)?
Hope there is some solution for the problem.
Thank you very much and my best regards.