sasha85
asked on
using AT commands with VB
there is a list of api i found here
http://search.cpan.org/~johanvdb/GSM-SMS-0.162/lib/GSM/SMS/NBS.pm
http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/Gsmu/index.html
and there is a AT commands here
http://www.developershome.com/sms/readSmsByAtCommands.asp
suppose i want to work with VB how can i use this AT commands in a wat that it will be sent to the mobile phone that will be connected to the computer
?
http://search.cpan.org/~johanvdb/GSM-SMS-0.162/lib/GSM/SMS/NBS.pm
http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/Gsmu/index.html
and there is a AT commands here
http://www.developershome.com/sms/readSmsByAtCommands.asp
suppose i want to work with VB how can i use this AT commands in a wat that it will be sent to the mobile phone that will be connected to the computer
?
How do you connect to the phone? If the connection is set up to be a Com port, you use the MSComm control to transmit AT commands.
ASKER
i connect nokia gsm with usb cable and in the settings i can see it as a modem on com 4
when i used the hyperterminal i choose this com 4...
when i used the hyperterminal i choose this com 4...
ASKER
how to open socket or port?
how to send the at commends to this port?
how to send the at commends to this port?
I am trying to adapt the code in this Microsoft article for you. At the moment it simply reads the data from the line (No sending)
http://support.microsoft.com/?kbid=158008
http://support.microsoft.com/?kbid=158008
Hmm. It seems I no longer have a COM port available on my PC to test the code. I will try to set one up, but meanwhile here is a pointer to another question with some more relevant code that I wrote a while ago.
https://www.experts-exchange.com/questions/20859694/Basic-comms-coding.html
https://www.experts-exchange.com/questions/20859694/Basic-comms-coding.html
ASKER
thank you for your help:)
i a m tring to understand how to open the connection with the mobile and i tried to use the code in the thread but i realy don't understand how it works:(
i a m tring to understand how to open the connection with the mobile and i tried to use the code in the thread but i realy don't understand how it works:(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i got motorola mobile and nokia mobile...how can i chack their protocol and to fit it to this string above?
the command as i see in this code writen in 'transact'?
the command as i see in this code writen in 'transact'?
This shows the Hayes commands extended for Nokia phones. I expect that Motorola uses a similar set.
http://wiki.forum.nokia.com/index.php/AT_Commands
http://wiki.forum.nokia.com/index.php/AT_Commands
ASKER
ok that suppose that is the commands...suppose i know the commands how i can connect with the phone...with the port in a way that i every command i will write inside the code it will run on the phone...
i tried every part of the code above but it somehow not work...when i look inside the settings 'phone and modems' i see the nokia and the motorola that i tried to connect on com 4
i tried every part of the code above but it somehow not work...when i look inside the settings 'phone and modems' i see the nokia and the motorola that i tried to connect on com 4
I was only able to answer your initial question - how to senr AT to the phone - because that is the way that all modems work. I have never needed to use my mobile to dial out.
However, I will try it now.
I have an old Nokia (8310), but I can't remember how it connects to the PC. Perhaps I have lost the cable. I also have a Sony Ericsson (K700i) which uses a bluetooth USB. Perhaps that will work.
However, I will try it now.
I have an old Nokia (8310), but I can't remember how it connects to the PC. Perhaps I have lost the cable. I also have a Sony Ericsson (K700i) which uses a bluetooth USB. Perhaps that will work.
ASKER
i guess it need to be something like this http://images.google.com/images?q=nokia+8310+cable&svnum=10&um=1&hl=en&imgsz=small|medium|large|xlarge
i did not decided yet what model i will use but i think i need a phone that can store maximum sms...that means that if i will get 40 sms in one sec i need the pc to be able to read fast each sms and delete it and read the next one...if there will be 40 at a time i need the phone store maximum number of sms...
i did not decided yet what model i will use but i think i need a phone that can store maximum sms...that means that if i will get 40 sms in one sec i need the pc to be able to read fast each sms and delete it and read the next one...if there will be 40 at a time i need the phone store maximum number of sms...
Thanks for that. The cables don't look familiar, so perhaps I never connected my Nokia to my PC.
However, I have just managed to talk to my Sony Ericsson with Hyperterminal, so progress is being made.
However, I have just managed to talk to my Sony Ericsson with Hyperterminal, so progress is being made.
I can get my phone to dial, but not (yet) to connect as a modem). I added a line in the code and commented out the original:
Transact "ATE1", 500 'command to tell the modem to echo the "AT" back
'Transact "ATE0", 500 'command to tell the modem not to echo the "AT" back
This is what was printed in the immediate window:
04/12/2007 21:18:51 Sending: ATE1
04/12/2007 21:18:51 OnComm: 2
04/12/2007 21:18:51 ReceiveBuffer: ATE1
OK
04/12/2007 21:18:51 Timer: Interval: 100 Stage: Initialising Modem Phase: Receiving
04/12/2007 21:18:51 Received: ATE1
OK
04/12/2007 21:18:51 Sending: ATDT 12345
04/12/2007 21:18:54 OnComm: 2
04/12/2007 21:18:54 ReceiveBuffer: ATDT 12345
NO CARRIER
04/12/2007 21:18:54 Timer: Interval: 100 Stage: Dialling Phase: Receiving
04/12/2007 21:18:54 Received: ATDT 12345
NO CARRIER
Transact "ATE1", 500 'command to tell the modem to echo the "AT" back
'Transact "ATE0", 500 'command to tell the modem not to echo the "AT" back
This is what was printed in the immediate window:
04/12/2007 21:18:51 Sending: ATE1
04/12/2007 21:18:51 OnComm: 2
04/12/2007 21:18:51 ReceiveBuffer: ATE1
OK
04/12/2007 21:18:51 Timer: Interval: 100 Stage: Initialising Modem Phase: Receiving
04/12/2007 21:18:51 Received: ATE1
OK
04/12/2007 21:18:51 Sending: ATDT 12345
04/12/2007 21:18:54 OnComm: 2
04/12/2007 21:18:54 ReceiveBuffer: ATDT 12345
NO CARRIER
04/12/2007 21:18:54 Timer: Interval: 100 Stage: Dialling Phase: Receiving
04/12/2007 21:18:54 Received: ATDT 12345
NO CARRIER
ASKER
what is OnComm: 2 ?
on what stage it dailed?
do i need always to send ate1 3 times? and atdt with the numbers 3 time too?
on what stage it dailed?
do i need always to send ate1 3 times? and atdt with the numbers 3 time too?
ASKER
what is the diffrences in coding between serial rs232 cable and USB cable?
Good morning.
I have used the Comm port before, but this is the first time that I have tried to program for a USB port. I think we must treat the USB as if it were a Comm port, trusting that the USB driver will take care of the details.
I have used the Comm port before, but this is the first time that I have tried to program for a USB port. I think we must treat the USB as if it were a Comm port, trusting that the USB driver will take care of the details.
So, as far as I know there are no differences in programming a real Comm port and one which is a USB and a driver.
I don't know exactly why the program sends three times, so I will analyse that next.
ASKER
it is not a problem for me to use rs serial cable...
is it matter what kind of sms service provider i am using with the motorola/nokia device?
is it matter what kind of sms service provider i am using with the motorola/nokia device?
OnComm 2
This reports the OnComm event where the value of CommEvent is 2. In the code that is a constant named comEvReceive, so it means that we have just received something
This reports the OnComm event where the value of CommEvent is 2. In the code that is a constant named comEvReceive, so it means that we have just received something
I have been concentrating on getting dialling to work. I am an old person and don't use SMS very much. However, I'll try that next, because that is what you need.
ASKER
half old or a half new?:)...i dailed my motorola from the hyperterminal with serial cable...but still cannot find a way to write VB to do this...
i am using now motorola with one mobile service provider. if i will chabge the sim...do you think it effect the connections with the sms?
i am using now motorola with one mobile service provider. if i will chabge the sim...do you think it effect the connections with the sms?
No. The connection method will be the same.
Do you get any output in the immediate window when you run the program? If so, can you post it here?
Do you get any output in the immediate window when you run the program? If so, can you post it here?
I can't go any further with my equipment at the moment.
The Sony Ericsson returns the word ERROR when I try to issue SMS commands, and I have no means of connecting my Nokia to a PC.
For your information, most of the advice on SMS connection avoids using the mobile phone, but connects directly from the PC to the SMS service.
The Sony Ericsson returns the word ERROR when I try to issue SMS commands, and I have no means of connecting my Nokia to a PC.
For your information, most of the advice on SMS connection avoids using the mobile phone, but connects directly from the PC to the SMS service.
ASKER
for example i got 10,000 sms at a time...my income limit is 200 sms
the program will need to read each sms than to procces it and delete it and read the new one...
speed is highly important...may be i will need a special GSM modem and not a regular mobile phone?
the program will need to read each sms than to procces it and delete it and read the new one...
speed is highly important...may be i will need a special GSM modem and not a regular mobile phone?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
no i don't need to dail...
but do i need a gsm modem or a phone?
if i want(dream) it to get 10,000 sms in same time...
but do i need a gsm modem or a phone?
if i want(dream) it to get 10,000 sms in same time...
I expect that your phone will do the job. I'm not an expert in mobile phones, but as I understand it, just about all mobile phones have GSM modem functionality.
I will need to know exactly what happens when you run the program (paste the Immediate window results) if I am to help you any further.
I will need to know exactly what happens when you run the program (paste the Immediate window results) if I am to help you any further.
ASKER
i ment to write 1000...
i manage to get
Sierra Wireless AirCard 875U USB
i got it right here with me...it is staring at me right now...i want to say to him something but i don't know how to communicate with this...cause i don't know what AT command i have to use...i am sure it want to say something to me:)
some one knows where i can find the AT for sierra?
i manage to get
Sierra Wireless AirCard 875U USB
i got it right here with me...it is staring at me right now...i want to say to him something but i don't know how to communicate with this...cause i don't know what AT command i have to use...i am sure it want to say something to me:)
some one knows where i can find the AT for sierra?
ASKER
this is not a regular at command i think cause
+csms do not work...it got to be something like "at xxxx"
how to use those commands?
+csms do not work...it got to be something like "at xxxx"
how to use those commands?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i just write +cmgr
?
or i need at and to add something before that?
?
or i need at and to add something before that?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok...now i see the connection::)))
last question about this-
Sierra Wireless AirCard 875U USB
how can i check if it realy got better traffic than the regular nokia\moto mobile phone?
last question about this-
Sierra Wireless AirCard 875U USB
how can i check if it realy got better traffic than the regular nokia\moto mobile phone?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AT+CMGL="REC UNREAD"
how i can write it inside the vb code, in a way that it will send this command to the mobile phone?