I’m currently working on integrating a BG95 to an embedded linux using QMI_WWAN driver.
My issue is that QMI_WWAN driver does not detect my BG95 module when I power it on.
My linux kernel version is 5.3.18, and I used the qmi_wwan driver sources given by Quectel (version 1.1)
Dmesg log :
usb 2-3: new full-speed USB device number 10 using at91_ohci
usb 2-3: not running at top speed; connect to a high speed hub
usb 2-3: New USB device found, idVendor=2c7c, idProduct=0700, bcdDevice= 0.00
usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
usb 2-3: Product: Quectel LPWA Module
usb 2-3: Manufacturer: Quectel, Incorporated
usb 2-3: SerialNumber: eed9d289
When enabling kernel module QMI_WWAN :
root@mybali:~# modprobe qmi_wwan
usbcore: registered new interface driver qmi_wwan
But when I check for
/dev/cdc-wdm0 device, there’s no such device.
After some research I found out that it might be because the modem is not in “qmi mode” : usbnet config is not set to “rmnet” (currently set to “modem”) but I can’t configure it !
Changing from “modem” to “ecm” works, but not from “modem” to “rmnet”
My BG95 firmware is BG95M3LAR02A03_01.012.01.012, I would prefer to avoid updating it.
So my 2 questions are :
- Why can’t I set “usbnet” to “rmnet” ?
- Is it the source of my issue, or coould there be other causes ?
Any help would be very welcome,
Is “rmnet” in the list of supported modes reported by the
AT+QCFGEXT=? test syntax of the command?
You’re right thank you ! The list given by the modem is
+QCFGEXT: "usbnet"[,"ecm,modem"] which probably means that there is no “rmnet” support (at least for this firmware version)… is there still a way to use QMI with this modem without updating it ?
I also tried with MBIM kernel driver without success (nothing happen when I power on the BG95 with usbnet in “modem” mode)
In case it helps: there is slightly newer firmware BG95M3LAR02A03_01.014.01.014 available (see BG95-M3 latest firmware version) which supports +QCFGEXT: “usbnet”[,“ecm,modem,rmnet”].
Please note that the QMI implementation on a Qualcomm MDM9205-based device like the BG95M3 typically only provides a rather limited WDS functionality which does not include WDSStartNetworkInterface.
Ideally, we’d like to avoid updating the firmware (because it implies some issues for our production partner), but it seems like there is no other option so I’m probably gonna go for it
I don’t really understand the second part of your answer : initially, we used ppp with a UG95 (which isn’t available anymore) to see the modem as an interface and access to the internet. This is the only purpose of our GSM module : establish an internet access to get few data, and retrieve some connection infos such as RSSI.
Do you mean that using QMI, I wont be able to see my modem as an interface and wont be able to access internet easily ?
In the usbcfg rmnet case you would have to start pppd on the single AT/Modem port available and you could use /dev/cdc-wdm0 to check RSSI etc. with QMI NASGetSIgnalInfo etc. while pppd is active.
In the usbnet modem case you would have to start pppd on one of the two available AT/Modem ports and you should be able to use AT commands to check RSSI etc. on the other AT/Modem port while pppd is active.
HTH for clarification.
Thanks for the clarification, it makes me realize that I didn’t explain the initial issue and why I’d like to use QMI, and also that I was a bit lost with the technical terms.
The initial issue is that I wanted to use the BG95 in usbnet modem config, with ppp on a port for internet connection and another AT port for checking rssi, … but only one AT/modem port is available, I contacted Quectel support which said that I had to update my firmware (from v012 to v016) to get access to the other AT port. However I’d prefer not update my BG95 (quite difficult with my current setup, and might be difficult as well on production lines)
Since I couldn’t use both ppp and have another AT port available, and also because ppp is becoming deprecated, I decided to try to switch to another program. That’s where I think I’m a bit lost, I think the alternative to ppp is modem manager (might be wrong) which needs QMI or MBIM kernel driver. That’s why I’m trying to use QMI (also tried mbim but didnt work either).
Any clarifications about that would be greatly appreciated,
Have you tries the classical way to send AT with a PPP connection?
Suspend the PPP connection by sending [the +++ escape sequence:]
" To switch from data mode to command mode, sessions sent an escape sequence string of three plus signs ("+++") followed by a pause of about a second. The pause at the end of the escape sequence was required to reduce the problem caused by in-band signaling: if any other data was received within one second of the three plus signs, it was not the escape sequence and would be sent as data. To switch back they sent the online command, “ATO”. In actual use many of the commands automatically switched to the online mode after completion, and it is rare for a user to use the online command explicitly."
If the modem comes back with OK, you are back in command mode. If it comes back with NO CARRIER, then this method will not work as it has hung up.
Assuming it comes back with OK, you can now send your AT+CSQ command (or any others).
When done, use this to re-enter the PPP data state: ATO
I think it is described in the BG95 - PPP application note as well.
@thibault_lefebvre have you figured this out? I’m having the same problem.
We ended up deciding that updating the BG95 firmware was an acceptable solution. By updating from BG95M3LAR02A03_01.012.01.012 to BG95M3LAR02A03_01.015.01.015 we had a second at port in
"usbnet" : "modem" config mode, which solved our initial issue (we needed two AT ports but had only one available, as explained before). I think this update also allow the modem to be configured in
"usbnet" : "rmnet" mode, which should allow you to communicate with your modem through QMI.
Hope this will help, in the end the only solution we found was to update, sorry
@thibault_lefebvre BG95 doesn’t seem to support usbmode
rmnet. I tried everything and always get
ERROR when trying to set it to that mode. I’m on the latest version of the firmware: V0204_01.003.01.003. usbmode
ecm works fine though, only that after setting it to that mode
ttyUSB3 go away, leaving you with no other option to send AT commands than the main UART, which is not wired in my prototype board (FML, I’m stuck in
ecm mode now).
Quectel support told me the latest fw version was BG95M3LAR02A03_01.016.01.016, I dont know about the beginning of your version string (V204) but the end makes me think you are using the 003 version while the latest is 016…
BG95 does support
rmnet but only from v013 I think (I use v015 and I can set it through
For your loss of
ttyUSB, you might simply solder wires on the RX and TX main uart pins. If that’s not possible I dont know what to suggest to you, you should directly contact Quectel support by mail to have a dedicated support.
Hope you’ll figure all of this out
Where did you get BG95M3LAR02A03_01.016.01.016 from?
I didn’t use the v016, I think I used the 014 or 015 version, and found it somewhere on the quectel forum. Quectel staff often share links to get specific versions in posts.
If you want specifically the 016 and can’t find it, I suggest you to ask Quectel directly