Olimex Support Forum

Microcontrollers => PIC => Topic started by: PICO on August 17, 2013, 05:44:53 PM

Title: How to communicate with the PIC-GSM Module?
Post by: PICO on August 17, 2013, 05:44:53 PM
Hello everyone

i purchased the OLIMEX Development board with GSM module and PIC18F67J50 microcontroller and i want now to send and receive message or dial a call with the GSM Module,i already the following steps:
1)i downloded the provided documents and software example(PIC_GSM_5_42stack)
2)i read and follow the descriptions in the pdf documents
3)i insert correctly a valid SIM-Card without PIN into the SIM-HOLDER
4)after powered on the target and call the SIM number, i don´t get any response from GSM Module, i´m allways forward direct to the MAILBOX of the SIM, :-[ the STATUS-Led is still off. (could the GSM Module operate at this time properly? or there are something else to take care?).
5)i downloded succesfully the prebuilt PIC-GSM Demo prebuilt.hex or PIC-GSM Demo.hex file in to target(I use the MPLAB IDE v8.86 with the Microchip mplabc18 v3.42 compiler and the Olimex PIC-ICD2-POCKET IN-CIRCUIT debugger and programmer,my Operating system is  64 bits Windows7 Home premium service Pack 1). The jumpers J1, J2 and MTX/DTX, MRX/DRX are still stay in their default positions.but no comunication between the GSM module and my Handy doesn´t occur.
6)so I downloded and installed the software PuTTy release 0.62 terminal to send AT-Command througt the serialport(USB to RS232). i connect the USB Bus and i can see the COM number. i open the putty software and configure the serialport with 9600 or 115200 baudrate, 8data bits,no Parity and 1 stop bit,then No flow control.And after i send AT command from the putty terminal i don´t receive any response from the GSM Module.

My questions: are anything i forget to do or i have do to?, how can i send and receive SMS or dial a call succesfully  with PIC-GSM Module?

I look forward for any answers and help because i need it really.

Title: Re: How to communicate with the PIC-GSM Module?
Post by: PICO on September 10, 2013, 10:24:50 PM
after i read the sim and GSM datesheet and after i maked a lot of check,i found that the
Li-ion backup battery was the problem. it has a voltage around 1.5V wihich is very low to allow a communcation of the GSM.so i buy an other battery of 4.5V with them i obtain a communication of the GSM. Now the status Led is blinkig and when i call the SIM card nummer i see the rings "RING" on the hyperterminal. i could also call another SIM nummer through the GSM by enter the AT command from the Hyperterminal.

but when i try to send AT commando from the Hyperterminal to send a sms, i don´t see any response of GSM . for example i enter following command:

AT + CMFG=1
AT + CMGS="phonenummer"
>text message

for this command i don´t get any response from the GSM SIM CARD

the configuration of the putty terminal look like this:
115200 baudrate, 8data bits,no Parity flow control: XON/ XOFF

My question:
how can i send SMS with PIC-GSM Module through the hyperternal?

I look forward for any answers.

Pico
Title: Re: How to communicate with the PIC-GSM Module?
Post by: Stanimir5F on September 11, 2013, 03:36:25 PM
Hi, Pico
First I will post publicly the answer we already sent to your e-mail about your first post, so if someone else has similar problem to know how to solve it:
-----------------------------------------------------------------------------------------------------------
> Hello there,
>
> 1) Are anything I forget to do or I have do to? How can I send and receive
> SMS or dial a call successfully with PIC-GSM Module?
> Unfortunately I can't recreate the problem that you describe over here. In
> my case when I power on with with SIM card in the slot and close the jumper
> the GSM module is started instantly without any button and the stat LED
> starts blinking.
>
> Note! It is important that the USB type B is disconnected when you initially
> power the board. This is because it might interrupt the initial
> communication between the PIC and the SIM module. Please also read the
> instructions under AVAILABLE DEMO SOFTWARE here:
> https://www.olimex.com/Products/PIC/Development/PIC-GSM/resources/PIC-GSM.pdf
>
> I can't tell you for sure what the problem is but I can suggest you to see
> if your battery charged. The GSM module requires the battery voltage (that's
> why the jumper BAT_E must be closed). Also please check your power supply if
> it is 12V. In this case your power consumption should be around 0.4A. If it
> is higher maybe the battery is charging right now.
> About your second question you can call/send SMS from the PIC-GSM module via
> web-page (check subpages Send SMS, Phone call). Also you can call the
> GSM-module and the status is shown on the main page (Overview).
>
> 2) Can I use the Microchip Ethernet Discoverer utility to find the IP
> address of the board and to check the GSM Module through Webpage ? Where can
> find it and how can i use it?
> Of course you can use this tool. This is the way to find the address of the
> device. The utility is located in: "<extraction directory>\PIC-GSM
> 5.42\Microchip\TCPIP Stack\Utilities\TCPIP Discoverer.jar". As you can see
> on this version it is no longer *.exe, but *.jar. But it has the same
> functionality.
>
> 3) Is the GSM Module SIM300D_HD_V2 device provided with the firmware and how
> are the is configuration for the baudrate?
> Yes. We receive the SIM300D_HD_V2 modules ready and programmed from the
> manufacturer SIMCOM LTD. It has auto-baud rate up to 115200. It is
> preferable to use 115200 on your terminal to work with the board.
>
> Best regards,
> Lub/OLIMEX
-----------------------------------------------------------------------------------------------------------
Title: Re: How to communicate with the PIC-GSM Module?
Post by: Stanimir5F on September 11, 2013, 03:45:32 PM
As for your second post:
First of all you MUST DISCONNECT the USB before GSM module is initialized (you must see the STAT LED blinking) and then connect it.
When you input the command for SMS sending and input the message text you send it with CTRL+Z key shortcut.
If this isn't working try with Baud Rate - 19200. It should work on any baud rate (for instance 115200) but... just in case :)
If this doesn't fix the problem try sending SMS via web-page. If it doesn't work as well then the problem should be in GSM module or SIM card. Try also command:
ATD<phonenum>; (for instance ATD0123456789;)
and see if it is calling the phone number.

Stanimir, Olimex