PPP를 통해 SIM7000E 설정

PPP를 통해 SIM7000E 설정

ppp를 통해 SIM7000E를 설정하려고 합니다. SIM7000E는 마이크로 USB 케이블을 통해 비글본블랙에 연결됩니다. Beaglebone은 5.10.168-ti-r71 커널(Debian)을 사용합니다. SIM7000E 드라이버가 성공적으로 설치되었으며 ppp도 설치되었습니다.

나는 /etc/ppp/peers 디렉토리로 가서 파일 제공자를 복사하고 이름을 gprs로 지정했습니다. Gprs 파일은 다음과 같습니다:

# example configuration for a dialup connection authenticated with PAP or CHAP
#
# This is the default configuration used by pon(1) and poff(1).
# See the manual page pppd(8) for information on all the options.

# MUST CHANGE: replace myusername@realm with the PPP login name given to
# your by your provider.
# There should be a matching entry with the password in /etc/ppp/pap-secrets
# and/or /etc/ppp/chap-secrets.

user "myusername@realm"

# MUST CHANGE: replace ******** with the phone number of your provider.
# The /etc/chatscripts/pap chat script may be modified to change the
# modem initialization string.

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs"

# Serial device to which the modem is connected.

/dev/ttyUSB2

# Speed of the serial line.

115200

nocrtscts

debug

nodetach

ipcp-accept-local

ipcp-accept-remote

# Assumes that your IP address is allocated dynamically by the ISP.

noipdefault

# Try to get the name server addresses from the ISP.

usepeerdns

# Use this connection as the default route.

defaultroute

# Makes pppd "dial again" when the connection is lost.

persist

# Do not ask the remote to authenticate.

noauth

그런 다음 다음을 입력하여 gprs를 호출하려고 하면 pppd call gprs결과는 다음과 같습니다.

Script /usr/sbin/chat -v -f /etc/chatscripts/gprs finished (pid 1186), status = 0x0

Serial connection established.

using channel 2

Using interface ppp0

Connect: ppp0 <--> /dev/ttyUSB2

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xf0cd2f0e> ]

rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <magic 0xd0a7832b> ]

sent [LCP ConfNak id=0x4 ]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xf0cd2f0e> ]

rcvd [LCP ConfReq id=0x5 <asyncmap 0x0> <magic 0xd0a7832b> ]

sent [LCP ConfAck id=0x5 <asyncmap 0x0> <magic 0xd0a7832b> ]

sent [LCP EchoReq id=0x0 magic=0xf0cd2f0e]

sent [PAP AuthReq id=0x1 user="myusername@realm" password=]

rcvd [LCP DiscReq id=0x6 magic=0xd0a7832b]

rcvd [LCP EchoRep id=0x0 magic=0xd0a7832b f0 cd 2f 0e]

rcvd [PAP AuthAck id=0x1 ""]

PAP authentication succeeded

sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

rcvd [LCP ProtRej id=0x7 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]

Protocol-Reject for 'Compression Control Protocol' (0x80fd) received

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 ]

sent [LCP EchoReq id=0x1 magic=0xf0cd2f0e]

IPCP: timeout sending Config-Requests

IPV6CP: timeout sending Config-Requests

sent [LCP TermReq id=0x2 "No network protocols running"]

sent [LCP TermReq id=0x3 "No network protocols running"]

Connection terminated.

Modem hangup

문제가 무엇인지 이해하지 못합니다. 누구든지 도와줄 수 있나요?

/etc/chatscripts/gprs에는 다음이 포함됩니다.

# You can use this script unmodified to connect to cellular networks.
# The APN is specified in the peers file as the argument of the -T command
# line option of chat(8).

# For details about the AT commands involved please consult the relevant
# standard: 3GPP TS 27.007 - AT command set for User Equipment (UE).
# (http://www.3gpp.org/ftp/Specs/html-info/27007.htm)

ABORT           BUSY
ABORT           VOICE
ABORT           "NO CARRIER"
ABORT           "NO DIALTONE"
ABORT           "NO DIAL TONE"
ABORT           "NO ANSWER"
ABORT           "DELAYED"
ABORT           "ERROR"

# cease if the modem is not attached to the network yet
ABORT           "+CGATT: 0"
""              AT
TIMEOUT         12
OK              ATH
OK              ATE1

# +CPIN provides the SIM card PIN
#OK             "AT+CPIN=1234"
# +CFUN may allow to configure the handset to limit operations to
# GPRS/EDGE/UMTS/etc to save power, but the arguments are not standard
# except for 1 which means "full functionality".
#OK             AT+CFUN=1

OK              AT+CGDCONT=1,"IP","\T","",0,0
OK              ATD*99#
TIMEOUT         22
CONNECT         ""

/etc/ppp/peers에서 gprs 파일을 변경하고 다음을 추가했습니다.

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs" -T internet.vodafone.gr

다시 gprs를 호출해 보았는데 결과는 이렇습니다.

    Script /usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet.vodafone.gr finished (pid 3457), status = 0x0

Serial connection established.

using channel 27

Using interface ppp0

Connect: ppp0 <--> /dev/ttyUSB2

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7969ae32> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xd16a9755> <pcomp> <accomp>]

sent [LCP ConfNak id=0x0 <auth pap>]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x7969ae32> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0xd16a9755> <pcomp> <accomp>]

sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth pap> <magic 0xd16a9755> <pcomp> <accomp>]

sent [LCP EchoReq id=0x0 magic=0x7969ae32]

sent [PAP AuthReq id=0x1 user="myusername@realm" password=<hidden>]

rcvd [LCP DiscReq id=0x2 magic=0xd16a9755]

rcvd [LCP EchoRep id=0x0 magic=0xd16a9755 79 69 ae 32]

rcvd [PAP AuthAck id=0x1 ""]

PAP authentication succeeded

sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]

Protocol-Reject for 'Compression Control Protocol' (0x80fd) received

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::7183:7bdb:7541:1ed2>]

sent [LCP EchoReq id=0x1 magic=0x7969ae32]

IPCP: timeout sending Config-Requests

IPV6CP: timeout sending Config-Requests

sent [LCP TermReq id=0x2 "No network protocols running"]

sent [LCP TermReq id=0x3 "No network protocols running"]

Connection terminated.

Modem hangup

그런 다음 /etc/chatscripts/gprs 파일을 변경하고 SIM 카드의 PIN을 입력하고 # 기호를 제거했습니다. gprs를 다시 호출하면 결과는 다음과 같습니다.

Script /usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet.vodafone.gr finished (pid 3473), status = 0x0

Serial connection established.

using channel 28

Using interface ppp0

Connect: ppp0 <--> /dev/ttyUSB2

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc95e726d> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <auth chap MD5> <magic 0xd172abe9> <pcomp> <accomp>]

sent [LCP ConfNak id=0x4 <auth pap>]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xc95e726d> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x5 <asyncmap 0x0> <auth pap> <magic 0xd172abe9> <pcomp> <accomp>]

sent [LCP ConfAck id=0x5 <asyncmap 0x0> <auth pap> <magic 0xd172abe9> <pcomp> <accomp>]

sent [LCP EchoReq id=0x0 magic=0xc95e726d]

sent [PAP AuthReq id=0x1 user="myusername@realm" password=<hidden>]

rcvd [LCP DiscReq id=0x6 magic=0xd172abe9]

rcvd [LCP EchoRep id=0x0 magic=0xd172abe9 c9 5e 72 6d]

rcvd [PAP AuthAck id=0x1 ""]

PAP authentication succeeded

sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

sent [IPV6CP ConfReq id=0x1 <addr fe80::9012:64df:a80b:4d3f>]

rcvd [LCP ProtRej id=0x7 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]

Protocol-Reject for 'Compression Control Protocol' (0x80fd) received

rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]

sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]

Modem hangup

Connection terminated.

즉, "실행 중인 네트워크 프로토콜이 없습니다."라는 메시지가 표시되지 않습니다.

답변1

pppdDeflate 및 BSD 압축의 두 가지 변형을 지정하여 압축 구성 요청을 보냅니다 .

sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]

원격 끝은 압축 요청을 완전히 거부합니다.

rcvd [LCP ProtRej id=0x7 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received

그 후에는 원격 끝이 완전히 응답하지 않습니다. 분명히 "압축"은 낯선 개념이므로 일단 언급되면 연결 협상을 계속할 수 없습니다.

한 줄 nodeflate에 하나씩 키워드를 추가하거나 두 가지 모두를 추가해 보세요 .nobsdcomp/etc/ppp/peers/gprs

또 다른 가능한 문제는 IPv6일 수 있습니다. 모바일 네트워크 공급자가 IPv6에 대한 절대적인 지원을 입증하지 않는 한 IPv6가 요청될 때 트리거되는 원격 측에 일부 버그가 있을 수 있다는 사실이 그리 놀랍지는 않습니다. .noipv6

또는 이동통신사에서 제공하는 경우IPv6 전용(개인적으로는 이런 일이 발생하는 것을 본 적이 없지만 IPv4 주소 부족이 더 심각한 일부 국가에서 발생할 수 있는 것으로 보입니다.) 다음을 추가해 볼 수 있습니다 noip. IPv6만 사용할 수 있는 경우 원격 끝은 모든 연결로 구성될 수 있습니다. IPv4 요청 시도가 완전히 거부되었습니다.

두 가지를 동시에 추가하지 마십시오. noipv6그렇지 않으면 noip연결이 거의 쓸모가 없게 됩니다. 둘 중 하나만 추가하면 됩니다.

그러나 SIM7000E가 네트워크에 전혀 등록되지 않은 경우 이것이 문제의 근본 원인일 수 있습니다.

/etc/chatscript/gprs명령에 지정된 APN 이름을 얻기 위해 이 옵션을 사용할 것으로 예상했지만 현재 이를 제공하지 않았습니다. 예를 들어 사용해야 하는 APN 이름(공급업체에 문의)이 다음과 같은 경우 다음 줄을 변경합니다.chat-Tinternet/etc/ppp/peers/gprs

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs"

이와 관련하여:

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet"

관련 정보