Sending SMS using C without Eclipse


#1

Howdy!

I am trying to use a PIC microcontroller to communicate to the Q24. My intent is to send string of commands just like you would in hyperterminal. I am using UART to send the data strings. What I am doing is putting the command in an array of characters such as this:

char at[]=“at+csca=”;
—send a quote
char csca[]="+13123149810";
—send a quote
—send 0x0D

and I am using the UART function to transmit each character of the array. I can view this using hyperterminal and it shows up just like it would as if I was using the keyboard to enter these commands. However, the Q24 does not respond the same way. How can I achieve this? Is there a sample code which shows a simple way to transmit SMS messages? If so, where can I see this sample with an explanation? I am using C to program this.

thanks


#2

So how does it respond?

As far as the Q24 is concerned, it is irrelevant whether the commands come from a terminal, some other PC software, a microcontroller, or anything else - just so long as they abide by all the rules.

Are you sure that you have you PIC configured correctly - baud rate, parity, etc?

If your baud rate is slightly off, you might just be lucky with hypoterminal, but unlucky with the Q24…

Are you giving the correct hardware levels & signals to the module?


#3

The Q24 does not reply with an “OK” like it does when I use the keyboard. I have the Baud Rate set to 115200 on my microcontroller and is also the same for the Q24. In terms of flow control the PIC is set to “Simplex mode”. The rest of the settings are 8-n-1. We are using the WiSMO2 Development Board so all of the signals should be ok. What we have is the PIC sending TX and RX to max 3232 chip which from there sends it to the DB9 port of the dev board and from there to the MAX chip in that Board and to the wireless module.

Thanks for fast reply


#4

Well, that’s an absolutely fundamental step - if that bit’s not working, there’s no point worrying about the detail of other commands!

Are you sure that the Q24 is not responding at all - ie, could it be responding, but your PIC isn’t (correctly) getting the response?

Never having used a PIC, I have no idea what “Simplex mode” means in PIC-speak!

The WiSMO2 documentation will tell you what control signals it requires on its serial port - does your PIC “Simplex mode” provide that?

Are you sure that you have Tx and Rx correctly connected - remember that Tx is an input to a DCE (ie, any tyoe of modem).


#5

Hi

The PIC has only two modes of UART…which are “Simplex Mode” and “no Flow Control”. Since this needs hardware control I can only assume it needs the former setting to get strings transmitted to the Q24. Additionally, I have everything set with the proper settings to communicate with it as mentioned on the documentation for the Q24. What I have is the TX line from the microcontroller going to the RX line of the Q24 and the RX line of the microcontroller to the TX pin of the Q24. I’ve turned off the MAX chip as said on the documentation by moving the jumper. Unfortunately, through this method I do not get anything working.

As said before, I tried going from the PIC microcontroller to the MAX3232 chip to the DB9 of the WiSMO2 board which goes to the MAX3238 and then to the Q24, and no response.

Thanks


#6

No, you can - in fact, must - do better than just assume: you must study the PIC documentation carefully and find out for sure exactly what it actually means!

Did you read what I said about the direct of the Tx pin on a DCE (such as the Q24)…?


#7

It works now!

Thanks so much for your help and above all, your patience. I really appreciate it!