fona | Java library for Adafruit FONA / Sim800 cellular module
kandi X-RAY | fona Summary
kandi X-RAY | fona Summary
fona / sim800 java library === a java library for controlling an [adafruit fona] or other sim800-based cellular module using a serial connection. this library gives java-enabled devices (including beaglebone and raspberry pi) and applications light-weight access to the internet and cellular networks. while most devices capable of running java are also capable of establishing a ppp link, this can quickly burn through the small monthly data allotment typical of low-cost gprs/m2m data plans, and doesn’t provide access to sms. by using the fona/sim800 library instead of a full-fledged network via ppp, http requests and sms messages can be exchanged with a minimal amount of overhead while providing additional control of the modem hardware (power saving, temperature and battery monitoring, etc.) which can be desirable in remote, battery-operated, and/or embedded applications. features --- currently supported: * send and receive sms messages (synchronous
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Download email messages from POP3 server
- Parses the response from a POP3 message
- Read an email message
- Gets number of new message count
- This method blocks until the response is received
- Dispatch a response message
- Dispatches an SMS response
- Get time from GSM connection
- Read a serial port from the serial port queue
- Write to serial port
- Performs a GET request
- Checks if GPRS is enabled
- This method reads data from the serial port
- Waits for the program to become ready
- Builds a regular expression pattern for all unsolicited responses
- Read the GPIO input pin state
- Read the ADC
- Returns the battery charging state
- Returns the battery battery battery value
- Returns the battery charge level
- Set GPIO output state
- Reset the simulation
- Get the temperature of the simulation
- Read the RSSI indicator
- Send email
fona Key Features
fona Examples and Code Snippets
Community Discussions
Trending Discussions on fona
QUESTION
I'm trying to get data from two sensors, one every 1 second and one every 10 seconds.
I have two functions which update a small OLED display with the values from the sensors. I want to have both functions run in perpetuity to always display the latest values. After doing my research, I thought I had found what I needed with Ray but it doesn't seem to work on the Pi 3. I then looked into Threads which I implemented like such:
...ANSWER
Answered 2020-Oct-05 at 14:41There is a lot of stuff to improve here. There is no way I can address them all, just few suggestions:
Firstly, device.display()
is blocking. Instead of redrawing on every change, make batch updates when necessary:
QUESTION
My issue is fairly simple to describe but I have no idea what the problem could be. So I got my FONA 3G and immediately after taking it out of the box, I connected the battery and I wired up my FTDI board (aka USB to serial converter), and then I plugged it into my USB port to try and establish communication. I just tried the most basic at command AT(using PuTTy). You're supposed to get an OK in response but the FONA doesn't appear to even notice that I'm trying to talk to it. I type AT and press enter and nothing happens at all.
The issue is most certainly not my FTDI board, I'm very experienced communicating with wifi modules and other GSM modules using PuTTy. So please don't be concerned with the setup. That's 100 percent definitely not the problem.
I was able to send AT commands after plugging the module into my laptop directly using the module's USB input, but there is still some issue with its UART. I haven't been able to send or receive any communications directly from RX and TX. It wont respond to any programs I load up onto my arduino. Its like the UART is asleep.
If you have experience with FONA 3G, please speak up and tell me what steps you took to get the UART to respond. What should the status indicator look like before its ready to receive commands? Any knowledge you have about the FONA3G module would be helpful.
As a side note, the FONA3G has a chip number. It is SIM5320a. I don't know if that helps. Most people know it as FONA 3G.
...ANSWER
Answered 2020-May-01 at 05:08All right. Thanks to those of you who posted comments. It turned out to be an issue with the baud rate! Its always the simple stuff. Adafruit said this thing has auto baud meaning you can use any baud rate but they are wrong. It requires 115200 to work properly. Also I'd like to point out that there was nothing wrong with my setup. Sometimes you should trust the person when they say their setup is 100 percent fine.
QUESTION
I was stuck while trying to extract some text in a sentence via this website.
...ANSWER
Answered 2020-Jan-06 at 17:55One solution is to add text to Dataframe and then use .str.extract()
to clear your data:
QUESTION
I am trying to send a packet to a server over 3g and TCP connection. Below is a link to the .cpp and .h file I have found:
https://os.mbed.com/users/Nels885/code/Adafruit_FONA_3G/
More specifically, I am really confused on how TCPSend
works under the Adafruit_FONA_3G
class. I am trying to implement it but my code seems to get stuck at packet[0] = 0;
under function bool Adafruit_FONA_3G::TCPsend(char *packet)
.
I have tried commenting out packet[0] = 0
; and the code runs all the way through. I have also tried initializing char* packet[32];
before packet[0] = 0;
and the code runs all the way through. I am assuming the function is not detecting the packet input.
Here is the specific function from the .cpp file:
...ANSWER
Answered 2019-Feb-07 at 02:07Adafruit_FONA_3G::TCPsend()
assumes that you pass it a writable buffer. You're passing a read-only buffer. So, replace
QUESTION
Using mbed OS and stm32 nucleo board with Adafruit Fona 3g, I am trying to send data to a server via 3g connection. I am using the .cpp file and .h file posted here: https://os.mbed.com/users/Nels885/code/Adafruit_FONA_3G/file/b18cfba4283a/
The code seems to get stuck on getTCPtimeout. I am having trouble figuring out why this is the case.
I have tried commenting out the getTCPtimeout function to see the results and the code runs through completely, but never establishes a connection with the server.
...ANSWER
Answered 2019-Jan-29 at 03:47Adafruit_FONA_3G::getTCPtimeout()
assumes that you pass it a writable buffer of size > 20. You're passing a read-only buffer of smaller size. So, replace
QUESTION
I have a Raspberry Pi 3 running Raspian Lite
...ANSWER
Answered 2019-Feb-04 at 00:22Running the following:
pi@raspberrypi:~ $ sudo ls -l /dev/
I noticed that serial0
is pointed at ttyS0
lrwxrwxrwx 1 root root 5 Feb 3 23:49 serial0 -> ttyS0
So, running the following worked:
QUESTION
I have recently purchased the Adafruit Fona 32u4. The instant I received the item, I soldered pins on it. In hindsight, I believe it was a mistake.
The link to the Arduino code FONAtest_KEY_mod is this. https://github.com/adafruit/Adafruit_FONA
The purpose of the code is to test the functionality of the chip. You type in commands in the serial monitor and receive an output. But before that I keep on getting the response, "Fona not found". What should I do.
...ANSWER
Answered 2017-Oct-26 at 07:12Actually you might as well have killed it when taking it out of the ESD protective bag. So don't feel bad about soldering some pins. And I don't believe that you get the response "Fona not found". The source code only contains "Couldn't find FONA". For the future please copy & paste error messages.
To answer your question "What should I do?":
If you face an error message and you don't know why you have to find out what makes your device print that error. As you have access to the source code this becomes easy.
https://github.com/adafruit/Adafruit_FONA/blob/master/examples/FONAtest_KEY_mod/FONAtest_KEY_mod.ino
Here we find that error the first time in the setup function:
QUESTION
I'm attempting to use a watchdog interrupt as a timer to sleep for a certain period of time with my Arduino. My problem lies in the fact that, on wake-up, I need to conduct operations that will take longer than 8 seconds.
Currently, my Arduino will sleep for 1 minute, using successive interrupts by the watchdog to wake it up and place it back into sleep. After 1 minute, however, I begin to conduct operations that take longer than 8 seconds and the watchdog interrupt times out.
I want to shut off the watchdog timer, conduct operations, then re-enable it and return to sleeping.
Here is my code:
...ANSWER
Answered 2017-Apr-20 at 09:05Rather than directly accessing the controller's registers from your code, use wdt_enable()
and wdt_disable()
from the avr/wdt.h
library to start and stop the watchdog timer.
Also, for the sake of system reliability, it might be better to actually keep the watchdog timer running (not disabling it), and add periodic calls to wdt_reset()
inside long loops and functions to prevent inappropriate system resets.
For instance, you can replace the delay(20000);
line in your code with a loop that repeats 20 times the statements: delay(1000); wdt_reset();
QUESTION
I've been reading and learning a ton about python, but all the import variations having different results is a tad confusing.
I was having an issue where a global variable I had imported was always the default value, even though I called a method in that module that manipulates it. I had imported it like so:
...ANSWER
Answered 2017-Apr-03 at 10:15from fona import CON
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fona
You can use fona like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the fona component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page