TCP Connection with CMUX on SARA-U2

0 votes

My goal is to establish direct TCP connection with SARA-U201 (all UART data is interpreted as RX/TX from the TCP socket). But I would like to have API to retrieve GNSS data from the GPS module as well. I try to achieve it with the CMUX protocol using 2 DLCs. Channel 1 would be the direct TCP connection, Channel 2 for AT commands to reference the GPS. I used the gsm0710.c implementation as a reference for the MUX implementation and overall it seems to work - I can communicate with HDLC wrapped data with 2 separate DLCs. But when I try to TCP connect in MUX mode, SARA-U2 doesn't respond with anything (AT+USOCO=0,"ip",port). The same sequence of commands works in direct mode.

Is there limitation of what can be used in MUX mode or it is just some defect in my implementation?


asked 2 days ago by defun

1 Answer

0 votes
Best answer

MUX just splits single UART into multiple ports allowing for data and command interfaces to be separated.  I have not tried it but you should be able to have data connection on one of the ports.  Maybe worth checking u-blox app note from

answered 2 days ago by grumpy Senior Principal Expert
selected 2 days ago by defun
I've found my mistake - all works perfectly now.

I entered mux mode with AT+CMUX=0 and left all parameters to default - the max frame size defaults to 31. The GSM silently drops frames larger than that, although they have correct frame structure. AT+CMUX=0,0,0,512 fixed it.