April 19, 2024, 04:54:55 AM

Duinomite-Mini and MOD-GSM

Started by balaji, November 24, 2012, 08:59:02 AM

Previous topic - Next topic

balaji

Hello,

I am using Duinomite-Mini with MOD-GSM (both bought from Mouser). So, DM-Mini comes with v2.7A.
I am trying to use the example in "http://olimex.wordpress.com/2012/02/01/duinomite-project-implementing-gms-remote-control-in-basic-with-few-lines-of-code/"

But it seems nothing is working. I do not get any message from GSM. Also no error message from DM. It asks for the command like "CMD:" then I give the command like "AT+CSQ" and enter (all caps). It returns to again as "CMD:" and waiting for next input. So no reply from GSM. Also I tried small example to make a call (just 2 lines). I dont get any calls. So, it seems GSM doesnot even receive anything.

From DM Side,
1) Normal commands are working - so DM OK.
2) Tried with removing SD card/having SD card - no success

From GSM side:
1) 11.5V supply is given
2) SIM card without Pinlock is inside
3) RED LED blinks every 3s --> So everything from MOD-GSM seems ok.

Both connected with UEXT provided with MOD-GSM.

I am using MMIDE(also tried Realterm) for DM programming, please find attached the program I am using(nothing but the copy as in the above link).

Could you please help me, what is going wrong here?

Thank you in advance.

CODE:(MMIDE gives automatically the line numbers)
MSG$="" 'MOD-GSM returned message
CMD$ ="" 'MOD-GSM command
OPEN "COM3:9600" AS #1 'Open UEXT UART to talk to MOD-GSM
PRINT "CMD:"; 'wait for command
C$ = INKEY$ 'get character
IF C$ = "" THEN 100 'if no character is entered check if MOD-GSM didnt sent message
IF C$=CHR$(13) THEN PRINT #1,CMD$ : CMD$="": PAUSE 250: ? : GOTO 40 'send command
CMD$ = CMD$ + C$: PRINT C$; 'otherwise add the character to the command
GOTO 50
IF EOF(1) THEN 50 'check if something is in the UART receive buffer
M$ = INPUT$(1,#1); 'read character from the receive buffer
IF M$ = CHR$(13) THEN 150 'if this is CR print the message
IF M$ <> CHR$(10) THEN MSG$ = MSG$+M$ 'else add the character to the message
GOTO 50 'go back check for keys on the keyboard
? "(";LEN(MSG$);")";MSG$: MSG$="" 'here you can print or process MOD-GSM message
GOTO 40



taucapic

#1
Hi balaji,

is  pin 6 UEXT low (CTS) ?

SETPIN 6,8
  PIN(6)=0





balaji

#2
Hi,
Thanks.

Could you explain me why?

UEXT 6th Pin seems to be SDA1. So, how does it configured to SETPIN 6?

Also, I do not know, where to insert this code?
I tried to insert it after OPEN, my DM hangs.

Anybody has any sample code to start with MOD_GSM with DM?

Regards
Balaji

taucapic

Hello, I will try to explain the thinking.

We must look at MOD-GSM-schematic.pdf It has pin 6, it is CTS. So we need to match UEXT MOD-GSM and UEXT DUINOMITE carefully. This is our work in this project.

OLIMEX seems made it. As written on the page https://www.olimex.com/Products/Modules/RF/MOD-GSM/

FEATURES
DOCUMENTS
HARDWARE
SOFTWARE
•   EW-ARM Demo code for MOD-GSM and MOD-GSM-EDGE (high speed) GSM modules connected to STM32-LCD
•   Project showing how to use MOD-GSM with DUINOMITE boards Note on the project: you will have to set CTS low in the DUINOmite board by using
5 SETPIN 6,8
9 PIN(6)=0
or cutting the UEXT cable
•   Call demo with MOD-GSM and PIC32-PINGUINO-MX220 for Pinguino IDE (refer to the two .txt files in the main archive folder for more info)
•   Send/Receive SMS demo with MOD-GSM and PIC32-PINGUINO-MX220 for Pinguino IDE (refer to the two .txt files in the main archive folder for more info)

       But it is necessary to check again to be safe.
Pin configuration usually do  at the beginning of the program, which is declared variables.
       As far as I know, MMIDE developed on later versions then  v.2.7

I would try to get a result on a version v.2.7, then  move on later version.
     Regards  Taucapic.






balaji

Hi Taucapic,

Thanks for the explanation. Sorry, I didnot look into these notes before.

Here is my Simple code:
SETPIN 6,8
Pin(6)=0
OPEN "COM3:9600" AS #1
PRINT #1, "ATD+xxxxxxxxxx;"

xxxx --> CountrycodeCityCodePhoneNumber

I do not get any calls. MOD-GSM was before working with my PIC Development board.
So, I am not sure, whats going wrong  :(

Now I tried also with Realterm terminal software. Also with MMIDE.
Nothing seem to work.

Any more mistakes I am making?

regards
Balaji


taucapic

#5
Hi!
I think that it is necessary to repeat the results carefully
the article "http://olimex.wordpress.com/2012/02/01/duinomite-project-implementing-gms-remote-control-in-basic-with-few-lines-of-code/"
Strictly according to v.2.7, without MMIDE.
My distributor has
none of these devices from OLIMEX now.
But in our laboratory we have a similar module.
I will work
on DUINOMITE - MINI with DM-MM BASIC V.4.0.
Tomorrow  OLIMEX will be here , maybe something
prompt.
It will be interesting to see the results .
This project is very promising.
Regards
Taucapic

balaji

Hi Taucapic,

Thanks!

As you said, hopefully, Olimex can suggest something on this!

Regards
Balaji

olimex

from the code snippets you post I see that you do not use DM-BASIC but MM-BASIC without labels
MM-BASIC do not support real UARTs but bit-bang UART
all our examples are with DM-BASIC also you have either to cut your cable signals different from the UART+POWER i.e. last 6 wires either to setup CTS as explained in the document

balaji

Hi Olimex,

I thought DM-Mini ships from Mouser has DM BASIC.
Is it not true?

If you confirm this, I will try to update the firmware from you and give a try.

Regards
Balaji

olimex

yes, Mouser should ship Duinomite with DM-BASIC
what made me though you use MM-BASIC is that your code example have no labels

balaji

Hi,

I use MMIDE, and it takes labels automatically, when I load any .bas file.
Is it necessary, that I cut the cable?
Or jsut use the code example, which is provided by Taucapic regarding SETPIN?

Thanks for your answer in advance.

Best regards
Balaji