Git Product home page Git Product logo

adafruit_fona's Introduction

Adafruit FONA LibraryBuild StatusDocumentation

This library requires Arduino v1.0.6 or higher

This is a library for the Adafruit FONA Cellular GSM Breakouts etc

Designed specifically to work with the Adafruit FONA Breakout

These modules use TTL Serial to communicate, 2 pins are required to interface

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Check out the links above for our tutorials and wiring diagrams

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution With updates from Samy Kamkar

To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_FONA Check that the Adafruit_FONA folder contains Adafruit_FONA.cpp and Adafruit_FONA.h

Place the Adafruit_FONA library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.

adafruit_fona's People

Contributors

aelfakih avatar akamediasystem avatar bakercp avatar bittailor avatar czincke avatar darrensi avatar driverblock avatar evaherrada avatar feinstein avatar hathach avatar hoffmannjan avatar ladyada avatar njh avatar paintyourdragon avatar psychogenic avatar rgr4y avatar samyk avatar siddacious avatar tdicola avatar thomasricci avatar toddtreece avatar tyeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_fona's Issues

Buffer overflow error in IMEI string

  • Arduino board: ANY

  • Arduino IDE version (found in Arduino -> About Arduino menu): ALL

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): Bug found in code inspection.

Here's an amusing bug in FONATest, line 89, given the comment

char imei[15] = {0}; // MUST use a 16 character buffer for IMEI!

should of course be

char imei[16] = {0}; // MUST use a 16 character buffer for IMEI!

Thanks for this library and the examples! Very useful!
Mikal

MQTT support

Hello,

Is MQTT support available on this device?

I would like to publish via SSL encrypted MQTT. If this library and module could be a transparent GPRS connection it would be perfect.

getNumSMS failed with FONA 800 uFL

Recently purchased a module and found that:

    if (! sendParseReply(F("AT+CPMS?"), F("\"SM\","), &numsms) ) return -1;
  } else {
    if (! sendParseReply(F("AT+CPMS?"), F("+CPMS: \"SM_P\","), &numsms) ) return -1;
  }

https://github.com/adafruit/Adafruit_FONA_Library/blob/master/Adafruit_FONA.cpp#L483

needs to be changed to:

    if (! sendParseReply(F("AT+CPMS?"), F("\"SM\","), &numsms) ) return -1;
  } else {
    if (! sendParseReply(F("AT+CPMS?"), F("+CPMS: \"SM\","), &numsms) ) return -1;
  }

I don't know the scope of this issue or if I have a one off firmware rev on the SIM800 but might be worth looking into.

ADAFRUIT_FONA_DEBUG now set by default?

Was this define set purposely or by coincidence?
File: includes/FONAConfig.h

I just updated this library via Arduino GUI and got all the debug messages....

HTTP Post requests stop after a while

Hi,

I am desperate to get my SIM800L module (http://www.ebay.co.uk/itm/SIM800L-GPRS-GSM-Module-Board-Quadband-QUAD-BAND-Antenna-for-MCU-Arduino-/321992759287) sending POST requests for a long period of time... Sometimes it stops after 100 requests in a row, sometimes 300 so it's really weird.

Everytime I run it, it sends the request for a while (between 1 and 3 hours) and suddenly stops on these AT commands:
---> AT+HTTPINIT
<---

OK
When it works the OK is on the same line and it goes on to the next AT command.
---> AT+HTTPTERM
<--- ERROR
---> AT+HTTPINIT
<--- OK
---> AT+HTTPPARA="CID"
<--- OK
---> AT+HTTPPARA="UA"
<--- OK
---> AT+HTTPPARA="URL"
<--- OK
---> AT+HTTPPARA="CONTENT"
<--- OK
---> AT+HTTPDATA=1221,10000
<--- DOWNLOAD
<--- OK
---> AT+HTTPACTION=1
<--- OK
Status: 201
Len: 0
---> AT+HTTPREAD
<--- OK
---> AT+HTTPTERM
<--- OK

I thought it was a powering problem so I connected the module to the VIN pin of my arduino mega via a buck converter but the problem is still here!

Does anybody have any idea what could be wrong? I can send you the code if needed.

Many thanks in advance
Pauline

setBaudRate sends invalid value for 115200

Working with an Arduino Uno and a FONA 3G. I was following instructions to set baud to 4800. But thought, gosh, I remember when 9600 baud was fast, 4800? So I looked a little harder and noticed this error message in the FONA3G_setbaud sketch:
---> AT+IPREX=49664
Delved further and method ::setBaudRate has baud defined as unsigned int 16 which isn't large enough to store 115200 (only 65535). I change to int32_t and seems to be fine now. Probably ought to be a string and maybe improved with further validating values, the 5320 will provide a list of valid values with AT+IPREX?

Error in ::getNumSMS()?

I am just browsing the source, but based on my own experiments with the SIM800L I think there is an error in ::getNumSMS()

On line 482 of Adafruit_FONA.cpp we see the following code

if (sendParseReply(F("AT+CPMS?"), F(FONA_PREF_SMS_STORAGE ","), &numsms))

But shouldn't that be sending "AT+CPMS=" and not AT+CPMS? a quick test with my own SIM800L module shows that using ? instead of = generates ERROR.

Am I missing something?

fona.GPRSState reports enabled when GPRS has not yet been enabled

FONAtest_gprs.txt

The fona.GPRSState command returns true as soon as the network status changes from a disconnected to a connected state, even if the fona.enableGPRS(true) function has not yet been called.

The issue may be in the modem itself, as the AT+CGATT? command returns 1 in this case when it should not.

This issue prevents me from making a sketch that automatically reconnects GPRS if it unexpectedly goes down. This is because the fona.GPRSState function doesn't accurately report when GPRS is up and down.

I am attaching a version of the FONAtest sketch that has an extra command (D) to run fona.GPRSState. It can be used to validate this bug. You will see that 'D' returns '0' while the modem is trying to connect to the network. However, upon connecting, 'D' begins returning '1' even though the 'G' (Enable GPRS) command has not yet been run.

  • Arduino board: UNO
  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.3

Dynamically setting GPRS APN Settings

APN Settings appear to need to be burned into the code at runtime and don't support being set from variables or values stored in the EEPROM. I need to be able to send an SMS containing the APN settings to the device and have it store the values and have them persist through a reboot.
There's quite possibly something obvious I'm missing here but I've not been able to solve this one.

Make DebugStream configurable

Hi there, if i use the library with only a FONA connected, everything works good. But, as a arduino nano has only one hardware serial and i want to use that for external gps, i have to switch off debugging in FONAConfig.h. This works ofcause, but without debug informations it's difficult to program and sadly my C is not so good so i could not change the DebugStream to a SoftwareSerial my sketch creates for debugging.

Can anybody help here?

Error compiling

Just downloaded FONA_Library,
Getting error in compilation

In member funtion 'boolean Adafruit_FONA::TCPsend(char*, uint_t);
image

Unable to restart fona GPRS

In my code I use Wifi and GSM to send data over the internet. So my code works this way if wifi fails it switches to GSM and if wifi is available again then it will switchback to wifi and now if wifi fails again it is unable to switch to GSM as enableGPRS function returns false every time.

Any help would be appreciated.

Examples have incorrect information.

I am reading the FONAtest.ino and it says the SIM card IMEI a lot, as far as I know, the IMEI is a module's unique number, so even if the user changed the SIM, the IMEI stays the same.

The IMEI comes printed in the SIMCOM module, so I think the text under the examples should reflect that.

Can't able to change library function getGPS() !!

Hello,

I have used Adafruit_FONA library for my project.
Now I want to change getGPS() function according to my need. Actually, I want more GPS parameters from GPS response string. like GNSS satellite used etc.

But whenever I change that function, I get an error like this.


C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.cpp:932:9: error: prototype for 'boolean Adafruit_FONA::getGPS(float*, float*, float*, float*, float*, float*)' does not match any in class 'Adafruit_FONA'

boolean Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude, float *timestamp) {

     ^

In file included from C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.cpp:19:0:

C:\Users\Bprajapati\Documents\Arduino\libraries\Code\Adafruit_FONA.h:158:11: error: candidates are: boolean Adafruit_FONA::getGPS(float*, float*, float*, float*, float*)

boolean getGPS(float *lat, float *lon, float *speed_kph=0, float *heading=0, float *altitude=0);


Change in library is like this,
boolean Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude, float *timestamp) {

It doesn't work.
Can I change function like this?

Thanks!!

Arduino Zero compatibility

Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Arduino projects check these very common issues to ensure they don't apply:

    • For uploading sketches or communicating with the board make sure you're using
      a USB data cable and not a USB charge-only cable. It is sometimes
      very hard to tell the difference between a data and charge cable! Try using the
      cable with other devices or swapping to another cable to confirm it is not
      the problem.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and plug in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

    • Ensure you are using an official Arduino or Adafruit board. We can't
      guarantee a clone board will have the same functionality and work as expected
      with this code and don't support them.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Arduino board: INSERT ARDUINO BOARD NAME/TYPE HERE

  • Arduino IDE version (found in Arduino -> About Arduino menu): INSERT ARDUINO
    VERSION HERE

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW

Sim800l incoming sms problem

Hello.
I'm used sim800l, dht22, ds3231,...
For sim800l adafruit fona library
I tried the "receive call" sample code of this library. "interrupt pin d2 connected".

Incoming calls "interrupt" is working.

but the code stops when I send an SMS to the module.
(incoming sms ---> code stop)
Serial monitor 
looked at serial monitor. during incoming sms;

serial monitor> incoming cal ...

writing and not runing code

Code:

#include "Adafruit_FONA.h"

// Pins which are connected to the FONA.
// Note that this is different from FONAtest!
#define FONA_RX            3
#define FONA_TX            4
#define FONA_RST           5

// Note you need to map interrupt number to pin number
// for your board.  On an Uno & Mega interrupt 0 is
// digital pin 2, and on a Leonardo interrupt 0 is
// digital pin 3.  See this page for a complete table:
//   http://arduino.cc/en/Reference/attachInterrupt
// Make sure this interrupt pin is connected to FONA RI!
#define FONA_RI_INTERRUPT  0

// We default to using software serial. If you want to use hardware serial
// (because softserial isnt supported) comment out the following three lines 
// and uncomment the HardwareSerial line
#include <SoftwareSerial.h>
SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
SoftwareSerial *fonaSerial = &fonaSS;

// Hardware serial is also possible!
//  HardwareSerial *fonaSerial = &Serial1;

Adafruit_FONA fona = Adafruit_FONA(FONA_RST);

void setup() {
Serial.begin(115200);
Serial.println(F("FONA incoming call example"));
Serial.println(F("Initializing....(May take 3 seconds)"));

fonaSerial->begin(4800);
if (! fona.begin(*fonaSerial)) {
  Serial.println(F("Couldn't find FONA"));
  while(1);
}
Serial.println(F("FONA is OK"));

// Enable incoming call notification.
if(fona.callerIdNotification(true, FONA_RI_INTERRUPT)) {
  Serial.println(F("Caller id notification enabled."));
}
else {
  Serial.println(F("Caller id notification disabled"));
}
}

void loop(){
// Create a small string buffer to hold incoming call number.
char phone[32] = {0};
// Check for an incoming call.  Will return true if a call is incoming.
if(fona.incomingCallNumber(phone)){
  Serial.println(F("RING!"));
  Serial.print(F("Phone Number: "));
  Serial.println(phone);
}
}

to the setup part of the code:

fona.setsmsınterrupt (0);

I added again.

The code is breaking when it comes to sms.

Could you help?

how can I do?

Buzzing with the FONA

Can we update the function for setting the PWM of the buzzer? The Feather FONA doesn't have a dedicated PWM pin for the buzzer so it'd be nice to be able to set a pin for this for Feather FONA use.

MQTT Publish failed!!

Hello,

I have used SIM808 GPS/GSM Module, Adafruit_FONA library and, MQTT publish function.
MQTT connection established but, there is an error in publishing data.

Serial Monitor view:

AT+CIPSTART="TCP","test.mosquitto.org","1883"
<--- OK
<--- CONNECT OK
<--- >
---> 84 84 3 194 0 15 0 7 68 101 118 105 99 101 49 0 36 97 116 111 122 105 111 116 38 115 101 61 49 53 53 56 53 48 51 57 50 50 38 115 107 110 61 105 111 116 104 117 98 111 119 110 101 114 164
<--- SEND OK
Publishing GPS data: Mydata
<--- ERROR
Failed to publish data!
---> AT+CIPCLOSE
<--- CLOSE OK

Code is like this,

#elif defined(PROTOCOL_MQTT_MYSIGNAL) const char* MQTT_SERVER = "test.mosquitto.org"; const char* MQTT_SERVERPORT = 1883; // Connect to MQTT broker if (!fona.TCPconnect(MQTT_SERVER, MQTT_SERVERPORT)) Serial.println(F("Failed to connect to TCP/IP!")); if (!fona.MQTTconnect("MQTT","","","")) Serial.println(F("Failed to connect to MQTT broker!")); if (!fona.MQTTpublish("MyTopic", "Mydata")) Serial.println(F("Failed to publish data!"));

Can you please suggest a way to solve it out with an example.

Thanks!!

The timeout of the pickup() method is too short

  • Arduino board: Adafruit Feather FONA
  • Arduino IDE version 1.8.9

The timeout for the pickup() method is only the default timeout (500ms). Sometimes, this timeout is not enough, the response comes shortly after the method times out and returns false.

The SIM800 AT command manual specifies a maximum response time of 20s for voice calls. I therefore suggest changing the timeout for this method to 20s. Optionally, a timeout parameter could be added with 20s as default in case someone needs a shorter timeout.

Similar issues could affect other AT commands used, i did not check it yet.

readline function in FONAtest does not properly

  • Host machine: MacBook Pro (13-inch, Mid 2012), OSX 10.10.5
  • Screen version: 4.00.03 (FAU) 23-Oct-06
  • Screen command: screen /dev/cu.usbmodem1411 115200 -L
  • Arduino board: Arduino UNO (R3)
  • Arduino IDE version: 1.8.5
  • FONA device: Adafruit FONA - Mini Cellular GSM Breakout uFL Version

After setting up the FONA and Arduino as described in the tutorial and "logging on" to the Arduino's serial connection using the screen command above, certain commands like that take input like r for "Read SMS #" work but those that use the readline function like c for "make phone Call" do not. Apparently the screen utility when used like so only sends ASCII carriage returns (0xD) and not line feeds (0xA). I have a PR incoming that treats those chars as equal line enders.

ignore unsolicited

unsolicited messages are annoying and confuse the parser - so maybe have a flag in readline() that if its an unsolicited message, retry the read?

blockings when using the function "callerIdNotification"

Hello! I have recently bought a FONA shild V2 with SIM R14.18 and I am encountering blockings when using the function "callerIdNotification" with last code (version of Jan. 21st, 2016).
Could you please check or give any advice? Thank you very much!
Regards, UdFrederic

Problem with HTTPS - HTTP

Hi,

I experienced some seriuos problems while debugging an issue while using the GET method to an nginx server.

The issue was that even if my URL was http, the library would force it to https. I'm not sure what was causing this, but after browsing the .cpp i only found this function on Adafruit_FONA.cpp at the Adafruit_FONA::HTTP_setup function.

To fix this issue I made a minor adjustment to the Adafruit_FONA.cpp:

`
// HTTPS redirect
if (httpsredirect) {
if (! HTTP_para(F("REDIR"),1))
return false;

if (! HTTP_ssl(true))
  return false;

}else{
if (! HTTP_ssl(false))
return false;
} `

This is probably not the best place to insert my little patch but I suggest you somehow manage to prevent SSL when not required.

TCPread length of data read can be bigger than 256 ?

Hi,

The TCPread call is defined as:

uint16_t Adafruit_FONA::TCPread(uint8_t *buff, uint8_t len)

what happens when you have more than 256 bytes to read ? Or that never happens ?

Another thing is that

uint16_t Adafruit_FONA::TCPavailable(void)

is able to return a length greater than 256 to read from... should we read 256 bytes at a time ?

Thanks!

GPS Fix on FONA 3G

The GPS test and FONA test 3D location fix hasn't worked for 2 different 3G FONA boards I've purchased (with active antennae). Is this just a code issue with the 3G? The SMS and everything else is working fine. Where are the AT commands given as they aren't in the sketch?

HTTP Request not working

Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Arduino projects check these very common issues to ensure they don't apply:

    • For uploading sketches or communicating with the board make sure you're using
      a USB data cable and not a USB charge-only cable. It is sometimes
      very hard to tell the difference between a data and charge cable! Try using the
      cable with other devices or swapping to another cable to confirm it is not
      the problem.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and plug in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

    • Ensure you are using an official Arduino or Adafruit board. We can't
      guarantee a clone board will have the same functionality and work as expected
      with this code and don't support them.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Arduino board: INSERT ARDUINO BOARD NAME/TYPE HERE

  • Arduino IDE version (found in Arduino -> About Arduino menu): INSERT ARDUINO
    VERSION HERE

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW

TCPClose fails to return TRUE when connection is successfully closed

  • Arduino board: Feather M0 Basic Proto - ATSAMD21 Cortex M0
  • Arduino IDE version: 1.6.12
  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too):

Call TCPClose(). The method expects AT+CIPCLOSE response to be OK.

TCPclose should be modified to the one below.

boolean Adafruit_FONA::TCPclose(void) {
  return sendCheckReply(F("AT+CIPCLOSE"), F("CLOSE OK"));
}

AT+CIPCLOSE Response according to SIM800 manual is CLOSE OK and not OK

The original version of TCPclose returns true only if the AT+CIPCLOSE responds with OK due to ok_reply being used:

boolean Adafruit_FONA::TCPclose(void) {
  return sendCheckReply(F("AT+CIPCLOSE"), ok_reply);
}

Make UDP methods

I miss UDP functionality in the library, I am coding it myself right now but I am facing a little dilema.

Most TCP methods are the same as the UDP ones, all the same code for sending, closing etc.. Just the connection part is different, where one needs a "TCP" parameter when opening a connection with the server and the other a "UDP".

I think the correct thing to do is to rename the TCP methods to TCPIP or something similar and let then be generic and the user selects if it's supposed to be TCP or UDP. The problem with this is breaking legacy code compatibility.

So what do you think it's best:

1- To add new methods for UDP, being just a copy of the TCP ones (with the exception of the connect method).

2- Make generic methods that will handle both TCP and UDP and erase the current TCP methods, which can lead to problems in older codes.

3- Do option 2 but keep the old TCP methods, marked as legacy code, to prevent breaking old code functionality.
personally think option 3 is the one to go.

getGPS() fails when buffer length is set to 0 - overwrites other parts of ram

If you use the function getGPS(uint8_t arg, char *buffer, uint8_t maxbuff) but set maxbuff to 0, len will always be 255 (unless somehow strlen(p) > 255). This results in other parts of ram being overwritten which has a high chance of breaking running code.

uint8_t len = max(maxbuff-1, strlen(p));

Code excerpt from

uint8_t len = max(maxbuff-1, strlen(p));

You may ask, "If you're not storing the data to some location, why do you care?" or "Why would you ever set it to 0?". I'm specifically just using the debug outputs to get the data I care about but this doesn't change the fact that this function has the ability to easily break your code.

While we're at it, buffer should be allowed to be nullptr and have the same effect.

There is also an issue with using max() here as pointed out in #39.

GSMloc & GPS parsing

It would be helpful to add FONA lib parsing for the GPS and GSMloc data. Maybe parse them into a common format and store them as floats on the instance of the class?

getGPS buffer copy length

Adafruit_FONA.cpp line 712:

uint8_t len = max(maxbuff-1, strlen(p));

Should call to max be a call to min? Example call to buffer uses a length of 80. Data returned is length 89. This call will copy 89 characters to an 80 character buffer.

GPS Data did not get in the indoor location/environment

GPS Data did not get to the indoor location. I have used SIM808 EVB-v 3.2.2 GSM/GPRS + GPS board.

It has the functionality to receive GPS data and A-GPS data.

I have used the same Adafruit_FONA Library.

How to get GPS response in the indoor location?
How to access A-GPS?

I did not get GPS data in the indoor location. "I got data outside in the open air environment."

Can you please suggest me to get GPS data in the indoor environment.

Thanks!!

Implement a way to get the *sender* of an SMS message.

It's apparently possible according to the command reference, but I'm not sure if it should be built in to Adafruit_FONA::readSMS() or a whole new method (like say boolean Adafruit_FONA::getSMSSender(uint8_t i, char *smssenderaddr).

SMS RI enable hardcoding

Hi there,

Is there a way built in to the library to enable a RI pin pulse when receiving a SMS?
I try to hardcode the at command to enable the RI pin of the fona 808 to pulse when receiving a sms.

I write it like that:
fona.write("AT+CFGRI=1");

but I'm getting this error:
invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]

Here is the rest of my code:
`#include "Adafruit_FONA.h"

#define FONA_RST 4
#define FONA_KEY 8

char replybuffer[255];
char PIN[5]="9648";

HardwareSerial *fonaSerial = new HardwareSerial(2);

Adafruit_FONA fona = Adafruit_FONA(FONA_RST);

uint8_t readline(char *buff, uint8_t maxbuff, uint16_t timeout = 0);
uint8_t type;

void setup() {
// put your setup code here, to run once:
pinMode(FONA_KEY, OUTPUT);
digitalWrite(FONA_KEY, HIGH);

Serial.begin(115200);
delay(100);
fonaSerial->begin(115200);

fona.unlockSIM(PIN);

delay(1000);

fona.write("AT+CFGRI=1");//enable RI on SMS receipt
}
`

Board: ESP32
IDE: Arduino 1.8.5
Library version: 1.3.4

thanks for your help
The Iron Mechanic

getSMSInterrupt is improperly named

AT+CFGRI=1 makes the FONA look to see if an Unsolicited Result Code (URC) should trigger the RI pin low for 120 ms. It doesn't have much to do with SMS's.

Wrong AT+ Syntax

Hi, I have a simple question:
Echo Cancellation Control Test Command is:

AT+ECHO=?
Response
+Echo: (0,1),(0-65535),(0-65535),(0-65535),(0-65535),(0,1)

Write AT Command is:
AT+ECHO=,,,,[,]

if I write
AT+ECHO=1,224,1000,2000,5000,1

I get an error.
What am I doing wrong here?

Thx

APN issue

While trying to set APN information such as:

fona.setGPRSNetworkSettings(F("internet.com"), F("wapuser1"), F("wap"));

the following compile error occurs

Arduino: 1.5.6-r2 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o: In function __vector_default': (.vectors+0xcc): relocation truncated to fit: R_AVR_13_PCREL against symbol__vector_51' defined in .text section in /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o

The code compiles fine when the last part of the call (password field) is changed to at least 4 characters long.. and MUST contain a space. Example:
fona.setGPRSNetworkSettings(F("internet.com"), F("wapuser1"), F("wap 1"));

Unfortunately i need the password to be 3 chars and NO spaces...

I can't seem to understand the problem to fix it...

return value of readSMS(..) is false for empty slots.

it seems that when asking readSMS to read a slot which is empty, it returns false and sets readlen to 0 at the same time.
In the fonatest example, the detection for empty slots is a true response from readSMS and a readlen of 0.
Which one of the two is the correct one?
In the current version, when using 'R' to read all SMS, fonaTest wrongly stops reading all SMS too early if it encounters an empty slot...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.