Re: GSM GPRS using Dial Up

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I am able to get the OK response now, when i am sending AT.

When i am sending AT+CPIN?, i am getting the AT+ERROR as response. I am sure
that, SIM card is good and in linux, i am getting READY as response, when
issuing the same command.

Still in dial up the same COM port used by another program error is coming.

Any suggestions.

Regards,
Mekas

"www.armce.cn" wrote:

On 2月4日, 上午12时32分, Mekas <Me...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

Thanks for the reply. Actually there is some problem with GSM power up
sequence. It is not complaint with datasheet. I am tuning the power sequence.

The following is application code i'm using to send AT to COM and getting
back the reply.

I configured the serial port for 19200, 8,N, 1 and no flow control. I'm
using the following loop for writing and reading.

while ( i < 10) {
char szBuffer1[3]="AT";
dwLastError = Write(szBuffer1,sizeof(szBuffer1)-1,&dwBytesRead1);
if (ERROR_SUCCESS != dwLastError)
return ShowError(dwLastError, _T("Unable to write to COM-port."));
else
printf("Data Written to COM3 port : %s.\r\n",szBuffer1 );
Sleep(100);
while ( j < 5 ) {
dwBytesRead = 0;
// Read data from the COM-port
dwLastError = Read(szBuffer,sizeof(szBuffer)-1,&dwBytesRead);
if (ERROR_SUCCESS != dwLastError)
return ShowError(dwLastError, _T("Unable to read from COM-port."));
else
printf("COM3 Read done..\r\n");
if (dwBytesRead > 0) {
// Finalize the data, so it is a valid string
szBuffer[dwBytesRead] = '\0';

// Display the data
for(DWORD dwIdx=0; dwIdx<dwBytesRead; dwIdx++)
_tprintf(_T("%c"), szBuffer[dwIdx]);

}
else
printf("No data..\r\n");
j++;

}
i++;
}

I have put a delay of 100ms between write and read, and i'm reading 5 times.
Whether the sequence is right. Whether the GSM will take some time to
respond. Kindly help me regarding this.

When i'm running the code, its always saying "No data" even sometimes GSM is
power up.

If u have any serial application or hyperterminal for this, kindly mail me
the source to: artlessme...@xxxxxxxxx

All the third party hyperterminals are not running in Wince6.0 for ARM.

Regards,
Mekas



"www.armce.cn" wrote:
On 2月2日, 下午10时29分, Mekas <Me...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

I've done the things whatever you told, but still the following error is
coming.

" The Port is not available another program may be using it"

I'm sure that COM3 is dedicated for GSM only and no other application is
using that port.

I have done the GSM power up only in the serial driver,( particularly in the
function "BSPUartConfigTranceiver" for COM3). Whether modem initialization is
wrong? Can you tell me the modem initialization for MC55.

The following are my registry entries for com3. Since i'm new to this i'm
not able to do anything.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM3]
"DeviceArrayIndex"=dword:0
"IoBase"=dword:5000C000
"IoLen"=dword:D4
"Prefix"="COM"
"Dll"="csp_serial.dll"
"Index"=dword:3
"Order"=dword:9

[HKEY_LOCAL_MACHINE\ExtModems\GDAModem]
"Port"="COM3:"
"DeviceType"=dword:1
"FriendlyName"="GSM Modem driver"

Whether this is ok? Is there any sample hyperterminal which will help to
send AT commands, so that i can use that instead of dialup application to
verify GSM reply.

Thanks,
Mekas
main : artlessmekas AT yahoo DOT com

"armcear...@xxxxxxxxx" wrote:
On Jan 30, 9:15 pm, Mekas <Me...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

I'm working on IMX31 board for Windows CE 6.0. I want to enable the GSM GPRS
using Dial Up connection. In my board Siemens MC75 GSM /GPRS module is
connected to UART3 and debug messages are configured in UART1.

I went through the steps mentioned in the linkhttp://e-consystems..com/gprs.aspandfollowedthe steps. The following are
the registry entries.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM3]
"DeviceArrayIndex"=dword:0
"IoBase"=dword:5000C000
"IoLen"=dword:D4
"Prefix"="COM"
"Dll"="csp_serial.dll"
"Index"=dword:3
"Order"=dword:9
; For Direct Connection
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM3\Unimodem]
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
"FriendlyName"="IMX31 COM3 UNIMODEM"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,
00,00, 08, 00, 00, 00,00,00,00

; For Hayes Compatible
[HKEY_LOCAL_MACHINE\ExtModems\MC75Modem]
"Port"="COM3:"
"DeviceType"=dword:1
"FriendlyName"="GSM Modem driver"
"Prefix"="COM"
"Dll"="unimodem.dll"
"ResetDelay"=dword:800

[HKEY_LOCAL_MACHINE\ExtModems\ExtModems\Init]
"1"="AT<cr>"
"2"="ATE0V1&C1&D2<cr>"

[HKEY_LOCAL_MACHINE\Drivers\Unimodem\Init]
"1"="AT<cr>"
"2"="ATE0V1&C1&D2<cr>"

[HKEY_LOCAL_MACHINE\Drivers\Unimodem\Settings]
"Prefix"="AT"
"Terminator"="<cr>"
"DialPrefix"="D"
"DialSuffix"=";"
"Pulse"="P"
"Tone"="T"
"Blind_Off"="X4"
"Blind_On"="X3"
"CmdSendDelay"="500"
"CallSetupFailTimeout"="ATS7=<#><cr>"
"Reset"="AT<cr>"

[HKEY_LOCAL_MACHINE\Drivers\Unimodem\Config]
"CallSetupFailTimer"=dword:B4

; Location Settings

[HKEY_CURRENT_USER\ControlPanel\Dial]

; What is Location ID (value name) for the current location
"CurrentLoc"=dword:0
; What is the next permanent location ID to be used when creating a new entry
"HighLocID"=dword:2

;Default Location settings -- need to be localized

[HKEY_CURRENT_USER\ControlPanel\Dial\Locations]

; Each MultiSz location (value name = PermLocationID" has :

; LocationName, LocalFmt, LdFmt, IntntlFmt, AreaCode, CwCode, CountryCode, &
Options
"0"=multi_sz: "Work",
"G",
"G",
"G",
"425",
" ",
"1",
"0"
"1"=multi_sz: "Home",
"G",
"1FG",
"011,EFG",
"425",
" ",
"1",
"0"

;------------------------------------------

I am using airtel GSM card with GPRS enabled. The following are my settings
in the Dial Up application

Area : NULL

CountryCode : 91

special initialization command in the text box :
AT+CGDCONT=1,"IP","airtelgprs.com"

Phone Number : *99#

Are my settings are correct????????????

When i'm trying to connect, I give Username, Pwd and domain as NULL only.

I can see the application is Opening Port, but the i'm getting message box
that " The Port is not available another program may be using it"..

By seeing the registry entry, my com3 is not used by any other applications.

I am new to this GSM related things. Can you guys please guide me.. I've gone
through most of the questions asked, but still not able to solve the issue.

I just want to send some AT commands to the port through some WinCE
hyperterminal, but i'm not getting any third party wince software for ARM..
Could you please suggest some software or whether we can use the terminal
emulator for sending commands to COM3.

Please advice.

Regards,
kumar

You may should modify WINCE500\PRIVATE\WINCEOS\COMM\TAPI\UNIMODEM
\dial.c
#define INIT_WATCHDOG_TIMEOUT 4000 to
#define INIT_WATCHDOG_TIMEOUT 40000

this may fix the can't open port problem

I use i.MX27 and MC55 for GPRS dial up.
You may also know that the dial command may not correct, because of
the "Tone"="T"
This may cause the dial up command become ATDT.
The correct one may be ATD, the last "T" is cause of "Tone"="T". This
may cause disconnect in few seconds when you dial up.
So we fix this in this way:
"Tone"=""

If you can read chinese, you can refer tohttp://www.armce.cn/home/space..php?uid=4&do=blog&id=4

But now you should firstly fix the can not open port error

Hi Mekas:
Of cause, firstly you will make sure the com driver is OK for
COM3.
You can simply make a demo application to test open com3 and write
AT command, read response.
If your AP can not open com3, it's the problem that about com
driver or registry setting, or that may be the problem of unimodem
registry setting.

Hi,
I have no test AP source code on my hand. But I can give you the
main function that you should call in your AP.

g_hGSMCOM = ::CreateFile( GSM_COM_PORT,
GENERIC_READ|GENERIC_WRITE,
NULL,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL
);

WriteFile(g_hGSMCOM , g_szSendBuff, strlen(g_szSendBuff), &dwRet,
NULL)

DWORD ReadCOMBuff() {
BOOL fReadState; //读入信息时返回值,若为TRUE就是正确读入
DWORD dwCommModemStatus; //串口状态,以判断是否有事件发生
DWORD dwLength; //读入信息的长度
COMSTAT ComStat; //串口状态的详细情况表,
DWORD dwErrorFlags; //读串口状态的标志
BOOL readStatus=FALSE; //读入信息的状态,若为TRUE就是正在读入但还没有读完
int iCounter=0;

//检测收到的事件是否为"接收字符"的事件

::ClearCommError(g_hGSMCOM,&dwErrorFlags,&ComStat); //清除串口状态标志,并返回当前状

dwLength=ComStat.cbInQue; //cbInQue返回在串行驱动程序输入队列中的字符数

if(dwLength > 0) {
DWORD dwRetLen = 0;
DWORD dwTimes = (dwLength / (GSM_READBUFF_SIZE - 1)) + 1;
DWORD j = dwLength % (GSM_READBUFF_SIZE-1);

for(DWORD i = 0; i < dwTimes; i++) {
DWORD dwRoundReadSize = ((dwTimes - i) == 1)? j:
.



Relevant Pages

  • Re: GSM GPRS using Dial Up
    ... Now i am able to get the OK response from the MC75 GSM modem. ... not able achieve GPRS connection. ... I configured the GSM with AT+IPR, AT+IFC command using serial application ...
    (microsoft.public.windowsce.embedded)
  • Re: GSM GPRS using Dial Up
    ... i am getting the AT+ERROR as response. ... issuing the same command. ... Actually there is some problem with GSM power up ... function "BSPUartConfigTranceiver" for COM3). ...
    (microsoft.public.windowsce.embedded)
  • Re: GSM GPRS using Dial Up
    ... i am getting the AT+ERROR as response. ... issuing the same command. ... Actually there is some problem with GSM power up ... function "BSPUartConfigTranceiver" for COM3). ...
    (microsoft.public.windowsce.embedded)
  • Re: GSM GPRS using Dial Up
    ... i am getting the AT+ERROR as response. ... issuing the same command. ... Actually there is some problem with GSM power up ... function "BSPUartConfigTranceiver" for COM3). ...
    (microsoft.public.windowsce.embedded)
  • Re: GSM GPRS using Dial Up
    ... Actually there is some problem with GSM power up ... function "BSPUartConfigTranceiver" for COM3). ... This may cause the dial up command become ATDT. ...
    (microsoft.public.windowsce.embedded)