Hi.
So i have an arduino nano and a LoNet 800l but they dont seem to want to talk to each other.
I use this code (FONAtest from adafruit fona library)
/***************************************************
This is an example for our Adafruit FONA Cellular Module
Designed specifically to work with the Adafruit FONA
----> http://www.adafruit.com/products/1946
----> http://www.adafruit.com/products/1963
----> http://www.adafruit.com/products/2468
----> http://www.adafruit.com/products/2542
These cellular 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!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
/*
THIS CODE IS STILL IN PROGRESS!
Open up the serial console on the Arduino at 115200 baud to interact with FONA
Note that if you need to set a GPRS APN, username, and password scroll down to
the commented section below at the end of the setup() function.
*/
#include "Adafruit_FONA.h"
#define FONA_RX 2
#define FONA_TX 3
#define FONA_RST 4
// this is a large buffer for replies
char replybuffer[255];
// 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;
// Use this for FONA 800 and 808s
Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
// Use this one for FONA 3G
//Adafruit_FONA_3G fona = Adafruit_FONA_3G(FONA_RST);
uint8_t readline(char *buff, uint8_t maxbuff, uint16_t timeout = 0);
uint8_t type;
void setup() {
while (!Serial);
Serial.begin(115200);
Serial.println(F("FONA basic test"));
Serial.println(F("Initializing....(May take 3 seconds)"));
fonaSerial->begin(4800);
if (! fona.begin(*fonaSerial)) {
Serial.println(F("Couldn't find FONA"));
while (1);
}
.
.
.
And i cannot for the life of me get this to work with my nano and LoNet 800l. Everything is hooked up correctly, ive tried to swap the tx and rx cabels over like 10 times but no difference, ive tried different digtal pins for the softwareserial but no luck there either.
if i have the code uploaded and open up the serial monitor i get this:
FONA basic test
Initializing....(May take 3 seconds)
Attempting to open comm with ATs
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
---> AT
<---
Timeout: No response to AT... last ditch attempt.
---> AT
<---
---> AT
<---
---> AT
<---
---> ATE0
<---
---> ATE0
<---
Couldn't find FONA
I have also tried a much more simple code that i found here: http://www.seeedstudio.com/wiki/LoNet_-_GSM/GPRS_Breakout
// this sketch is used for testing LoNet with Arduino
// Connect VIO to +5V
// Connect GND to Ground
// Connect RX (data into SIM800L) to Digital 11
// Connect TX (data out from SIM800L) to Digital 10
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
{
while(Serial.available())
{
mySerial.write(Serial.read());
}
mySerial.println();
}
}
but i get nothing sent or received when trying to sen AT commands in the serial monitor.
Any help is appreciated