My main board is powered with TI OMAP CPU, which provides a USB port for external networking device.
I mount MC7354 on Sierra wirless development board and connect to USB board. My main board runs Linux kernel, version 3.12.40.
System boots up ok, and qmicli (from libqmi) can establish a cellular data link with network - i can ping to any.
But seems I am not able to download a file - no data coming to modem - I can confirm that by monitoring the interrupt to USB port. Look like when I download a file, a big chunk of data from server (size = 1514) coming to modem and suddenly freeze the modem’s receiver. Wireless server sets its MTU=1500 , therefore modem receives a few of 1514 packets and stops receiving afte 1 or 2 seconds
I check MTU on wwan0 and saw it sets to 1430. I changed MTU to 1500 and seems working but performance is not consistent - sometime I can achive 60Mbps and sometime I can achieve 90Mbps.
MTU is only for sending data out - why does it affect to incoming traffic - Anyone knows why wwan0 has MTU is set to 1430 when modem establish a cellular link with network ? Is there any AT command to control MTU and MSU (max segment unit) in modem ?
I don’t think there is any AT command to set MSU and MTU
The QMI information should contain the correct MTU for the data connection, often 1428. That MTU needs to be configured on the Linux wwan0 interface. The Ethernet default of 1500 will not work properly. Either fragmentation will occur (slow) or the modem will receive garbage packets and discard them. On our 7354, we see the modem receiving the tail end of packets instead of a truncated packet. Run tcpdump on wwan0 to see the fragmented or garbage packets.
The MTU is used to build the correct TCP MSS value for establishing connections out from your device. There are standard ICMP messages to try and correct the endpoints for smaller MTUs in the path, but networks often seem to mishandle or drop them. Google for MSS clamping for more information. We had to add iptables rules to ensure connections through our device worked properly.
Thank you very much for your hint, Jeff.
I applied TCP MSS clamping and it works well - I can download a big file at the rate of ~90Mbps. It is great.
Rule that I applied to wwan0 interface:
iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o wwan0 -j TCPMSS --clamp-mss-to-pmtu