Page 2 of 3

Re: Update Online Database using GSM/GPRS Shield

Posted: Sun Aug 31, 2014 2:50 pm
by Neo
Any one know about how to get the GSM BTS location using AT Commands....(like cell info display in mobile phones)
I'm using SIM900 Efcom GSM/GPRS Shield..
Use following commands to read the broadcast messages coming in channel 50. Let us know your response.

Code: Select all

AT+CMGF=1
AT+CNMI=2,0,2,0,0
AT+CSCB=0,"50","0-9"

Re: Update Online Database using GSM/GPRS Shield

Posted: Sun Aug 31, 2014 8:18 pm
by lakindu93
Here is the output.. it gives an error :(

AT+CMGF=1

OK
AT+CNMI=2,0,2,0,0

OK
AT+CSCB=0,"50","0-9"

ERROR

Re: Update Online Database using GSM/GPRS Shield

Posted: Sun Aug 31, 2014 10:41 pm
by Neo
Get the AT command reference manual for the exact version you use and see whether it has CSCB command. It is found that some versions don't have this function.

Re: Update Online Database using GSM/GPRS Shield

Posted: Mon Sep 01, 2014 12:54 am
by lakindu93
Neo wrote:Get the AT command reference manual for the exact version you use and see whether it has CSCB command. It is found that some versions don't have this function.
AT command reference manual has that command
AT+CSCB?
+CSCB: <mode>,<mids>,<dcss>

what is this <mids> and <dcss> ?

Re: Update Online Database using GSM/GPRS Shield

Posted: Thu Sep 11, 2014 12:19 pm
by lakindu93
Help me to get BTS location using AT Commands... :(

Re: Update Online Database using GSM/GPRS Shield

Posted: Mon Sep 15, 2014 3:09 am
by Neo
If the above commands doesn't work at all, then it seems your chip either doesn't have the feature or you are using a duplicate chip. It is good to contact the customer service of the chip manufacturer with details so they would assist you from there.

Re: Update Online Database using GSM/GPRS Shield

Posted: Mon Sep 15, 2014 8:25 am
by lakindu93
hmm ok thanks aiya...

Re: Update Online Database using GSM/GPRS Shield

Posted: Wed Sep 17, 2014 7:19 pm
by lakindu93
?? PC ???? ????? host ???? ????? mysql database server (local database ????), EFcom GPRS/GSM shield ?? ???????? ???? access ????? ??????? ?? ??????? ??? ?????? ?????? ???? idea ???? ????????...

Re: Update Online Database using GSM/GPRS Shield

Posted: Wed Sep 17, 2014 11:12 pm
by SemiconductorCat
lakindu93 wrote:?? PC ???? ????? host ???? ????? mysql database server (local database ????), EFcom GPRS/GSM shield ?? ???????? ???? access ????? ??????? ?? ??????? ??? ?????? ?????? ???? idea ???? ????????...

Directly.
First you need to shift your database server into your DMZ zone and then enable it for the world.
Then you need to forward the mysql port in your router. Probably your router would support this option with a nice web based router GUI.

Then your ardino directly connect to that server using that connection.

Code: Select all

/**
* Example: Hello, MySQL!
*
* This code module demonstrates how to create a simple 
* database-enabled sketch.
*/
#include "SPI.h"
#include "Ethernet.h"
#include "sha1.h"
#include "mysql.h"

/* Setup for Ethernet Library */
byte mac_addr[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress server_addr(10, 0, 1, 23);

/* Setup for the Connector/Arduino */
Connector my_conn; // The Connector/Arduino reference

char user[] = "root";
char password[] = "secret";
char INSERT_SQL[] = 
 "INSERT INTO test_arduino.hello VALUES ('Hello, MySQL!', NULL)";

void setup() {
  Ethernet.begin(mac_addr);
  Serial.begin(115200);
  delay(1000);
  Serial.println("Connecting...");
  if (my_conn.mysql_connect(server_addr, 3306, user, password))
  {
    delay(500);
     /* Write Hello, World to MySQL table test_arduino.hello */
     my_conn.cmd_query(INSERT_SQL);
     Serial.println("Query Success!");
  }
  else
    Serial.println("Connection failed.");
}

void loop() {
}
There is another way to do this using a web service or HTTP front end. In that way they
are using "onewire" library.In that way you don't need to do port forwarding or risk your database zone in
a DMZ zone.

src: http://drcharlesbell.blogspot.com/2013/ ... ino_6.html

If this is a short range application like solar plant monitoring , then why didn't you use ethernet or wifi
instead.Wi fi is long term beneficial. And remind you something, sometimes you may need to save your readings
in a SD card like thing in a case where connection is loss or server down. My friend who implemented a solar based
monitoring client have done that, don't know how. But don't assume you have fancy things like sqlite things in
ardino because even sqlite is very large to be implemented on AVR microcontroller. If android or RPI then you could
definitely use MYSQLite.

Re: Update Online Database using GSM/GPRS Shield

Posted: Wed Sep 17, 2014 11:52 pm
by Neo
While Semi has given lot of information on that, I would like to ask 'why not use a shared/Virtual or dedicated server for this?'. Server space had become cheaper over the years and you can buy a cheap shared hosting server for about Rs. 500 per month. If you get a domain registered and assigned to your server, then everything become easier to access.