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

Integration of USB PPPoS + USB AT command integration (AEGHB-71) #222

Closed
abhi-ratnman opened this issue Oct 6, 2022 · 10 comments
Closed

Comments

@abhi-ratnman
Copy link

Hello, I have tested both the PPPoS over USB and AT commands over USB using the examples provided. Now i wanted to ask that, if i want to do both using the same USB port is it possible? What are the thing i will need to take care while integration of both? Do i need to turn off the data mode of PPPoS before sending AT commands?

Also are both the examples thread safe?

@leeebo your support will be highly appreciated

@ankit-thealchemist
Copy link

yes mostly is it natively thread safe?

@leeebo
Copy link
Collaborator

leeebo commented Oct 6, 2022

@abhi-ratnman Yes using same USB port with two modes is possible.

For some modems with only one modem interface(support AT+PPP), you need to using command like +++ to change to AT mode, then using ATO back to PPP mode.

While some modems support both modem interface and a secondary AT interface, you can using AT and PPP at the same time.

@abhi-ratnman
Copy link
Author

@leeebo we're using sim7672x module. So it is supported by the example

@ankit-thealchemist
Copy link

Is usb cdc host library thread safe? We are most probably sending the commands from different threads.

@leeebo
Copy link
Collaborator

leeebo commented Oct 8, 2022

Is usb cdc host library thread safe? We are most probably sending the commands from different threads.

USB CDC host library is thread-safe, but dce_common_commands API is not thread-safe, you need to add an external mutex to sending->waiting->handling from different threads

@ankit-thealchemist
Copy link

@leeebo Thanks for quick reply!
we are mostly sending the AT commands over the cdc, which we tested using the example usb cdc host.
https://github.com/espressif/esp-iot-solution/blob/usb/add_usb_solutions/examples/usb/host/usb_cdc_basic/main/usb_cdc_basic_main.c

@ankit-thealchemist
Copy link

@abhi-ratnman Yes using same USB port with two modes is possible.

For some modems with only one modem interface(support AT+PPP), you need to using command like +++ to change to AT mode, then using ATO back to PPP mode.

While some modems support both modem interface and a secondary AT interface, you can using AT and PPP at the same time.

@leeebo Thanks for the help!!

Could you give the example, how to route the at commands to the secondary AT interface, say endpoints are IN 0x82 and out 0x0C for secondary at interface

@abhi-ratnman
Copy link
Author

hi @leeebo any update?

@leeebo
Copy link
Collaborator

leeebo commented Feb 15, 2023

@abhi-ratnman @ankit-thealchemist For the new iot_usbh_modem driver, you can config it through menuconfig https://github.com/espressif/esp-iot-solution/blob/master/components/usb/iot_usbh_modem/Kconfig#L77

@github-actions github-actions bot changed the title Integration of USB PPPoS + USB AT command integration Integration of USB PPPoS + USB AT command integration (AEGHB-71) Feb 15, 2023
@leeebo leeebo added the Inactive label Oct 9, 2023
@leeebo leeebo closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants