APN configuration issue

Hiya,

I experience some issues with the APN configuration.

Thanks to release 14.04 of Legato, I can now set a userName and a password for the APN I set.
This is extracted from the documentation:

modemServices/ modemDataConnection/ <ProfileName_1>/ accessPointName<string> == <ADDR> packetDataProtocol<string> == <PDP_TYPE> authentication/ pap/ enable<bool> == <true/false> userName<string> == <USERNAME> password<string> == <PWD> chap/ enable<bool> == <true/false> userName<string> == <USERNAME> password<string> == <PWD>

So i modified (with vi) the configuration tree located in /opt/legato/configTree. (xxxxxxx represents a string)

{ "apps" { } "modemServices" { "modemDataConnection" { "internet" { "accessPointName" "xxxxxxx" "authentication" { "pap" { "enable" "false" "userName" "xxxxxxx" "password" "xxxxxxx" } "chap" { "enable" "true" "userName" "xxxxxxx" "password" "xxxxxxx" } } } } } } 

My issue is that when I install or uninstall an application, the only field kept (regarding the modemServices section) is "modemServices" { "modemDataConnection" { "internet" { "accessPointName" "xxxxxxx" } } }

Did i set correctly the configuration tree ?
Do you know how I can solve this issue ?

Thanks by advance,

Regards

Hi,

We would recommend users to use the ‘config’ tool whenever modifying the configDB. Modifying the configDB in /opt/legato/configTree/system.xxxx is more prone to errors if something is incorrect in the entry.

Since there is currently a configDB related bug in 14.04 (which is fixed for next update on github), please try the following to create the configDB with the same specs mentioned above.

  1. Delete /modemServices (clean slate)
  2. legato restart
  3. Now we can create the entries identical to the one above (system.xxxx file) root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/accessPointName xxxxxxx root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/authentication/pap/enable false bool root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/authentication/pap/userName xxxxxxx root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/authentication/pap/password xxxxxxx root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/authentication/chap/enable true bool root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/authentication/chap/userName xxxxxxx root@swi-mdm9x15:/# config set /modemServices/modemDataConnection/internet/authentication/chap/password xxxxxxx

This should show up like:

root@swi-mdm9x15:/# config get / / apps<empty> modemServices/ modemDataConnection/ internet/ accessPointName<string> == xxxxxxx authentication/ pap/ enable<bool> == f userName<string> == xxxxxxx password<string> == xxxxxxx chap/ enable<bool> == t userName<string> == xxxxxxx password<string> == xxxxxxx

From looking at my system.xxxx file, it looks like your boolean entries were set incorrectly.

{ "apps" ~ "modemServices" { "modemDataConnection" { "internet" { "accessPointName" "xxxxxxx" "authentication" { "pap" { "enable" !f "userName" "xxxxxxx" "password" "xxxxxxx" } "chap" { "enable" !t "userName" "xxxxxxx" "password" "xxxxxxx" } } } } } }

Hope this helps,
Enoch :smiley:

Hi,

Indeed, the solution was to use the config tool. I set the fields in the configuration database as you advised me to do, and now I can install/uninstall application without having the modemServices branch in the configTree file removed.

There is some typo in the documentation though. The help is displayed correctly in the console

[code]root@swi-mdm9x15:~# config help
Usage:

To read a value:
config get

To write a value:
config set []

To delete a node:
config delete

To import config data:
config import

To export config data:
config export

Where:
: Is a path to the tree and node to operate on.
: Path to the file to import from or export to.
: Is a string value to write to the config tree.
: Is optional and mmust be one of bool, int, or string.
If type is bool, then value must be either true or false.
If unspecified, the default type will be string.

A tree path is specified similarly to a *nix path.

For example:
    /a/path/to/somewhere

The configTree supports multiple trees, a default tree is given per user.
If the config tool is run as root, then alternative trees can be specified
in the path by giving a tree name, then a colon and the value path as
normal.

As an example, here's of the previous paths, but selecting the tree named
'foo' instead of the default tree:

    foo:/a/path/to/somewhere

[/code]

But not in the online documentation : legato.io/legato-af/14_04/co … mands.html
(the set and get commands are missing)

Thanks for your help !

Regards

Oups, the documentation will be updated shortly to reflect the new changes for the config tool.

Thanks,
Enoch