Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:29 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : duinomite mmbasic old nokia phone AT com

Author Message
LG046
Newbie

Joined: 02/08/2012
Location: Netherlands
Posts: 12
Posted: 03:05am 11 Aug 2012
Copy link to clipboard 
Print this post

hi

i have a old nokia phone that can work with AT commands
using hyperterminal i can get it to call a number like this

ATD=XXXXXXX ( xxx stand for the phone number )

now i have MMbasic on my duinomite mega and want to do the same

when i do OPEN com4:9600 as console
and type at the prompt ATD=xxxxxx and hit enter it works

but when i do the following code its not working

10 cls
20 open "com4:9600" As #1
30 print #1, "ATD=xxxxx"
40 close #1

the phone is not calling the number..........

Edited by LG046 2012-08-12
 
LG046
Newbie

Joined: 02/08/2012
Location: Netherlands
Posts: 12
Posted: 11:01am 11 Aug 2012
Copy link to clipboard 
Print this post

nobody?

31 views...

maybe get the mod-gsm then.....

would be nice to use the old cellphone is a Nokia 6310i with serial com cable.

otherwise its going to be recycled and ofcourse for a mod-gsm i need to spent some money -(
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 12:55pm 11 Aug 2012
Copy link to clipboard 
Print this post

Does the Nokia connection cable require drivers that the MM doesn't have?
 
jebz

Regular Member

Joined: 13/06/2011
Location: Australia
Posts: 79
Posted: 01:04pm 11 Aug 2012
Copy link to clipboard 
Print this post

Maybe it needs some handshaking or a pause between the characters.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 01:40pm 11 Aug 2012
Copy link to clipboard 
Print this post

  LG046 said  when i do OPEN com4:9600 as console
and type at the prompt ATD=xxxxxx and hit enter it works

That just sets the variable ATD to xxxxxx but as the characters that you typed are echoed on the serial port (opened as console) your phone still gets the string terminated by a single carriage return.

The PRINT command on line 30 adds a carriage return/line feed at the end. Is this what you want?

Use the semicolon to suppress the CR/LF and chr$(13) to generate a single carriage return. Ie:

30 print #1, "ATD=xxxxx" chr$(13) ;

Geoff Graham - http://geoffg.net
 
LG046
Newbie

Joined: 02/08/2012
Location: Netherlands
Posts: 12
Posted: 09:17pm 11 Aug 2012
Copy link to clipboard 
Print this post

  Geoffg said  
  LG046 said  when i do OPEN com4:9600 as console
and type at the prompt ATD=xxxxxx and hit enter it works

That just sets the variable ATD to xxxxxx but as the characters that you typed are echoed on the serial port (opened as console) your phone still gets the string terminated by a single carriage return.

The PRINT command on line 30 adds a carriage return/line feed at the end. Is this what you want?

Use the semicolon to suppress the CR/LF and chr$(13) to generate a single carriage return. Ie:

30 print #1, "ATD=xxxxx" chr$(13) ;

hi thx
i am now trying to send a text message out.

i made some changes.. funny thing is i run the code and get a text message on my phone not only displaying the "example text" but also parts of the code hahaha

and when i run it again , just run edited nothing its no longer working

after a while i can run it again and then it sends out a sms txt again

here is my code

--

10 Cls
15 Open "COM4:9600" As #1
16 Print #1, "AT" Chr$(13) : Pause 1000
17 Print #1, "AT+CVHU=0" Chr$(13) : Print #1, "at+cvhu" Chr$(13) : Pause 1000
20 Print #1, "AT+CMGF=1" Chr$(13) ; : Pause 1000
22 Print #1, "AT+CMGS=" : Pause 250
23 Print #1, Chr$(34) : Pause 250
24 Print #1, "XXXXXXXXX" : Pause 250
25 Print #1, Chr$(34) : Pause 250
26 Print #1, Chr$(13) : Pause 250
27 Print #1, "example text" : Pause 250
28 Print #1, Chr$(26) : Pause 250
23 Pause 1000
26 Print #1, "ath" Chr$(13) ;
27 Pause 1000
30 Close #1

EDIT
made some changes
---
10 Cls
15 Open "COM4:9600" As #1
' 16 Print #1, "AT" Chr$(13) ; : Pause 1000
' 17 Print #1, "AT+CVHU=0" Chr$(13) : Print #1, "at+cvhu" Chr$(13) ; : Pause 250
20 Print #1, "AT+CMGF=1" ; : Pause 250 ' set sms to text mode
21 Print #1, Chr$(13) ; : Pause 250
22 Print #1, "AT+CMGS=" ; : Pause 250 'send sms
23 Print #1, Chr$(34) ; : Pause 250
24 Print #1, "xxxxxxxxxxxxxxxx" ; : Pause 250 'set phone number to send to
25 Print #1, Chr$(34) ; : Pause 250
26 Print #1, Chr$(13) ; : Pause 250
27 Print #1, "example text" ; : Pause 250 'text to send
28 Print #1, Chr$(26) ; : Pause 250
' 23 Pause 1000
26 Print #1, "ath" Chr$(13) ; : Pause 250 'close any connections if not on hook
' 27 Pause 1000
30 Close #1

--
this works i also only get the example text now in my text message
but when i run this command and its finisched i can not run it again.. i have to wait like minutes to be able to send a text message again.....Edited by LG046 2012-08-13
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024