M.2 Key B Telit LN940 A11 using SIM Card slot


(reckvigo2) #1

Hello,

Thank you for the wonderful board. I can complain only about the SPI ROM software, windows programs and not very well ordered wiki. If you don’t own a Linux and Windows and USB-C on some PC/Laptop, you are not running this thing for the first time ever. Last and not least complain 99% of us customers buy this board to use it as a Headless server or router, we need clean debian minimal image and the procedure to build such from scratch. We absolutely hate “MATE X” and all graphical managers. Take a note how raspberry pi is distributing minimal raspbian. At least 5 threads on the forum’s first page about that problem.

Here comes my real problem: Telit LN940 A11 4G LTE Module I have around. I did recompile the W2 kernel included qmi_wwan patches for RAWIP added the telit “1bc7:1900”, also to option.c in usb_serial. Patched dhcp 4.3.5 with RAWIP support. If I connect the LN940 via “M.2 KeyB” => “USB 3.0” => “W2’s USB 3.0”. SIM Card inside the M.2 => USB3 converter. I have successful connection and the module works okay.

If I connect the LN940 M.2 Key B => “W2’s Key B”, the module is recognized perfectly, you can talk to it with AT commands to /dev/ttyUSB0-2, but the SIM card on the W2 board is not recognized by the LN940 M.2 module. I feel like I need to enable something either in the kernel or some GPIOs to enable SIM Card slot ? Last resort is resolder the SIM card holder or use a M.2 vertical extender with Sim Card holder ?

I tried to connect to the LN940’s AT terminal, check if I can choose different SIM slots, but only slot 0 is available and it’s not recognizing any SIM Card I have around. Please advise what is needed to get the SIM Card Slot on W2 working, not afraid of developing and testing.

My hope was to use the LN940 with hwnat to eth0, will that ever be possible or hwnat can only work between ETH interfaces ?

Best Regards and keep up the good work.


(reckvigo2) #2

sinovoip in private conversation sent me the correct way to insert simcard: w2%20sim%20card

  1. sim card Insert inside out

I tried. Same result, sim card is not detected by the module. I issued multiple restarts, always putting the card and module when the board is powered off completely.

Can i check with multimeter the pins of the simcard to the M.2 USB module ? can you advise which pins should be connected to which ?

The board was delivered with the box a little bit damaged, so far everything works only the simcard is not recognized.

1523022920

With this USB3.0 to M.2 Key B adapter the module is detected and the SIM card as well.

root@bpi-w2:~# lsusb
Bus 004 Device 002: ID 1bc7:1900 Telit Wireless Solutions

wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.74.242.80  netmask 255.255.255.224  destination 10.74.242.80
        inet6 fe80::7a56:3997:88f4:bf6f  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 642216  bytes 847768012 (847.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 312168  bytes 45169113 (45.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[   15.573975] option 4-1:1.0: GSM modem (1-port) converter detected
[   15.574248] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB0
[   15.587443] qmi_wwan 4-1:1.1: cdc-wdm0: USB WDM device
[   15.588131] qmi_wwan 4-1:1.1 wwan0: register 'qmi_wwan' at usb-xhci-hcd.7.auto-1, WWAN/QMI device, 72:fa:10:2d:68:0a
[   15.588513] option 4-1:1.2: GSM modem (1-port) converter detected
[   15.589204] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB1
[   15.589679] option 4-1:1.3: GSM modem (1-port) converter detected
[   15.590504] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB2

I found AT$QCSIMSTAT and i checked what are the results with the onboard SIM holder I get “SIM ERROR” with the USB3.0 <-> M.2 converter I get SIM INIT COMPLETED.

AT$QCSIMAPP is for changing SIM SLOT (0,1,2) but only 0 says “OK”, 1,2 give ERROR. When I select the 0 with the onboard SIM holder it says “No Service”, e.g. when the sim card is missing.


#3

(reckvigo2) #4

@jofri

I managed to get

EM7455 Sierra Wireless M.2 module ( MC7455 will work also with mPCIe to M.2 adapter)

Telit LN940 M.2 Module

working on the BPI-W2 board, using the internal BPI-W2 sim card holder.

I masked the following pins with tape (nail polish should work as well):

on the top side 23 25 27 29 31 ( USB3.0 lines + GNDs)

on the bottom side 66 64 62 60 58 56 ( SIM Detect + COEX )

However I had to patch serial/option.c in the linux kernel and qmi_wwan.c to include the modules VID and PID. I had to patch dhcp 3.4.5 version with RAW IP support as well. There are some gotchas about the modems like the USB Composition mode, e.g. the modems can represent themself as QMI (works on Linux) or MBIM (Works on Windows 10 but also on Linux with special mbim ip script) and NMEA port(not researched enough on it), some modems have RNDIS(modem appears as eth1 device with NATed local ip 192.168.225.4). You have to connect with AT and set up the appropriate mode for your needs, for example QMI has the best performance on linux (mbim is fine also if you want to switch the modem to a windows machine often).

I will advice to disable NetworkManager and ModemManager, they will often cause trouble and will provide instability and scenarios you don’t want to deal with, qmicli and qmi-network work just fine. /etc/qmi-network.conf contains APN=internet

Have in mind that 4G LTE modems get extremely hot if you pass a high throughput internet. You might get an “Vertical M.2 extender board” from bplus.com.tw that will physically put the module a bit far from the BPI-W2 board, you can peel off the M.2 module sticker and put a passive/active cooler with or without fan.

Some EM7455 specific AT commands you might be interested in:

#enter password to enable commands  
AT!ENTERCND="A710"  
#disable secondary sim card,  note that Sierra Wireless is not following specification for secondary sim and it might be dangerous for various motherboards with M.2 socket   
AT!CUSTOM="UIM2ENABLE",0   
#disable ipv6, we are still in 2019, i doubt you will need it   
AT!CUSTOM="IPV6ENABLE",0  
#disable gps, who needs that?  
AT!CUSTOM="GPSENABLE",0    
#low power mode for gps   
AT!CUSTOM="GPSLPM",0  
#prl region 1 is Europe, check the documentation for other regions  
AT!CUSTOM="PRLREGION",1

Some other AT commands you might find interesting:

### TELIT LN940
AT^SETMODE=0
#Default mode, MBIM interface only for Windows (Normal mode)
AT^SETMODE=1
#MBIM mode with serial interfaces   (Extension mode)
AT^SETMODE=2
#QMI/RMNET with serial interfaces (Legacy mode)
#
### MC7455 // EM7455
# MBIM
AT!ENTERCND="A710"
AT!USBCOMP=1,1,100D
AT!RESET
# QMI
AT!ENTERCND="A710"
AT!USBCOMP=1,1,10D
AT!RESET