Ahoj,
dorazil mi z ciny levny
GPRS modem A6.
Rad bycho ho pouzil jako zalozni pripojeni k Orange Pi, ktere mi resi domaci automatizaci. Je mi jasne, ze rychlost bude spatna
(GPRS Class10 up 85.6 kbps (upstream) & 42.8kbps (downlink)), ale me to na vyjimecne pouziti staci.
AT prikazy:
http://www.alselectro.com/files/A6-AT-Commands.pdfZkousel jsem hodne navodu, wvdial mi stale nejde, asi ho neumim nastavit.
Aktualne mi funguje spojeni pomoci pppd:
/etc/ppp/peers/o2
connect "/usr/sbin/chat -v -f /etc/chatscripts/a6"
/dev/ttyUSB0
9600
noipdefault
usepeerdns
defaultroute
persist
noauth
nocrtscts
local
/etc/chatscripts/a6
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
ABORT "DELAYED"
ABORT "ERROR"
ABORT "+CGATT: 0"
"" AT
TIMEOUT 12
OK ATH
OK ATE1
#OK "AT+CPIN=1234"
#OK AT+IPR=115200
OK AT+CGDCONT=1,"IP","internet"
OK ATD*99#
TIMEOUT 22
CONNECT ""
Pripojeni:
# pon o2
Jan 28 18:05:36 martin pppd[13012]: pppd 2.4.7 started by root, uid 0
Jan 28 18:05:36 martin pppd[13012]: Serial connection established.
Jan 28 18:05:36 martin pppd[13012]: Using interface ppp0
Jan 28 18:05:36 martin pppd[13012]: Connect: ppp0 <--> /dev/ttyUSB0
Jan 28 18:05:44 martin pppd[13012]: not replacing default route to enp0s25 [10.123.1.254]
Jan 28 18:05:44 martin pppd[13012]: local IP address 100.72.248.158
Jan 28 18:05:44 martin pppd[13012]: remote IP address 192.200.1.21
Jan 28 18:05:44 martin pppd[13012]: primary DNS address 160.218.161.60
Jan 28 18:05:46 martin ntpd[2307]: Listen normally on 223 ppp0 100.72.248.158:123
# ip a
86: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 3
link/ppp
inet 100.72.248.158 peer 192.200.1.21/32 scope global ppp0
valid_lft forever preferred_lft forever
Odpojeni:
# poff o2
Jan 28 18:07:31 martin pppd[13012]: Terminating on signal 15
Jan 28 18:07:31 martin pppd[13012]: Connect time 1.8 minutes.
Jan 28 18:07:31 martin pppd[13012]: Sent 1288 bytes, received 40 bytes.
Jan 28 18:07:31 martin pppd[13012]: Connection terminated.
Jan 28 18:07:31 martin pppd[13012]: Exit.
Jan 28 18:07:32 martin ntpd[2307]: Deleting interface #223 ppp0, 100.72.248.158#123, interface stats: received=0, sent=0, dropped=0, active_time=106 secs
Modem podporuje i vyssi rychlosti:
AT
OK
ATIE+CIMI;E1I+COPS?
Ai Thinker Co.LTD
A6
V03.03.20160921015H03
230021200272977
Ai Thinker Co.LTD
A6
V03.03.20160921015H03
+COPS: 0,2,"23002"
OK
AT+IPR=?
(2400,4800,9600,14400,19200,28800,33600,38400,57600,115200,230400,460800,921600)
OK
AT+IPR=115200
OK
Zmena rychlosti pres putty/screen funguje. Jak to vsak dostat do chatscriptu? Kdyz odkomentuju radek
OK AT+IPR=115200, modem se nespoji.
A jak se spravne nastavuji rychlosti? V "/etc/ppp/peers/o2" bych mel mit baudrate, ktery je nastaveny z vyroby a az v chatscriptu se prepnout na vyssi rychlost? A jak pote, kdyz treba spojeni spadne vyresim nove pripojeni? pppd a chat prece nebude vedet, jakou rychlost ma modem aktualne nastavenou? Nebo zkusi vic rychlosti?