Open ycsin opened 3 years ago
The GSM muxing is optional and not enabled by default in GSM modem driver. It should not be a big task to add another way of multiplexing the data in the drivers/modem/gsm_ppp.c
. Patches are welcome if you want to implement this.
I am investigating that way to switch between PPP and AT commands (using DTR pin) and I am facing some issues.
Once PPP is working, switching from PPP to AT commands requires to call (else cmd handler is not receiving data)
ret = modem_iface_uart_init_dev(&gsm2->context.iface, DEVICE_DT_GET(GSM_UART_NODE));
To go back into PPP mode (after ATO0 cmd), it seems we should call (from ppp.c) the following lines to get back to PPP:
struct ppp_driver_context *context; uart_irq_callback_user_data_set(context->dev, ppp_uart_isr, context); uart_irq_rx_enable(context2->dev);
Do you see a more conveniant and proper way to do that? Adding a new in _const struct pppapi with a .ppp_pause and ppp_resume? Using GSM_MUX feature with additionnal code?
Hi @bjarki-trackunit,
This issue, marked as an Enhancement, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person.
Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.
@ycsin you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.
Thanks!
Is your enhancement proposal related to a problem? Please describe. Currently,
gsm_ppp
uses DLCI to mux between PPP traffic and AT traffic. Quectel EC2X for example, doesn't support this, and switches from PPP to AT either by escape sequence:+++
to the UARTOK
replied from the modemor by gpio method:
OK
replied from the modemTo return to PPP:
ATO
CONNECT ...
message from the modemAlso, EC2X modem output its GPS NMEA messages from a debug UART port instead of DLCI.
Describe the solution you'd like A kconfig to switch between the DLCI method and the escape sequence/gpio sequence. However, different manufacturers might have different way of doing this and therefore this might becomes ugly in the future.
For the GPS, kconfig might be possible to switch between the DLCI and another UART port in the driver, however I'm not sure how can this be configured in the dts
Describe alternatives you've considered A seperate PPP driver for modem that doesn't support DLCI?