T-Mobile SIM with non-standard APN does not connect on Telit Modem [RESOLVED]
Goal
To establish a cellular connection using a custom T-Mobile APN that doesn't connect after the APN has been manually set on the device.
Setup
APNs that are not included on the standard firmware list must be programmed in manually before a device can properly join the intended cellular network. It has been observed that non-standard T-Mobile APNs (e.g. b2b.static) require an additional configuration change to establish a connection, specifically its MBIM context.
By following the sample configuration below, the required MBIM context can be automatically set using a custom script, allowing for seamless connectivity and carrier switching.
NOTE: It is critical that the SIM being used has been verified as active, and that its intended APN has been confirmed. For guidance with setting custom APNs, please refer to the staging for initial connectivity instructions.
Sample Configuration
After programming in the custom APN, perform the following steps:
- Under System -> Scheduled Tasks -> Custom Scripts, select add.
- Set a Label to identify the script (e.g. "MBIM_Change").
- Change Run mode to "Interval."
- Set Interval to "5m."
- Paste the following script into the commands section:
#!/bin/sh
wait_time=60
idx=
while [ "$idx" = '' -a "$wait_time" -gt 0 ]; do
idx=$(modem idx)
[ "$idx" ] && break
wait_time=$((wait_time - 1))
sleep 1
done
if [ "$idx" ]; then
if ! modem at '#mbimcfg?' | grep "1$"; then
accns_log w 'modem mbimcfg needs updating. doing so now'
modem at '#mbimcfg=1'
fi
fi
![](https://media.screensteps.com/image_assets/assets/002/147/782/original/1527163b-f0e6-45d6-818b-dba4df85dc22.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVNY36S4EK3YMWFAE%2F20240911%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240911T215249Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=dc4eec638b35abf1de76fdc6567fea6edd3627743ddfd2aac9de053d3a981b10)