發表文章

目前顯示的是 9月, 2009的文章

How to use GPRS connect to internet (GPRS)

Linux GPRS Howto 的說明比一些 GPRS Module 的application Notes 還清楚 PDP : packet data protocol. 資料封包 (對應的,語音連線送的是聲音封包)。 APN : Access Point Name。 用minicom 來下 command。要注意 屬於 dialout groupe。 下 AT 回應 OK 代表RS232 線連線 OK. (其實有看到 AT 就代表 正常,因為 AT 也 modem echo back ) 下 AT+CPIN? 檢查 pin number 是不是有輸入,回 READY 代表正常。 如果不是,用 AT+CPIN=1234 輸入 pin number (1234) 下 AT+CGATT? 檢查是不是已經attach 到 GPRS network 了,回應 1 是OK。 如果是 0,用 AT+CGATT=1 叫 modem attach。 設定PDP 傳送的 profile,modem 可以設很多 pdp profile,方便user 轉換。 AT+CGDCONT=1,"IP","INTERNET" * 1 : profile 1 * "IP" : PDP type (ip packet, 好像一定要大寫) * "INTERNET" : APN (每一家電信公司不一樣) 撥號,GPRS Servie 的 number 固定是: *99***1# 後面的 " 1" 是 PDP profile 號碼。 ATDT*99***1# 播完號,出現 CONNECT,然後就會看到一堆亂碼。 ..到這裡,代表 linux 到 gprs modem 端已經OK了。 接下來設定 linux 的撥接動作。 GPRS Modem 是以 ppp 的方式傳送資料,所以要config ppp。 好像大多數網站都說 wvdial,所以也用wvdial,wvdial 是 ppp 的 front-end,用一個 config 檔而已。 修改 /etc/wvdial.conf: [Dialer D...