Basic GSM862-GPS to Microprocessor Communication

Hi everyone,

I have a GSM862-GPS and breakout board and I am hoping to get it communicating over UART with a Freescale HCS12X microprocessor ([this one specifically)

The GSM powers on fine, I have an LED hooked up to the PWR_CTL pin and when I power on it stays lit.

My level translation circuit is working fine. The Freescale uses 0-5v and the GSM uses 0-2.8v. I use a voltage divider (470/560) for Freescale TX and it should accept the 0-2.8v from the GSM on the RX. I have tested this by sending the command AT through the Freescale then through the divider and then looping it back to my Freescale’s RX. The Freescale correctly reads the AT.

I have an oscilliscope hooked up and triggering from the GSMs RX line. (The manual mentions that RX and TX are named from a software standpoint, so RX on the GSM is its output). I turn the GSM module on, then when I press a button on my Freescale it sends AT, however I do not get a response from the GSM (confirmed on the oscilliscope). I would be expecting to recieve OK, but I get nothing.

I haven’t seen many topics on getting stuck here, has anyone gotten past this point (GSM<>microprocessor over UART)? Does anyone have any ideas/suggestions as to the problem I’m having? I would love to get basic communication between the two devices working. I currently believe it could have to do with some of my UART settings on the Freescale. I’m currently using 38400 baud.

Thanks for your time,

Alaris](Automotive, IoT & Industrial Solutions | NXP Semiconductors)

Hello again,

I’ve noticed if I put a SIM card into the device it will send out data over its RX line. It will not, however, respond to any of my commands I send it through TX. Is it running a python script or something instead of being in “microprocessor AT command” mode? If so, what is the solution to that?

Thank you,

Alaris

Hello! I have the similar problem with my GM862! I’m trying communicating with GM862 over PC so i’ve used MAX232 chip for this! So i don’t if my TELIT is damaged or what, because the status led immediately starts flashing and PWRMON pin is also immediately ON even if i dont press ON/OFF button. But RESET-ing the RESET PIN works and the STATUS LED flashes. I wrote program in VB.NET for sending AT COMMANDS to GM862. Couple of times i got some trash from it after sending AT command but nothing like “OK” response.

Colud you please tell me hot is your start sequence after applying power to GM862? Do you have to press the ON/OFF button to start the TELIT?

I’m using the 863, but it’s similar. You have to use the on/off button to start the unit. Here’s the (PIC) code I use to get the initial response:

		;initial check (100ms timeout)
		call	ClearBuffer
		call	OUTMSG1		;send ATE (no command echo)
		call	Timeout100ms
main1:
		call	ReceiveSerial	;get char in W
		movwf	INDF		;save in buffer
		movwf	Temp
		incf	FSR,F		;bump pointer
		btfss	Flags,0		;timout flag set?
		goto	main1		;no, try to get more chars
		call	dly		;yes, continue

Leon

Hello! Thank you for your response.I don’t know what could be wrong. After applying power to GM862 it selfstarts without pressing the ON/OFF button, STATUS LED flashes(sometimes flash for a long period of time but sometimes just flashes couple of times and then stays on like it would during a CALL). When i try to shutdown wiht ON/OFF button it doesn’t PWRCTL is on all the time. But if i manually RESET it it does reserts.

I’m clueless right now.

Maybe it has something to do with ADC pin which in HW user guide says that has to be grounded, but somewhere i found that BASIC 50 pin board has failure beacause this pin is grounded(I’m using that board but i made it my self). Maybe it has to do with RTS pin which is mentioned that has to be grounded if application uses only 3lines to communicate with TELIT.

Could you please describe your configuration for TELIT?

I don’t think it should self-start. Does it switch off if you hold the switch down for two seconds? If it doesn’t, there must be something wrong with the module.

GSM TxD on the module is an input, and RxD is an output. You must use a max. of 3.3V on the serial pins. All the other modem pins can be left unconnected.

The 862 might be a bit different.

Leon

No it doesn’t swithc off and PWRCTL pin is also on which represents if the module is powered and it should be also low if you switch off TELIT. Only RESET works. On MAX232 i’m using two zener 3.3V diodes for lower levels from 0v/5v to 0v/2.8V level for TELIT.

Me again! Today i tried my TELIT again and i HAVE managed to switch on with ON/OFF button two times than it started to behave like before. Now i think that my board isn’t so good.Maybe it has some bad connections. SO i will now make a new one only with pins that have to be connected for TELIT to work and to comunncating.

It does sound as if you have a hardware problem.

Leon

While I’m sure the OP appreciates everybody hijacking his thread and talking about only slightly related problems, there is still his post that nobody has responded to.

I am having the same issues as the OP, and would appreciate some input into the situation, as it is holding up my work a great deal.

Is the GSM supposed to respond with OK at this point, or is there possibly some other configuration that I (and the OP) have missed?

Do you still have the hardware flow control set on the module? It is by default. This may give you problems.

You can check your level conversion by hooking it up to the GPS raw data output just to check that its working.

How do you disable hardware flow control on the GSM? Does it involve flashing the device? I searched these forums and couldn’t find anything, I’m going to continue searching through the GSM documents and I’ll update if I find anything.

I didn’t realize flow control was on by default, this could very well be the problem b/c I have none of those lines hooked up.

Thanks

edit: just found this in the manual, trying it out (whoops):

RTS should be connected to the GND (on the module side) if flow control is not used

Well after grounding that RTS line and testing out a few different baud rates, I still cannot get the GSM to respond to an AT. I am thinking of purchasing the USB eval model from sparkfun, confirming it works using hyperterminal, then begin again trying to get it communicating with a microprocessor.

Thanks for everyone’s help

AT\Q[] Set command controls the RS232 flow control behaviour.

Parameter:

0 - no flow control

1 - software bi-directional with filtering (XON/XOFF)

2 - hardware mono-directional flow control (only CTS active)

3 - hardware bi-directional flow control (both RTS/CTS active) (factory

default)

Note: if parameter is omitted, the command has the same behaviour as

AT\Q0

Note: \Q’s settings are functionally a subset of &K’s ones.

Download the latest command set from http://www.roundsolutions.com/techdocs

If you dont use flow control make sure you impliment a check some for data transfer AND NEVER TRY A FIRMWARE UPGRADE WITHOUT FLOW CONTROL

Well I was going to do 3 pin serial first before setting up all the hardware flow control as I thought it would be easier, but it sounds like I’ll have to start with full flow control anyway. How would one send that command to turn flow control off without using flow control when sending that very command?

I’ll test some more things out and report if I get anything working. Thanks again!

Hello! Today I’ve tested my new board and now works great. So before i had bad connections and that was the reason that my old board didn’t work.

My TELIT is now configured like this:

RXD(which is output) pin connected → RX RS232

TXD(which is input) pin connected → TX RS232

GND is connected to pins 2,4,6 looking from TELIT MOLEX connector

VBATT is connected to pins 1,3,5,7 looking from TELIT MOLEX connector

I didn’t grounded RTS pin(in Hardware user guide says it must be grounded if using only 3 lines for communicating).

STATUS pin to → green LED diode

PWRCTL pin to → red LED diode

ON/OFF to button

RESET to button

But now i have another problem.

I want to send an SMS but it’s giving me an error +CREG:0,2 (Mobile is currently not registered on any network but is looking for a suitable one to

register.) and than after few seconds TELIT shuts down. :?

Tnx for all replays!

Problem solved!

The clock speed had a multiplier I was unaware of so I calculated my baud rate incorrectly. After correcting this we sent AT and recieved the OK response with no problems.

Thanks everyone!

Hi - am interested in code to call SMS from arduino chip - is this very different from the chip set you used / could you share your code to do this?

Thank you

velocet:
AT\Q[] Set command controls the RS232 flow control behaviour.

Telit also has the AT+FLO. Just set it to 0.

If you dont use flow control make sure you impliment a check some for data transfer AND NEVER TRY A FIRMWARE UPGRADE WITHOUT FLOW CONTROL

The telit is a pretty robust module. Firmware upgrades can fail without any real damage. In nearly all cases, the worst you can do, is blow off any trace of software. But no worries, the bootloader will immediately come up on module start (making STAT_LED solid) waiting for some good code.

Maybe I just live dangerously, but i do firmware upgrades without flow control lines hooked up on all my telit’s.

I want to send an SMS but it’s giving me an error +CREG:0,2 (Mobile is currently not registered on any network but is looking for a suitable one to

register.) and than after few seconds TELIT shuts down.

If a telit module shuts down during registration, it is almost always power related. You are not able to source enough current for some power thirsty transmit operation (registering with the network at 2 watts), the voltage sags too low, and the unit shuts down.

If you are using AC power, make sure it can give you 2A @ 3.7VDC (or whatever you are giving it). If you are using the recommended Li+ battery size, you will probably be able to source plenty of current.

You also want to make sure you have a nice tantalum cap of 100uF to give you power when you need it fast. In my experience, omitting the capacitor or using the wrong type has been pretty disastrous to operation.

Hi! Tnx for replaying. You were right. It was power problem.I’ve been using standard CAPS 100uF and this is the reason that GM862-GPS was shutting down. But i did a little test. How big must be the standard CAPACITITOR that module doesn’t shut down during registration on network.In my case I had to use like 7000uF or above :slight_smile: . But using tantal CAPS or low ESR capacititors of 100uF is important if you want to avoid this problem.

BYe bye