dan007

I have stumbled across various solutions for the interface and sketch code for an Arduino using Siemens TC35i, but I can't seem to find anything that works.

I am wondering if anyone has a basic sketch out there that can send an SMS text message from the Arduino using what I believe is AT commands.

Also seperate to this I can't make out why a supply of 2A is required, I connected a 300mA supply @ 8v and when powered up, I can ring the number on the sim card inserted to the Siemens TC35i and get a ringing noise on my mobile phone. So surely the power supply can handle sending a SMS text message.

romani

If you are sure the gsm module is working and you don't get any response try sending AT commands with println() instead of print(). The modem expect's CR and LF characters at the end of each AT command;

romani

KazDuzar

I had quite some problems with a TC35 board (note not the TC35i) in combination with the AT+CMGF=1\r command.It turned out that depending on the delay ofter this command, an SMS was send (or not). The worst thing was that the required amount of delay was depending on the length of the SMS message.

The following example worked for me, when i did not change the SMS message too much: http://arjanvdbeek.nimio.info/electronics/sms-using-a-uc/siemens-tc35-gsm-board/

Hello folksI'm using this modem a while ago.I had made a small .h file with some functions to deal with it.In future I will create a library but for now I'm out of time.If you want to use it all you have to do is include this file and then call the functions in the main program.The file is away of be perfect, like I said it not finished and should contain some bugsTo use the functions here is an example for those don't understand how to use it:

dan007

Wowzers Hugo :-) Just D/L the header file and had a brief read of it. It looks very impressive and seems to cover most of the basic functions you would like to use a TC35i (using AT command set).

Correct me if I am wrong, but you can read a sms message with this and it extracts the data into an array? This is exactly the purpose I got my TC35i modem for, since when it recieves a message saying "heating on", I want my Arduino Uno to in turn bring in a relay which will drive my heating.

I'll have further look into the .h file, but it all looks very good so far, and neatly presented.

Correct me if I am wrong, but you can read a sms message with this and it extracts the data into an array? This is exactly the purpose I got my TC35i modem for, since when it recieves a message saying "heating on", I want my Arduino Uno to in turn bring in a relay which will drive my heating.

*senderID = get_SMS_ID_Sender();//The function get_SMS_ID_Sender() will return a pointer that points to a variable containing the number of the sms sender *messageBody = get_corpo_sms(); //this function return a pointer that points to a variable cointaining a string

The code is not prepared to use a softserial unfortunately, so you need to use a UART Port.I will try to implement that later.Thanks for your feedbackIf you have any trouble just ask

if(strstr(data, "+CMGR:") && strstr(data, "+448080808080")){ // Reads the +CMGR line to check if SMS is from a known Phone number // This if statement could cover the whole of the process_data function // then only known a phone number could control the Arduoino }

if(strstr(data, "+CMTI:")){ // An SMS has arrived char* copy = data + 12; // Read from position 12 until a non ASCII number to get the SMS location SMS_location_number = (byte) atoi(copy); // Convert the ASCII number to an int gsmSerial.print("AT+CMGR="); gsmSerial.println(SMS_location_number); // Print the SMS in Serial Monitor } // this SMS data will go through this process_data function again // any true if statements will execute

dan007

Looks like my weekend is sorted, I have pretty much a small snipet of code running at the moment, that can do the following;

Send SMS

Read SMS

My task was to read the sms then store into an array of some sort, then learn how to parse out the actual message content recieved.Next step would be to make it automatically get the new message and do the same with the data. Followed by the deletion of that message making it available for the next command.

I noted the code was for TC35 not TC35i, but that neither here nor there as AT commands and functionality are pretty much all the same from various modems including phones.

Hugo and LJRob, thanks a bunch and shall keep you posted on how the project goes.

Hopefully I will eventually be able to post a YouTube video on the working solution......fingers crossed :-)

Regards

Dan

P.S both examples and coding is well written, and well documented. Makes it great for understanding the functionality.

dan007

All is going quite well at the moment during a debug stage and understanding of the code.As I progress I have been editing it slightly to meet the demand and eliminate code that isn't required.

As it stands I can send an sms, heating on/off, lights on/off, and create actions based on this (currently LED change state). I added a feature so that when the heating/lighting changes state it replies with a message for example, "Heating is now on" to let the user (myself) know that it has been actioned. At a later date this will be done by a fail safe connection from a relay, so unless the relay is energised the light can't be on.

Added a general status function in which acts on the command status, and then produces "Heating ON, Lighting OFF" for example.

Going to start having a look at ripping apart a smoke alarm for fire detection, get a PIR for house alarm etc.

Regards Dan

But I can honestly say it is coming on grand :-)

daveb27

I am working on a project where, when a smoke detector is activated, it sends an RF signal to my Arduino which then calls or texts (or both) my phone. It is working great but I want to be able to send an SMS containing a phone number to Arduino which then becomes the default number that is called when the smoke detector is triggered. In summary I am having no joy receiving SMSs!