Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modem): Refactor of DTE callbacks (and other fixes) #312

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

david-cermak
Copy link
Collaborator

@david-cermak david-cermak commented Jun 23, 2023

  • Simplifies network switching
  • Implements inflatable buffer in CMUX and CMD mode
  • Sets the ground for URC handling in the library
  • Fixes potential data races (adding an extra mutex)

TODO

  • Cleanup, naming
  • Make inflatable buffer configurable
  • Simplify Term and Netif -- no need for event flags anymore

diplfranzhoepfinger pushed a commit to diplfranzhoepfinger/esp-protocols-tree-master-components-esp_modem-examples-simple_cmux_client that referenced this pull request Jul 18, 2023
@david-cermak
Copy link
Collaborator Author

@david-cermak david-cermak force-pushed the fix/minor_modem_refactor branch from 4652526 to 22da99a Compare August 17, 2023 11:06
@david-cermak
Copy link
Collaborator Author

Thanks for the review @euripedesrocha !

@david-cermak david-cermak force-pushed the fix/minor_modem_refactor branch from 22da99a to db9f3f3 Compare August 17, 2023 13:45
@david-cermak david-cermak force-pushed the fix/minor_modem_refactor branch from db9f3f3 to ad8bb62 Compare August 28, 2023 07:27
As a configurable option, if disabled we report an error.

Closes espressif#272
Removes PPP_started signal on reception, since lwip handles data
reception if the netif is up/down (which we correctly set in start()
stop() methods)

Closes espressif#308
This allows calling directly:
auto dce = dce_factory::Factory::create_unique_dce_from<SIM7600>(&dce_config, uart_dte, esp_netif);
instead of:
auto dce = create_SIM7600_dce(&dce_config, uart_dte, esp_netif);
Which is very useful when adding a custom module, so we won't need to
update factory layers and add the new device to enums, etc.
To add a new module, you just:
1) Define the module class NewModule: public GenericModule { };
2) Implement the specific commands:
command_result do_work_new_module(CommandableIf *t, params) {}
3) Connect 1) and 2)
command_result NewModule::do_work_new_module(params...)
{
    return dce_commands::do_work_new_module(dte.get(), params...);
}
@david-cermak david-cermak force-pushed the fix/minor_modem_refactor branch from ad8bb62 to 4cf9e50 Compare August 28, 2023 08:27
@david-cermak david-cermak merged commit 9cc594a into espressif:master Aug 28, 2023
41 checks passed
@tore-espressif
Copy link
Collaborator

@david-cermak This change is breaking DUAL_MODE for USB modems. Is there any reason why the DTE constructor cannot initialize DUAL_MODE anyomore? cb6e03a#diff-d13893478ad7bd229158ba84355f1d361f2afd680a28605a304de8945280ce0d

Related issue espressif/idf-extra-components#249

@david-cermak
Copy link
Collaborator Author

@david-cermak This change is breaking DUAL_MODE for USB modems. Is there any reason why the DTE constructor cannot initialize DUAL_MODE anyomore? cb6e03a#diff-d13893478ad7bd229158ba84355f1d361f2afd680a28605a304de8945280ce0d

Related issue espressif/idf-extra-components#249

Oh, I missed that. This really is just a copy-paste error. I'll fix it.

It seems we really need at least one CI runner with a USB device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants