did you manage to update the library and if so do you have the link to download it?
Hello @StevieG This is the link of branch that i uploaded, please change pin connection and try this new version:
Vio –> 5V (or 3V, if your Arduino has 3V logic)
GND –> GND
FONA_RX –> Pin 2
FONA_TX –> Pin 3
FONA_RST –> Pin 4
FONA_KEY –> GND
https://github.com/ubidots/Ubidots-FONA/tree/metavix/fixing_problems
The new example to send variables is this:
#include <UbidotsFONA.h>
#include <SoftwareSerial.h>
#define APN "" // The APN of your operator
#define USER "" // if your apn doesnt have username just leave it ""
#define PASS "" // if your apn doesnt have password just leave it ""
#define TOKEN "Your_token_here" // Replace it with your Ubidots token
Ubidots client(TOKEN);
void setup() {
Serial.begin(115200);
delay(2000);
while(!client.setApn(APN, USER, PASS));
}
void loop() {
float value = analogRead(A0);
client.add("Variable_Label", value);
client.sendAll();
}
Hi Metavix. I’m having the same trouble using Ubidots with the FONA 808. I’m using an arduino mega. I wanted to alert you that with the new library modifications the example code is no longer compiling. Please look into it.
I haven’t got round to testing the new library on the arduino uno and the Fona 800. I will try and get back to you when im at work tomorrow and have tried it out.
Hi Metavix, I have tried the new library and it wont compile. It is coming up with this error.
Compiling debug version of ‘Ubidots’ for ‘Arduino/Genuino Uno’
UbidotsFONA.cpp:389:26: error: no ‘void Ubidots::flushInput()’ member function declared in class 'Ubidots
void Ubidots*:flushInput() {
Error compiling libraries`
@StevieG i fixed it, try again please
@sarosdst old examples or new examples?
Remember to delete the old version of library and after that add the new version, or it won’t compile
Hey, thanks for the update. Now when I compile and upload the code I get this error.
Error with AT+CIPMUX
FONA/2.0|POST|09RSjgqLlcawZ67BO4L0rkRjijHUnP|FONA=>Variable_Label:148.00|end
This is the full serial output I get with the errors.
Attempting to open comm with ATs
Response of FONA:
CJCJCBg”þ
Error
Response of FONA:
AT
OK
Call Ready
SMS Ready
Response of FONA:
ATE0
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
+CREG: 0,1
OK
Response of FONA:
+CSQ: 8,0
OK
Response of FONA:
+CGATT: 1
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
+SAPBR: 1,1,"10.22.159.21
FONA/2.0|POST|5790bd4f7625427703cf8edf|FONA=>Variable_Label:149.00|end
Response of FONA:
OK
Response of FONA:
STATE: PDP DEACT
CONþ
Error with AT+CIPSTART
FONA/2.0|POST|5790bd4f7625427703cf8edf|FONA=>Variable_Label:149.00|end
Response of FONA:
ERROR
Error with AT+CIPMUX
FONA/2.0|POST|5790bd4f7625427703cf8edf|FONA=>Variable_Label:148.00|end
Response of FONA:
ERROR"
@Metavix I have tried swapping out my sim card for a different network. Originally I was using an Asda Mobile sim which runs on the EE network here in the UK. I have switched to a Giff Gaff sim which uses the O2 network and this has worked with limited success! I am able to send 1 reading of the temperature sensor and then no more as a load of errors come up. What I would like to be able to do is send a temperature reading once a minute.
Here is the serial output from the almost working code.
Attempting to open comm with ATs
Response of FONA:
CJCJCBg”þ
Error
Response of FONA:
AT
Oû
Call Ready
Error
Response of FONA:
AT
OK
Response of FONA:
Error
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
+CREG: 0,1
OK
Response of FONA:
+CSQ: 5,0
OK
Response of FONA:
+CGATT: 1
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
OK
Response of FONA:
+SAPBR: 1,1,“10.146.32.210”
OK
FONA/2.0|POST|s434XNIutmFxxrTtlN7Wmu5EJdo1xl|FONA=>Variable_Label:150.00|end
Response of FONA:
OK
Response of FONA:
OK
CONNECT OK
Response of FONA:
Response of FONA:
SEND OK
OK
Response of FONA:
CLOSE OK
Response of FONA:
SHUT OK
FONA/2.0|POST|s434XNIutmFxxrTtlN7Wmu5EJdo1xl|FONA=>Variable_Label:151.00|end
Response of FONA:
OK
Response of FONA:
OK
Error with AT+CIPSTART
FONA/2.0|POST|s434XNIutmFxxrTtlN7Wmu5EJdo1xl|FONA=>Variable_Label:151.00|end
Response of FONA:
ERROR
Error with AT+CIPMUX
FONA/2.0|POST|s434XNIutmFxxrTtlN7Wmu5EJdo1xl|FONA=>Variable_Label:151.00|end
Response of FONA:
ERROR
Error with AT+CIPMUX
FONA/2.0|POST|s434XNIutmFxxrTtlN7Wmu5EJdo1xl|FONA=>Variable_Label:150.00|end
Response of FONA:
ERROR
Error with AT+CIPMUX
FONA/2.0|POST|s434XNIutmFxxrTtlN7Wmu5EJdo1xl|FONA=>Variable_Label:150.00|end
@StevieG Great We have a breakthrough
This is an error of the GPRS red, i will fix it but now you have a connection! i work on that now
thank you very much! Any idea about the errors when using the Asda Mobile (EE) sim?
well you get STATE: PDP DEACT it is an error when you have a context deactivated. It is likely that this mobile operator does not support TCP connections
Oh okay, thank you and thanks again for helping me so much! Look forward to hearing back from you with the new library iteration!
Yeah, i found 2 problems from fona, when it is low of battery and when it get a call o sms, it sends a message that break normal function of the library, i’m adding code to parse that message to solve that problem.
Ok, thank you very much.
Ok, thank you. Any ETA when it will be finished?
Have you had any luck with the library?