www.beck-ipc.com
www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |
RegisterRegister   |LoginLogin

routing info on SC145 and gateway setting for ppp client

Questions and discussions about the operating system RTOS-LNX and the corresponding C-LIB.
I am currently using the evaluation kit DK-151 having SC145 controller.

I want to connect an external serial modem to UART5 of DK151 as ppp client. For this I used and modified the sample ppp client program pppC.c , an example from SC2x3.

To see the modem AT command trail, I am using RTOS Beta v1.19 as per last discussion on forum.

My test program dials properly and I can see the connection is UP and I am getting local and remote IP, too as seen below.But the default gateway is not getting added. It reports error code of 265 i.e. no route to host.

:\>test_pppclient
A:\>
IPC@CHIP PPP client example, Freenet mobile
ppp_Client_Installed return : 1
PPP client: Opening connection
IPC@CHIP->Modem: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS = 0
Modem->IPC@CHIP: OK
IPC@CHIP->Modem: AT
Modem->IPC@CHIP: OK
IPC@CHIP->Modem: ATDT*99#
Modem->IPC@CHIP: CONNECT
ppp_Client_Open return : 0
Link established
MyIP : 10.72.171.241
RemIP : 192.200.1.21
Prim. DNS : 112.110.249.193
Sec. DNS : 112.110.249.200
No default gateway found
PPPClientRemipAddrStr 192.200.1.21 converted to gateway long addr 352438464
added default gateway with iReturn and errorcode = -1, 265.. (i.e. No route to host)

Press ESC for closing connection


After this with CTRL+F I went to shell and tried to ping to the remote IP 192.200.1.21 or 8.8.8.8, it does not respond back, but just comes back to command prompt without even reporting any error .
What's wrong ?

Also, How can I see current routing table entries like Linux/win on SC145 ?

Regards,

..Sharmila

Hello Sharmila,

I think there is an erroneous check in the SetDefaultGateway() API function that checks whether the given gateway matches to the subnet of the interface. This check works well for normal interfaces, but for PPP interfaces where the netmask is set to 255.255.255.255 is will fail. This needs to be corrected.

I'll send you a new Beta test version.

Best regards,
André Pribil
Software Development
Beck IPC GmbH

Thank you very much, Andre.

I will check the same.

Regards,

..Sharmila

Sorry, it still does not ping to 8.8.8.8, though default gateway gets added successfully. The ping doesn not give any response and returns to prompt.
Apart from this , it also does not ping to any node on LAN, while ppp connection is up. When ppp connection is down, it pings to LAN node successfully.

Here is the output of my program.


:\>test_pppclient
A:\>
IPC@CHIP PPP client example, Freenet mobile
ppp_Client_Installed return : 1
PPP client: Opening connection
IPC@CHIP->Modem: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS = 0
Modem->IPC@CHIP: OK
IPC@CHIP->Modem: AT
Modem->IPC@CHIP: OK
IPC@CHIP->Modem: AT+CGDCONT=1,"IP","INTERNET"
Modem->IPC@CHIP: OK
IPC@CHIP->Modem: ATDT*99#
Modem->IPC@CHIP: CONNECT
ppp_Client_Open return : 0
Link established
MyIP : 100.71.9.125
RemIP : 192.200.1.21
Prim. DNS : 112.110.249.193
Sec. DNS : 112.110.249.200
PPPClientRemipAddrStr 192.200.1.21 converted to gateway long addr 352438464
Default gatway with new api : 192.168.1.1
removed default gateway 192.168.1.1 with iReturn = 0..
set default gateway 192.200.1.21 with iReturn = 0..

Press ESC for closing connection
Stdio: Both
Stdio: Shell

A:\>ping 192.168.1.15
A:\>ping 8.8.8.8
A:\>

Hi,

there seems to be a problem with the ping command, when the Shell Focus is set to "Shell". In this case no outputs are made. When the Shell Focus is set to "Both" the outputs can be seen.

I'm looking into this.

Best Regards,
André Pribil
Software Development
Beck IPC GmbH

Yes, Great ! with focus set to "Both" it did ping successfully to google.com. I did not try "Both" earlier.

Anyway, thanks a lot.

Let me know further about refinement of ping command, whether it will need RTOS-LNX upgrade to work properly ,if ppp client is run through one application in background.

Regards,
..sharmila

Hi,

the focus problem with the ping command will be fixed with the next RTOS-LNX release.

Regards,
André Pribil
Software Development
Beck IPC GmbH

Return to RTOS-LNX


Who is online

Users browsing this forum: No registered users and 1 guest


cron