TCP Connection with CMUX on SARA-U2

0 votes
Hello,

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?

Thanks,

Plamen
by defun asked Jun 19, 2017
162 views
0 votes

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 https://www.u-blox.com/en/files/muximplementationappnoteubx-13001887pdf

by grumpy answered Jun 19, 2017
by defun selected Jun 20, 2017
Flag
Best answer
Thanks,
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.