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

(ZB) #41

Hello,it’s probably your gateway is not right,this is your wwan0 :

But your gateway is this:

Could you please change your gateway ip as :

(Prakash) #42


  • I moved the default.script file from quectel-CM folder into /usr/share/udhcpc/
  • Then my log is as follows.
#netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 wwan0 U         0 0          0 wwan0     U         0 0          0 docker0     U         0 0          0 docker0
root@bpi-iot-ros-ai:~/quectel-CM# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 wwan0   *      U     0      0        0 wwan0
link-local      *          U     1000   0        0 docker0      *          U     0      0        0 docker0

I think the gateway is looking fine. Still I need to modify anything?. Here is the tcpdump for wwan0 log,

I am quite disappointed that why it is not working for me.

Thanks for the guidance from everyone.

(Prakash) #43

Some improvements. I moved the default.script file from quectel-CM folder into /usr/share/udhcpc/ Then restarted and ping the IP Its working. Others are not working.

root@bpi-iot-ros-ai:~/quectel-CM# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=45 time=1130 ms
64 bytes from icmp_seq=2 ttl=45 time=158 ms
64 bytes from icmp_seq=3 ttl=45 time=67.2 ms
64 bytes from icmp_seq=4 ttl=45 time=65.4 ms
64 bytes from icmp_seq=5 ttl=45 time=64.7 ms
64 bytes from icmp_seq=6 ttl=45 time=61.9 ms
--- ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5012ms

(Prakash) #44

:astonished: I am wondering whats going on here. I am not able to ping or even other sites. Then I thought the internet is not working and wasted all our time here. But I can perfectly download anything from internet.

My speedtest is as below,

root@bpi-iot-ros-ai:~# ./speedtest-cli 
Retrieving configuration...
Testing from Vodafone India (
Retrieving server list...
Selecting best server based on ping...
Hosted by Vodafone India (Chennai) [1.37 km]: 64.49 ms
Testing download speed................................................................................
Download: 22.85 Mbit/s
Testing upload speed................................................................................................
Upload: 13.52 Mbit/s                                                           g

(ZB) #45

if you can connect the internet by Ip addr,but can’t by domain,it’s probably something wrong with DNS configuration.

(Wolfgang) #46

Looks to me like DNS is in fact working, however maybe the LTE provider is simply blocking pings. This would not be unheard of - wireless carriers frequently have all kinds of restrictions in place.

In my experience, blocking incoming pings is very common. Outgoing ones not so much though, since this could possibly break other applications that rely on ping. It’s not impossible though.

(ZB) #47

Openwrt Supported,you could find details in FAQ.9.

this is the performance:

(Prakash) #48

After I tested 4G module with USB, Now I am connecting with 14 pin header.

  • RED LED is glowing on the 4G module
  • lsusb is not showing the 4G module attached.
  • I assumed the USB data cable is not required when I use 14 pin header. If I still connect the USB data cable (even I use 14pin header), then what is the advantage of using 14pin header instead of only USB cable?.


(ZB) #49

Hello, actually 14 pin header is usb on hardware. So there is no different with usb and 14 pin header.

If you use 14 pin header,please don’t connect usb cable.

(urban) #50

Got the same issue - EC25-E is listed in lsusb when connecting via usb cable, but when connecting to 14pin header - it’s not visible anywhere (lspci, lsusb, dmesg).

Maybe something specific needs to be set in the dts to use 14pin usb?

(dorabmon) #51

What is 14 pins USB you meant here? 7623 only export 2 USB totally ports here.

(urban) #52

14 pin header mentioned in the first post, it’s on the right hand side of the daughter board in photo from first post in this thread.

It’s for sure powering the card (red led), but looks like the usb is not “discovered” by the system, that’s why I thought about some device tree modification required.

(Frank W.) #53

just to be clear: 14pin-header is on LTE-module, not on BPI-R2…i see no connection-sheme for it…how did you connect it?

(ZB) #54

Hello, we have two types of 4G module,the left one is mPCIE 4G module,the right one is Embeded 4G module.


If you use mPCIE 4G module, please use this script to set GPIO34 as out highlevel. @urban @linkerosa @asprakash @frank-w

  • ./ 34 dir out

  • ./ 34 val 1 (969 字节)

(dorabmon) #55

is it possible to follow a common way to program gpio ? and see if it is also workable

I believe people always like to learn one thing, apply knowledge across all version of kernels and platform and not to invent such kind of specific script to do it.

(ZB) #56

Hello, Thanks for your advice,I just want to make it easy to use,we could also use the common ways.

  1. cd /sys/class/gpio/
  2. echo 266 > export ## 266(gpio_offset) = 232(base) + 34(GPIO_34)
  3. cd gpio266/
  4. echo out > direction
  5. echo 1 > value

(dorabmon) #57

Got it. it is not necessary to change DTS

because 14-pin header seems export just another path to USB port 0 as the exported USB slot already is done

USB port 0 should be mapped to in DTS at

it looks like to leave an opportunity for customization for the board, so

it should be enough for general people to use the exported USB slot instead

(dorabmon) #58

No, it is really present on bpi r2 v1.1. 14 pin header is locating near between usb and switch mt7530 port 4.

it’s been reserved for customized pcie, usb such kind high speed application for their customers.

general people can ignore. I guessed.

(Prakash) #59

Thanks for all your input. @Jackzeng I am using mPCIE 4G module. I will follow your instructions and update you once it is tested.

(urban) #60

It’s 266 not 267 (figured that out from, which worked).

So the easiest way to enable that is

echo 266 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio266/direction
echo 1 > /sys/class/gpio/gpio266/value

And after that the module works fine.

Thanks Jackzeng!