How to use BPI-4G LTE module with BPI-R2

Just curious to know if this 4G module is compatible with Raspberry pi board?.

probably not, but if you add driver to the code, possibly yes.

Hi. I am using Ubuntu 16.04 image and run the quectel program with 4G module. I am getting the following which I could not understand why the wwan0 disappear when we call dhclient,

> [email protected]:~/quectel-CM# ./quectel-CM &
> [1] 15185
> [05-02_18:34:11:572] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.34
> [05-02_18:34:11:572] ./quectel-CM profile[1] = (null)/(null)/(null)/0, pincode = (null)
> [05-02_18:34:11:573] Find /sys/bus/usb/devices/1-1 idVendor=2c7c idProduct=0125
> [05-02_18:34:11:573] Find /sys/bus/usb/devices/1-1:1.4/net/wwan0
> [05-02_18:34:11:573] Find usbnet_adapter = wwan0
> [05-02_18:34:11:573] Find /sys/bus/usb/devices/1-1:1.4/usbmisc/cdc-wdm0
> [05-02_18:34:11:573] Find qmichannel = /dev/cdc-wdm0
> [email protected]:~/quectel-CM# [05-02_18:34:11:713] cdc_wdm_fd = 7
> [05-02_18:34:11:813] Get clientWDS = 19
> [05-02_18:34:11:845] Get clientDMS = 1
> [05-02_18:34:11:877] Get clientNAS = 3
> [05-02_18:34:11:910] Get clientUIM = 1
> [05-02_18:34:11:941] Get clientWDA = 1
> [05-02_18:34:11:973] requestBaseBandVersion EC25EFAR02A08M4G
> [05-02_18:34:12:070] requestGetSIMStatus SIMStatus: SIM_READY
> [05-02_18:34:12:101] requestGetProfile[1] www///0
> [05-02_18:34:12:136] requestRegistrationState2 MCC: 404, MNC: 84, PS: Attached, DataCap: LTE
> [05-02_18:34:12:165] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
> [05-02_18:34:12:230] requestRegistrationState2 MCC: 404, MNC: 84, PS: Attached, DataCap: LTE
> [05-02_18:34:12:293] requestSetupDataCall WdsConnectionIPv4Handle: 0x879a1100
> [05-02_18:34:12:357] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
> [05-02_18:34:12:390] ifconfig wwan0 up
> [05-02_18:34:12:400] busybox udhcpc -f -n -q -t 5 -i wwan0
> [05-02_18:34:12:406] udhcpc (v1.22.1) started
> [05-02_18:34:12:474] Sending discover...
> [05-02_18:34:12:614] Sending select for 10.66.46.245...
> [05-02_18:34:12:744] Lease of 10.66.46.245 obtained, lease time 7200
> 
> [email protected]:~/quectel-CM# dhclient wwan0
> [email protected]:~/quectel-CM# [05-02_18:34:24:204] QmiWwanThread poll err/hup/inval
> [05-02_18:34:24:204] poll fd = 7, events = 0x0018
> [05-02_18:34:24:204] QmiWwanThread exit
> [05-02_18:34:24:204] ifconfig wwan0 down
> wwan0: ERROR while getting interface flags: No such device
> [05-02_18:34:24:235] main exit

Any kind of help is appreciated. TIA.

Hello,it looks strange, when you use dhcp to get IP, but /quectel-CM exit, let me have a look.

Hello,Could you please show these logs?

  1. Do this command to check device:ls /dev/ttyUSB*

  2. After you execute ./quectel-CM &,and after you dhclient wwan0,if wwan0 is down,please check device again:ls /dev/ttyUSB*

  3. if /dev/ttyUSB* is exist, please do minicom -D /dev/ttyUSB2, and do these commands to check 4g module statue:

  • at+csq
  • at+ccid
  • at+cgreg?

Hi. Check my reply.

  1. ls /dev/ttyUSB*

    ls: cannot access ‘/dev/ttyUSB*’: No such file or directory

  2. quectel-cm quit, because of no wwan0 device and gives same result for “ls /dev/ttyUSB*”.

  3. Not able to do since there was no wwan0.

so your image don’t recognise the 4g module? you don’t have /dev/ttyUSB*?

@Jackzeng No. The module initially mounted on the ttyUSB0-3 and automatically unmounted only after I call quectel-cm & dhclient wwan0. My dmesg message is as follows,

> [   83.279885] i2c /dev entries driver
[   86.865460] xhci-mtk 1a1c0000.usb: xHCI host not responding to stop endpoint command.
[   86.865602] xhci-mtk 1a1c0000.usb: Assuming host is dying, halting host.
[   86.866204] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.866390] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.866547] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.866697] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.867029] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.867181] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.867331] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.867487] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[   86.867836] qmi_wwan 1-1:1.4: Tx URB error: -22
[   86.868564] qmi_wwan 1-1:1.4: Tx URB error: -22
[   86.869260] qmi_wwan 1-1:1.4: Tx URB error: -22
[   86.869882] xhci-mtk 1a1c0000.usb: HC died; cleaning up
[   86.869979] qmi_wwan 1-1:1.4: Tx URB error: -22
[   86.870710] usb 1-1: USB disconnect, device number 2
[   86.879981] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[   86.880438] option 1-1:1.0: device disconnected
[   86.888800] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[   86.888892] option 1-1:1.1: device disconnected
[   86.891991] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[   86.892081] option 1-1:1.2: device disconnected
[   86.896328] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[   86.896414] option 1-1:1.3: device disconnected
[   86.896735] qmi_wwan 1-1:1.4 wwan0: unregister 'qmi_wwan' usb-1a1c0000.usb-1, WWAN/QMI device
[   86.946338] Alignment trap: not handling instruction e8503f00 at [<b6ac0ca4>]
[   86.946379] Unhandled fault: alignment exception (0x001) at 0x65676173
[   86.946387] pgd = db280000
[   86.946393] [65676173] *pgd=00000000

TIA.

It is even automatically disconnected shortly after I reinserted the 4G module. Check my updated dmesg log.

> [ 1878.359005] usb 3-1: new high-speed USB device number 2 using xhci-mtk
[ 1878.539129] option 3-1:1.0: GSM modem (1-port) converter detected
[ 1878.540371] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1878.541375] option 3-1:1.1: GSM modem (1-port) converter detected
[ 1878.542313] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1878.542811] option 3-1:1.2: GSM modem (1-port) converter detected
[ 1878.543910] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 1878.544392] option 3-1:1.3: GSM modem (1-port) converter detected
[ 1878.545542] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 1878.549750] qmi_wwan 3-1:1.4: cdc-wdm0: USB WDM device
[ 1878.549777] qmi_wwan 3-1:1.4: Quectel EC25 work on RawIP mode
[ 1878.551531] qmi_wwan 3-1:1.4 wwan0: register 'qmi_wwan' at usb-1a240000.usb-1, WWAN/QMI device, a2:47:39:3d:2d:11   
[ 1897.628386] xhci-mtk 1a240000.usb: xHCI host not responding to stop endpoint command.
[ 1897.628528] xhci-mtk 1a240000.usb: Assuming host is dying, halting host.
[ 1897.629144] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.629327] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.629481] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.629633] option1 ttyUSB0: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.629915] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.630071] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.630222] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.630373] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.630648] qmi_wwan 3-1:1.4: Tx URB error: -22
[ 1897.630766] option1 ttyUSB2: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.630923] option1 ttyUSB2: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.631076] option1 ttyUSB2: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.631226] option1 ttyUSB2: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.631522] option1 ttyUSB3: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.631696] option1 ttyUSB3: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.631852] option1 ttyUSB3: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.632003] option1 ttyUSB3: usb_wwan_indat_callback: resubmit read urb failed. (-22)
[ 1897.632228] xhci-mtk 1a240000.usb: HC died; cleaning up
[ 1897.633014] usb 3-1: USB disconnect, device number 2
[ 1897.639833] qmi_wwan 3-1:1.4: Tx URB error: -19
[ 1897.640603] qmi_wwan 3-1:1.4: Tx URB error: -19
[ 1897.641248] qmi_wwan 3-1:1.4: Tx URB error: -19
[ 1897.643776] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 1897.644315] option 3-1:1.0: device disconnected
[ 1897.650978] qmi_wwan 3-1:1.4: Tx URB error: -19
[ 1897.651593] option1 ttyUSB3: usb_wwan_open: submit int urb failed: -19
[ 1897.651615] option1 ttyUSB3: usb_wwan_open: submit read urb 0 failed: -19
[ 1897.651624] option1 ttyUSB3: usb_wwan_open: submit read urb 1 failed: -19
[ 1897.651633] option1 ttyUSB3: usb_wwan_open: submit read urb 2 failed: -19
[ 1897.651641] option1 ttyUSB3: usb_wwan_open: submit read urb 3 failed: -19
[ 1897.652715] option1 ttyUSB2: usb_wwan_open: submit int urb failed: -19
[ 1897.652731] option1 ttyUSB2: usb_wwan_open: submit read urb 0 failed: -19
[ 1897.652739] option1 ttyUSB2: usb_wwan_open: submit read urb 1 failed: -19
[ 1897.652747] option1 ttyUSB2: usb_wwan_open: submit read urb 2 failed: -19
[ 1897.652756] option1 ttyUSB2: usb_wwan_open: submit read urb 3 failed: -19
[ 1897.654660] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 1897.654713] option 3-1:1.1: device disconnected
[ 1897.655549] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 1897.655588] option 3-1:1.2: device disconnected
[ 1897.656388] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 1897.656436] option 3-1:1.3: device disconnected
[ 1897.656693] qmi_wwan 3-1:1.4 wwan0: unregister 'qmi_wwan' usb-1a240000.usb-1, WWAN/QMI device

Sorry for the late reply, I could give you a update package, Could you please have a try? I will give the links later.

https://pan.baidu.com/s/1eccguRxOKGtBtKZI21XF5g

@Jackzeng Not able to download this file.

sorry,I’ll upload the files on google,tomorrow

@Jackzeng Thanks. I also found another issue is that, whenever I use the soft reset “reboot” command, the BPI-R2 reset without any issue. However, the 4G module is mounted even after mounted and got the IP address; But internet is not working. I use hard reset or power ON/OFF, then the 4G module is working fine with internet facility. Let me know your input if any on this issue and If I have any other better way to reset the hardware by some other command?.

TIA.

Hello,

  1. these are update files & tool
  1. Did you mean when you reset the R2, you also want to reset 4G module?

@Jackzeng Thanks for these updated files. Let me check it and get back to you.

  1. Yes, I want to reset the 4G module as well.

Also like to know whether I should update the firmware on the 4G module by using this update tool?. Any kind of instructions is appreciated.

TIA.

is here any plan to support multiple 4G /LTE cards/connections on this module, after all , this is a router , one 4G connection may not be enough to be shared among those interfaces ?
or is there any solid workaround for this ?

Hello,

I have just bought the BPI-4g module, however there are no instructions or any documentation with it at all.

It seems to be a newer model with two USB connectors. What is the purpose of having 2 ports? Which one to use?

I plan to use the module on the R2 OTG port, which cable would i use? I cannot find any MicroUSB male to MicroUSB male cable anywhere.

With the added second USB connector, the two holes to fix the board are gone. How do you expect to secure the board? Is there any area of the board where holes can be drilled to fix the board without damaging it?

Thanks

http://wiki.banana-pi.org/Using_4G_module_with_BananaPi

I know that page, however none of my questions is being answered there.