TECHSHIP IS A GLOBAL SUPPLIER OF WIRELESS COMPONENTS

Register

SIMCom SIM8200-M2-EVB2-KIT

Article Number: 11099
Brand: SIMCom
Supplier number: S2-108RE

NOTE This board does not contain any module, which needs to be bought separately.

The Manufacturer developer kit is intended for
11161, SIM8202G M.2 5G
11367, SIM8202E M.2 5G
11019, SIM8200EA M.2 5G

Developer kit for SimCom SIM820X 5G modules.

End-of-life

This product has reached
end-of-life and can not be
ordered any more.

Quantity Price

No prices available

For more information
please contact us at
sales-americas@techship.com

For larger quantities and complete pricing, please sign in or register

Subscribe to stay up to date with the latest about this product.

Subscribe to updates
Form Factor
M.2
Technology
5G

This guide describes the SIM8200 Series cellular modules AT control commands available and supported

Download

Uploaded at
2020-12-16 08:51:29
Last updated
2021-02-26 17:22:11
Version
V1.01
Related products
SIMCOM SIM8200EA-M.2 5G
SIMCom SIM8200-M2-EVB2-KIT
SIMCom SIM8200G 5G Sub-6 LGA
SIMCom SIM8202G-M.2 5G
SIMCom SIM8202E-M.2 5G

The SIM8200 Series Linux USB User Guide.

Download

Uploaded at
2021-07-09 14:02:55
Last updated
2021-07-09 14:02:55
Version
1.00
Related products
SIMCOM SIM8200EA-M.2 5G
SIMCom SIM8200-M2-EVB2-KIT
SIMCom SIM8200G 5G Sub-6 LGA
SIMCom SIM8202E-M.2 5G
SIMCom SIM8202G-M.2 5G

This application notes archive contains the following application notes:
FOTA v1.00
FTP(S) v1.00
HTTP(S) v1.00
Linux USB User Guide v1.00
MQTT(S) 1.00
Open Linux Sleep&Wakeup v1.00
SSL v1.00
TCPIP v1.00
TTS v1.00

Download

Uploaded at
2021-07-09 14:01:05
Last updated
2021-07-12 10:40:13
Related products
SIMCOM SIM8200EA-M.2 5G
SIMCom SIM8200-M2-EVB2-KIT
SIMCom SIM8200G 5G Sub-6 LGA
SIMCom SIM8202E-M.2 5G
SIMCom SIM8202G-M.2 5G
Question

Example on how to establish a data connection with Simcom SIM8202x-M2 series in Linux using MBIM network interface over USB

Solution

Example on how to establish a data connection with Simcom SIM8202x-M2 series in Linux using MBIM network interface over USB

5G technology introduces new requirements on the interface links between the host systems and cellular modules.
The Linux community continuously commit necessary changes to the kernel drivers and interface management tools to improve the compatibility and performance.
Because of this, it is important that you base your Linux system builds on up-to-date kernel versions, avoiding many problems already solved.

Ensure that you have up-to-date firmware version in the cellular module. Check the dedicated product page here at Techship and the firmware downloads tab or open a technical support ticket.

Early devices and engineering samples came with a older baseline firmware version and typically need to be updated in a Windows system.

This guide describes how to establish a MBIM data connection in Linux using libmbim library and mbimcli command line interface for SIM8202x-M2 series modules when connected over USB to the host system.
The cdc_mbim kernel driver module and libmbim library is used.

Ensure that you have the Simcom module in MBIM usb mode and cdc_mbim network kernel driver and option usb-serial driver properly loaded to the module interfaces.
It can be checked e.g. through dmesg, usb-devices or lsusb -t commands.

usb-devices
T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 3 Spd=5000 MxCh= 0
D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1
P: Vendor=1e0e ProdID=901e Rev=04.14
S: Manufacturer=QCOM
S: Product=SDXPRAIRIE-MTP _SN:
S: SerialNumber=
C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=techship_serial
I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=techship_serial
I: If#=0x2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
I: If#=0x3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=techship_serial
I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs

If the option serial drivers are not correctly loaded in your current system build and kernel version, you can try compile our modified option kernel driver module techship_serial from git link below and load them into your system build.
See the git readme files for details on pre-requirements, how to clone, compile and use the make file options to install the drivers.

They are available in the following git repository: https://bitbucket.org/storjor/techship_linux_drivers/

Refer to the mbimcli manual pages for details on the control commands that can be supported by the libmbim library and mbimcli command line interface. Note however that not all mbim commands are supported by all cellular module vendors and might be dependant on chipset families, firmware versions and additional vendor specific command etc.
https://www.freedesktop.org/wiki/Software/libmbim/

Example of how to set up a cellular data connection:
Note! A working MBIM network interface data connection requires that the MBIM control message tunnel is kept open at all time also.
To keep it open, start a new session with a mbimcli command, and keep the session open after the command execution by the --no-close attribute.
The Session ID / Transaction ID number (TRID) that is opened with the mbimcli command will be given back in the reply, save it for use in the next mbimcli command.
If the session ID linked to the network data connection is closed, then the data connection on the network interface will also be closed.

Check cellular RF radio status:
mbimcli -p -d /dev/cdc-wdm0 --query-radio-state --no-close
If not enabled, set it active:
mbimcli -p -d /dev/cdc-wdm0 --set-radio-state=on --no-close --no-open=##

Check SIM card subscriber state:
mbimcli -p -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close --no-open=##
If pin is needed, enter it using --enter-pin command:
mbimcli -p -d /dev/cdc-wdm0 --enter-pin=#### --no-close --no-open=##

Check cellular network registration state:
mbimcli -p -d /dev/cdc-wdm0 --query-registration-state --no-close --no-open=##

If not registered already, try using register automatic:
mbimcli -p -d /dev/cdc-wdm0 --register-automatic --no-close --no-open=##

Check the packet data service state:
mbimcli -p -d /dev/cdc-wdm0 --query-packet-service-state --no-close --no-open=##

If packet service state is not attached, use attach command:
mbimcli -p -d /dev/cdc-wdm0 --attach-packet-service --no-close --no-open=##

To to start a data connection use the connect command, with the desired parameters for PDP APN, IP type, auth details, etc.
mbimcli -p -d /dev/cdc-wdm0 --connect=apn='data.tre.se',ip-type='ipv4v6' --no-close --no-open=##

Bring down the MBIM network interface:
ip link set dev wwan0 down

Clear any existing IP address and routes:
ip -4 -6 address flush dev wwan0
ip -4 -6 route flush dev wwan0

The mbimcli connect command returns the IP, gateway, DNS, and MTU details for the data connection if established successfully.
Enter the IPv4 details to the network interface in the Linux host system, e.g.:
ip address add 2.70.103.209/30 dev wwan0
ip link set mtu 1500 dev wwan0

Enter the IPv6 details to the network interface in the Linux host system, e.g.:
ip -6 addr add 2a02:aa1:1021:b9d1:4fb:e1c9:589c:d53f/64 dev wwan0
ip -6 link set mtu 1500 dev wwan0

Enable the network interface:
ip link set dev wwan0 up

Apply appropriate network interface routing suitable for your use-case, e.g:
ip route add default dev
ip -6 route add default dev wwan0

You should now have a working cellular network data connection.

Test it e.g. by sending ping requests over the interface:
ping -I wwan0 8.8.8.8 -c 4
PING 8.8.8.8 (8.8.8.8) from 2.70.103.209 wwan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=224 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=42.7 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=30.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=119 time=38.4 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3006ms
rtt min/avg/max/mdev = 30.657/84.031/224.373/81.140 ms

ping -6 -I wwan0 2600:: -c 4
PING 2600::(2600::) from 2a02:aa1:1021:b9d1:8847:afd4:e35a:aa29 wwan0: 56 data bytes
64 bytes from 2600::: icmp_seq=1 ttl=52 time=173 ms
64 bytes from 2600::: icmp_seq=2 ttl=52 time=153 ms
64 bytes from 2600::: icmp_seq=3 ttl=52 time=152 ms
64 bytes from 2600::: icmp_seq=4 ttl=52 time=208 ms

--- 2600:: ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 152.108/171.523/208.073/22.623 ms

To stop the cellular data network connection use mbimcli disconnect command.
Use the Session ID from the previous mbimcli command reply in --no-open=## attribute, but do not include the --no-close attribute, doing so closes the session afterwards.
mbimcli -p -d /dev/cdc-wdm0 --disconnect --no-open=##


Bring down the interface:
ip link set dev wwan0 down

Clear any remaining IP address and routes:
ip -4 -6 address flush dev wwan0
ip -4 -6 route flush dev wwan0

It is up to the host application to manage and poll the connection state of the cellular module.
E.g. if the connection is lost temporarily due to no network coverage in the current location, the host application should tear down and re-establish the data connection when cellular module is registered in network again.

If the data connection fails for some reason several times, ensure that the connect retry attempts do not take place continuously without some extended delays in-between.
Depending on the cellular network operator, they can enforce lock-out on your subscription/device for certain time periods in order to protect the network from being flooded by requests.

You might also be interested in