Default route not working


#1

According to the Legato docs, if you make a connection with the defaultRouteStatus true, (which is startup default), then the default route will be automatically made. This is not the case. If I try to ping an address after the connection, there is no default route:

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
100.118.20.80 * 255.255.255.248 U 0 0 0 rmnet_data0
192.168.2.0 * 255.255.255.0 U 0 0 0 ecm0
192.168.225.0 * 255.255.255.0 U 0 0 0 bridge0

The docs says that if it’s false, then you have to set the route yourself which requires access. If it would set that automatically, it would allow my component to run sandboxed. Do we have a work around for this?


#2

May I ask below info?

  • Product and Legato version
  • How do you establish the data connection? which API you are using?

Thx


#3

Product is WP7601. Legato version is 17.9.0. Windows 10, Dev Studio 5.3.

I establish the data connection using the modemServices by setting the index to 3 (Verizon), verifying the proper APN and calling le_mdc_StartSession(profile), as per the documentation.

I make the connection with no issue. But it doesn’t have a default route. In the Docs, it says it will.

Making the connection with the connection manager does the same thing. No default route.


#4

There are 2 set of APIs to setup data connection.

  • le_data_
  • le_mdc_

Believe you are referring to this link for useDefaultRoute
http://legato.io/legato-docs/latest/c_le_data.html#c_le_data_defaultRoute
But it applies to le_data_Request() only.

As you are using le_mdc_StartSession(profile), you have to setup the default route in your app.
Otherwise, you may consider using le_data_Request().

Hope it helps.


#5

OK. Since this requires that the app be un-sandboxed to run the “route” command, is there some way in a sandboxed app to be able to do these things?


#6

Hi @EvetsMostel,

Basically le_mdc is quite low-level and relies on you to take care of the routing. It just gives you an end-point without managing much more, which gives you some freedom over what you want to do.

le_data is there to cover the most common use cases where a system wants connectivity to the internet from time to time, and can request such connection from the DCS (= DataConnectionService), that eventually relies on le_mdc to create such connection and make it available (= routing) to the user.

So if you do not want to manage routing, I would suggest that you look into le_data.