diff --git a/README.md b/README.md index fd5fb4f..6507770 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,20 @@ $ ninja -C ../eg25-build # ninja -C ../eg25-build install ``` +## Configuration + +`eg25-manager` uses device-specific configuration files, named after the +device-tree `compatible` field. These files are installed to +`/usr/share/eg25-manager`. They can be copied to `/etc/eg25-manager` then +modified, that way they won't be overwritten during an upgrade. + ## Running `eg25-manager` is usually run as a systemd service, but can also be manually started from the command-line (requires root privileges): ``` -# eg25-manager +# eg25manager ``` ## License diff --git a/data/pine64,pinephone-1.0.toml b/data/pine64,pinephone-1.0.toml index 6509057..c0e9192 100644 --- a/data/pine64,pinephone-1.0.toml +++ b/data/pine64,pinephone-1.0.toml @@ -31,6 +31,7 @@ configure = [ # match, the command is then executed with value `expect` in # order to set the parameter to the configured value (optional) # A command can have `expect` OR `value` configured, but it shouldn't have both + { cmd = "QGMR" }, { cmd = "QDAI", expect = "1,1,0,1,0,0,1,1" }, { cmd = "QCFG", subcmd = "risignaltype", expect = "\"physical\"" }, { cmd = "QCFG", subcmd = "ims", expect = "1" }, diff --git a/data/pine64,pinephone-1.1.toml b/data/pine64,pinephone-1.1.toml index 6509057..c0e9192 100644 --- a/data/pine64,pinephone-1.1.toml +++ b/data/pine64,pinephone-1.1.toml @@ -31,6 +31,7 @@ configure = [ # match, the command is then executed with value `expect` in # order to set the parameter to the configured value (optional) # A command can have `expect` OR `value` configured, but it shouldn't have both + { cmd = "QGMR" }, { cmd = "QDAI", expect = "1,1,0,1,0,0,1,1" }, { cmd = "QCFG", subcmd = "risignaltype", expect = "\"physical\"" }, { cmd = "QCFG", subcmd = "ims", expect = "1" }, diff --git a/data/pine64,pinephone-1.2.toml b/data/pine64,pinephone-1.2.toml index 1d33fc0..566ac80 100644 --- a/data/pine64,pinephone-1.2.toml +++ b/data/pine64,pinephone-1.2.toml @@ -27,6 +27,7 @@ configure = [ # match, the command is then executed with value `expect` in # order to set the parameter to the configured value (optional) # A command can have `expect` OR `value` configured, but it shouldn't have both + { cmd = "QGMR" }, { cmd = "QDAI", expect = "1,1,0,1,0,0,1,1" }, { cmd = "QCFG", subcmd = "risignaltype", expect = "\"physical\"" }, { cmd = "QCFG", subcmd = "ims", expect = "1" }, diff --git a/src/at.c b/src/at.c index a9172de..4b5cd62 100644 --- a/src/at.c +++ b/src/at.c @@ -320,7 +320,7 @@ void at_sequence_configure(struct EG25Manager *manager) { for (guint i = 0; i < configure_commands->len; i++) { struct AtCommand *cmd = &g_array_index(configure_commands, struct AtCommand, i); - append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->expected, cmd->value); + append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->value, cmd->expected); } send_at_command(manager); } @@ -329,7 +329,7 @@ void at_sequence_suspend(struct EG25Manager *manager) { for (guint i = 0; i < suspend_commands->len; i++) { struct AtCommand *cmd = &g_array_index(suspend_commands, struct AtCommand, i); - append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->expected, cmd->value); + append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->value, cmd->expected); } send_at_command(manager); } @@ -338,7 +338,7 @@ void at_sequence_resume(struct EG25Manager *manager) { for (guint i = 0; i < resume_commands->len; i++) { struct AtCommand *cmd = &g_array_index(resume_commands, struct AtCommand, i); - append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->expected, cmd->value); + append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->value, cmd->expected); } send_at_command(manager); } @@ -347,7 +347,7 @@ void at_sequence_reset(struct EG25Manager *manager) { for (guint i = 0; i < reset_commands->len; i++) { struct AtCommand *cmd = &g_array_index(reset_commands, struct AtCommand, i); - append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->expected, cmd->value); + append_at_command(manager, cmd->cmd, cmd->subcmd, cmd->value, cmd->expected); } send_at_command(manager); }