用GPRS模块通过串口拨号,用串口调试工具看到用的串口是串口3,发送AT命令也正常,但无法拨号,每次拨号都显示opening port,然后约几十秒后弹出this port is not available,another program may be using it,波特率用的是115200,9600也试过,都不行。
注册表是这样改的,是参考这个文档的:http://download.eeworld.net/source/866110
在串口驱动的注册表里面添加Unimodem支持:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1]
"Index"=dword:3 ;
"Prefix"="COM" ; COM
"Dll"="at91sam9261ek_serial.dll" ; in at91sam9261ek_serial.dll
"SerialPortIndex"=dword:0 ; USART0
"TxBufferSize"=dword:400 ;
"RxBufferSize"=dword:2800 ;
;[HKEY_LOCAL_MACHINE\ExtModems\SerialCompat]
; "Port"="COM3:"
; "DeviceType"=dword:1
;"Hayes Compatible on COM3:"
; "FriendlyName"="COM3: Serial"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1\Unimodem]
"DeviceType"=dword:0
"FriendlyName"="USART0 on COM3:"
"Tsp"="Unimodem.dll"
"DevConfig"=hex: 10,00, 00,00, 78,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
然后修改common.reg:
; @CESYSGEN IF CE_MODULES_UNIMODEM
[HKEY_LOCAL_MACHINE\ExtModems\HayesCompat]
"Port"="COM3:"
"DeviceType"=dword:1
;LOC_FRIENDLYHAYESCOMPAT
"FriendlyName"=mui_sz:"unimodem.dll,#9001"
;[HKEY_LOCAL_MACHINE\ExtModems\HayesCompat\Init]
;[HKEY_LOCAL_MACHINE\ExtModems\HayesCompat\Settings]