Fomi
(Fomi Tong)
February 27, 2019, 11:28am
1
There is the latest image for RAK7243 with/without LTE function:
https://www.rakwireless.com/en/download/LoRa/Pilot-Gateway-Pro-RAK7243#Firmware
Just download and uncompress it, then copy the image to a SD card(>2G size) and plus to RAK7243.
Then do as following steps:
Set the gateway for LTE using minicom as follow:
minicom -D /dev/ttyAMA0 -b 115200
Input “AT” and “Enter”, if you can see “OK”, it indicates the connection between RPi and LTE module is nice.
Then, we need to set the parameters of the network operator.
Input AT+COPS=? to query the information of the network operator, for example:
(2,"CHN-CT","CT","46011",7),(3,"CHINA MOBILE","CMCC","46000",0),(3,"CHN-UNICOM","UNICOM","46001",2)
CHN-CT is China Telecom, CHINA MOBILE is China Mobile, and CHN-UNICOM is China Unicom.
Then, set the network operator you want to use, for example, input AT+COPS=1,0,”CHN-CT”,7 to use China Telecom. The result OK indicates it has been set successfully:
These steps is only for the first time you use the gateway to connect LTE or changing to another network operator, otherwise, it will connect to LTE network automatically.
After setting and restart the gateway, it will connect to LTE network automatically. You can query the information using “ifconfig” command. If you see something as follow, it indicates it has connected to LTE successfully.
Fomi
(Fomi Tong)
February 27, 2019, 11:30am
2
If it doesn’t work too, please do as follow:
Power on the device and don’t press the power button, then check the progress using “ps -ef” command, is there a progress named “wait_pi_hat_and_ppp.sh”?
Press the power button, wait 15s, then check the progress, is there a progress pppd?
pppd will dial-up internet automatically, in normal, it will connect successfully in 30~40s. Then you can see ppp0 using “ifconfig” command. But if you can’t see ppp0, it means dial-up fail, just wait for 1~2 mins, pppd will quit automatically.
After pppd quit, you can also dial-up manually by using “sudo pppd call gprs” command.
If dial-up successfully, you can see the following information:
BTW, if you want to modify the APN name, just enter “/home/pi/pi” folder, and “sudo ./ppp-creator.sh APN_NAME ttyAMA0”, APN_NAME is the APN name you want to set.
donald28
(lele)
February 27, 2019, 6:14pm
3
hello, I am blocked on 2), I can enter inside minicom but impossible to enter “AT” or the others commands
donald28
(lele)
February 27, 2019, 6:33pm
4
install ppp
Reading package lists… Done
Building dependency tree
Reading state information… Done
ppp is already the newest version (2.4.7-1+4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
creating directories
creating script file : /etc/chatscripts/quectel-chat-connect
creating script file : /etc/chatscripts/quectel-chat-disconnect
creating script file : /etc/ppp/peers/gprs
Use “sudo pppd call gprs” command and Surf
pi@ttn-gateway:~/RAK2245-LoRaGateway-RPi-Raspbian-OS $ cd
pi@ttn-gateway:~ $ sudo pppd call gprs
pppd options in effect:
debug # (from /etc/ppp/peers/gprs)
nodetach # (from /etc/ppp/peers/gprs)
dump # (from /etc/ppp/peers/gprs)
noauth # (from /etc/ppp/peers/gprs)
remotename 3gppp # (from /etc/ppp/peers/gprs)
/dev/ttyAMA0 # (from /etc/ppp/peers/gprs)
115200 # (from /etc/ppp/peers/gprs)
lock # (from /etc/ppp/peers/gprs)
connect chat -s -v -f /etc/chatscripts/quectel-chat-connect -T mmsbouygtel.com # (from /etc/ppp/peers/gprs)
disconnect chat -s -v -f /etc/chatscripts/quectel-chat-disconnect # (from /etc/ppp/peers/gprs)
nocrtscts # (from /etc/ppp/peers/gprs)
modem # (from /etc/ppp/peers/gprs)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/gprs)
novj # (from /etc/ppp/peers/gprs)
novjccomp # (from /etc/ppp/peers/gprs)
ipcp-accept-local # (from /etc/ppp/peers/gprs)
ipcp-accept-remote # (from /etc/ppp/peers/gprs)
ipparam 3gppp # (from /etc/ppp/peers/gprs)
noipdefault # (from /etc/ppp/peers/gprs)
ipcp-max-failure 30 # (from /etc/ppp/peers/gprs)
defaultroute # (from /etc/ppp/peers/gprs)
usepeerdns # (from /etc/ppp/peers/gprs)
noccp # (from /etc/ppp/peers/gprs)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
alarm
Failed
Script chat -s -v -f /etc/chatscripts/quectel-chat-connect -T mmsbouygtel.com finished (pid 20563), status = 0x3
Connect script failed
Fomi
(Fomi Tong)
February 28, 2019, 5:03am
5
You may need to press the POWER button of RAK2247 to start the LTE module after power on the device. Then you can try to enter “AT”.
If you want the LTE module start automatically instead of pressing POWER button, just do as follow:
/home/pi/pi/pi-hat.sh - add code to pulse gpio18 low for a second to power enable the LTE modem.
nano /etc/chatscripts/quectel-chat-connect - replace \T with the APN name.
BTW, remember to modify the default password of the device/RPi for security.
Good luck!
donald28
(lele)
February 28, 2019, 7:08am
6
Thank Fomi, it works when I putch the botton, I did this for GPIO18 :
echo 18 > export
echo in > gpio18/direction
echo 1 > gpio18/value
sleep 1
echo 0 > gpio18/value
it is ok ?
thank
Fomi
(Fomi Tong)
February 28, 2019, 7:22am
7
#!/bin/sh
cd /sys/class/gpio/
echo 5 > export
echo 6 > export
echo 13 > export
echo 18 > export
echo 19 > export
echo 21 > export
echo 26 > export
echo out > gpio5/direction
echo out > gpio6/direction
echo out > gpio13/direction
echo out > gpio18/direction
echo out > gpio19/direction
echo in > gpio21/direction
echo out > gpio26/direction
echo 0 > gpio5/value
echo 0 > gpio6/value
echo 0 > gpio13/value
echo 0 > gpio19/value
echo 0 > gpio26/value
echo 1 > gpio18/value
sleep 1
echo 0 > gpio18/value
sleep 1
echo 1 > gpio18/value
donald28
(lele)
February 28, 2019, 9:13pm
8
now a get this :
pi@rak-gateway:~ $ sudo pppd call gprs
pppd options in effect:
debug # (from /etc/ppp/peers/gprs)
nodetach # (from /etc/ppp/peers/gprs)
dump # (from /etc/ppp/peers/gprs)
noauth # (from /etc/ppp/peers/gprs)
remotename 3gppp # (from /etc/ppp/peers/gprs)
/dev/ttyAMA0 # (from /etc/ppp/peers/gprs)
115200 # (from /etc/ppp/peers/gprs)
lock # (from /etc/ppp/peers/gprs)
connect chat -s -v -f /etc/chatscripts/quectel-chat-connect -T mmsbouygtel # (from /etc/ppp/peers/gprs)
disconnect chat -s -v -f /etc/chatscripts/quectel-chat-disconnect # (from /etc/ppp/peers/gprs)
nocrtscts # (from /etc/ppp/peers/gprs)
modem # (from /etc/ppp/peers/gprs)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/gprs)
novj # (from /etc/ppp/peers/gprs)
novjccomp # (from /etc/ppp/peers/gprs)
ipcp-accept-local # (from /etc/ppp/peers/gprs)
ipcp-accept-remote # (from /etc/ppp/peers/gprs)
ipparam 3gppp # (from /etc/ppp/peers/gprs)
noipdefault # (from /etc/ppp/peers/gprs)
ipcp-max-failure 30 # (from /etc/ppp/peers/gprs)
defaultroute # (from /etc/ppp/peers/gprs)
usepeerdns # (from /etc/ppp/peers/gprs)
noccp # (from /etc/ppp/peers/gprs)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
^M
OK
– got it
send (ATE0^M)
expect (OK)
^M
^M
OK
– got it
send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
EG95^M
Revision: EG95EFBR06A05M4G^M
^M
SubEdition: V01^M
^M
+CSQ: 20,99^M
^M
+COPS: 0^M
^M
+CGREG: 0,2^M
^M
OK
– got it
send (AT+CGDCONT=1,“IP”,“mmsbouygtel”,0,0^M)
expect (OK)
^M
^M
OK
– got it
send (ATD*99#^M)
expect (CONNECT)
^M
^M
CONNECT
– got it
Script chat -s -v -f /etc/chatscripts/quectel-chat-connect -T mmsbouygtel finished (pid 907), status = 0x0
Serial connection established.
using channel 4
Using interface ppp0
Connect: ppp0 <–> /dev/ttyAMA0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe6a28b1e> ]
rcvd [LCP ConfReq id=0x9 <asyncmap 0x0> <magic 0xd126d265> ]
No auth is possible
sent [LCP ConfRej id=0x9 ]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xe6a28b1e> ]
rcvd [LCP ConfReq id=0xa <asyncmap 0x0> <magic 0xd126d265> ]
sent [LCP ConfAck id=0xa <asyncmap 0x0> <magic 0xd126d265> ]
sent [LCP EchoReq id=0x0 magic=0xe6a28b1e]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0xb magic=0xd126d265]
rcvd [LCP EchoRep id=0x0 magic=0xd126d265 e6 a2 8b 1e]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [LCP EchoReq id=0x1 magic=0xe6a28b1e]
IPCP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 “No network protocols running”]
sent [LCP TermReq id=0x3 “No network protocols running”]
Connection terminated.
abort on (ERROR)
abort on (NO DIALTONE)
unterminated quote (line 4)
Script chat -s -v -f /etc/chatscripts/quectel-chat-disconnect finished (pid 916), status = 0x1
disconnect script failed
Modem hangup
ZhuQI
(ZhuQI)
March 1, 2019, 7:15am
9
1.Can you send the prints of the 4) and 5) steps?
2.Can you send the contents of file “/etc/ppp/peers/gprs”?
donald28
(lele)
March 18, 2019, 8:26pm
10
hello, it work fine when a disconnet the wifi and reboot. thank for your help I really appreciate
sri
(Sri)
April 27, 2019, 6:05pm
11
@Fomi
I’m stuck here. Any help would be very helpful.
I’m not even able to give AT commands, the window is stuck after
“minicom -D /dev/ttyAMA0 -b 115200”
command.
Fomi
(Fomi Tong)
April 28, 2019, 1:22am
12
Hi, @sri
I think maybe you can use the latest firmware for RAK7243 with LTE:
https://www.rakwireless.com/en/download/LoRa/Pilot-Gateway-Pro-RAK7243#Firmware
Please download the one named “RAK7243_LTE_…” .
In the latest firmware, we’ve added a configuration UI, so you can configure it easily now.
sri
(Sri)
April 28, 2019, 6:06am
13
Thanks @Fomi now I can see all the 3 LEDs light up but connect script failed error.
The Cellular Module doesn’t connect to the internet. Any thoughts?
Fomi
(Fomi Tong)
April 28, 2019, 9:47am
14
Hi, @sri
Can you execute the following command?
sudo minicom -D /dev/ttyAMA0 -b 115200
and type:
ATI
Then give me the log picture.
Thank you!
sri
(Sri)
April 28, 2019, 10:27am
15
@Fomi
Please find the result.
Hardly the cmd prompt is interactive if I enter the minicom cmd.
Thank you.
sri
(Sri)
April 28, 2019, 10:28am
16
Revision info came after I hit another key stroke:
Quectel
BG96
Revision: BG96MAR02A07M1G
When I hit “sudo pppd call gprs”
It fails like this:
Fomi
(Fomi Tong)
April 28, 2019, 10:58am
17
Hi, @sri
You can type “at+cops=?” to get a network operator information, for example, i can get the following information in China:
2,“CHN-CT”,“CT”,“46011”,7
I think you can get some information like this too.
If it is, please type “at+cops=1,0,xxx,yyy” to set your network operator. “xxx” is the one you get in the last step, like “CHN-CT”, and “yyy” is the one like “7” according to my example.
When you complete these step correctly, you can set APN name on the UI, then restart the device.
Please try again.
sri
(Sri)
April 28, 2019, 11:03am
18
Hi, @Fomi
This is the error I get.
Fomi
(Fomi Tong)
April 28, 2019, 11:08am
19
Can you try to use another Network operator? For example, IDEA.
sri
(Sri)
April 28, 2019, 11:09am
20
Sure, let me insert the SIM and let you know. Even if LTE is not connecting it should latch on to EGSM on 900 band.