Update Online Database using GSM/GPRS Shield

Microcontroller, DSP and FPGA Topics

Re: Update Online Database using GSM/GPRS Shield

Postby Neo » Sun Aug 31, 2014 9:20 am

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"
User avatar
Neo
Site Admin
Site Admin
 
Posts: 2612
Joined: Tue Jul 14, 2009 8:37 pm
Cash on hand: 221,202.10
Bank: 15,536,454.00
Location: Colombo/London
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 94
Registered friends: 12
Highscores: 13
Reputation point: 74
Lieutenant

Re: Update Online Database using GSM/GPRS Shield

Postby lakindu93 » Sun Aug 31, 2014 2:48 pm

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
User avatar
lakindu93
 
Posts: 21
Joined: Wed Jun 26, 2013 7:15 am
Cash on hand: 716.20
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: Update Online Database using GSM/GPRS Shield

Postby Neo » Sun Aug 31, 2014 5:11 pm

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.
User avatar
Neo
Site Admin
Site Admin
 
Posts: 2612
Joined: Tue Jul 14, 2009 8:37 pm
Cash on hand: 221,202.10
Bank: 15,536,454.00
Location: Colombo/London
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 94
Registered friends: 12
Highscores: 13
Reputation point: 74
Lieutenant

Re: Update Online Database using GSM/GPRS Shield

Postby lakindu93 » Sun Aug 31, 2014 7:24 pm

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> ?
User avatar
lakindu93
 
Posts: 21
Joined: Wed Jun 26, 2013 7:15 am
Cash on hand: 716.20
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: Update Online Database using GSM/GPRS Shield

Postby lakindu93 » Thu Sep 11, 2014 6:49 am

Help me to get BTS location using AT Commands...  :(
User avatar
lakindu93
 
Posts: 21
Joined: Wed Jun 26, 2013 7:15 am
Cash on hand: 716.20
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: Update Online Database using GSM/GPRS Shield

Postby Neo » Sun Sep 14, 2014 9:39 pm

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.
User avatar
Neo
Site Admin
Site Admin
 
Posts: 2612
Joined: Tue Jul 14, 2009 8:37 pm
Cash on hand: 221,202.10
Bank: 15,536,454.00
Location: Colombo/London
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 94
Registered friends: 12
Highscores: 13
Reputation point: 74
Lieutenant

Re: Update Online Database using GSM/GPRS Shield

Postby lakindu93 » Mon Sep 15, 2014 2:55 am

hmm ok thanks aiya...
User avatar
lakindu93
 
Posts: 21
Joined: Wed Jun 26, 2013 7:15 am
Cash on hand: 716.20
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: Update Online Database using GSM/GPRS Shield

Postby lakindu93 » Wed Sep 17, 2014 1:49 pm

එක PC එකක් ඇතුලේ host කරලා තියෙන mysql database server (local database එකක්), EFcom GPRS/GSM shield එක පාවිච්චි කරලා access කරන්න පුළුවන් ද? පුළුවන් නම් කොහොමද කරන්නේ කියල idea එකක් කියන්නකෝ...
User avatar
lakindu93
 
Posts: 21
Joined: Wed Jun 26, 2013 7:15 am
Cash on hand: 716.20
Location: Colombo

Invitations sent: 0
Registered friends: 0
Reputation point: 0
Lance Corporal

Re: Update Online Database using GSM/GPRS Shield

Postby SemiconductorCat » Wed Sep 17, 2014 5:42 pm

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.
User avatar
SemiconductorCat
 
Posts: 462
Joined: Mon Aug 22, 2011 3:12 pm
Cash on hand: 23,861.30
Location: currently in hyperspace

Invitations sent: 0
Registered friends: 0
Reputation point: 9
Corporal

Re: Update Online Database using GSM/GPRS Shield

Postby Neo » Wed Sep 17, 2014 6:22 pm

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.
User avatar
Neo
Site Admin
Site Admin
 
Posts: 2612
Joined: Tue Jul 14, 2009 8:37 pm
Cash on hand: 221,202.10
Bank: 15,536,454.00
Location: Colombo/London
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 94
Registered friends: 12
Highscores: 13
Reputation point: 74
Lieutenant

PreviousNext

Return to Embedded Processors & Programming

Who is online

Users browsing this forum: No registered users and 2 guests