๐Ÿ“ฃ๐Ÿ“ช ๐Ÿšš Adafruit will not be shipping USPS orders Monday October 14, 2019 ๐Ÿ—“. Expedited USPS orders placed after 11am ET ๐Ÿ•š Friday October 11 will go out Tuesday October 15 ๐Ÿ“ฃ๐Ÿ“ช๐Ÿšš
0

Using FONA 808 with Pi3
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Using FONA 808 with Pi3

by sidwales on Sun Apr 03, 2016 12:39 pm

If it is possible to use FONA 808 with Pi 3 what are the connections and where would we find the operating script ?

sidwales
 
Posts: 6
Joined: Tue Mar 29, 2016 4:36 pm

Re: Using FONA 808 with Pi3

by shivkmr003 on Wed Apr 06, 2016 6:40 am

The FONA basically works with AT commands. You'll see some initial AT commands in the tutorial (in the Wiring USB section) https://learn.adafruit.com/adafruit-fona-808-cellular-plus-gps-breakout/wiring-to-usb for the FONA, such as Making sure it's ok, sending an SMS text message etc. Besides power and battery the FONA requires a USB B cable that connected to the FONA to charge the battery.

I don't know what the Pi-3 can or can't do, but if it can talk serial (RX/TX) then it's really up to your serial programming skills (from the Pi-3). The same tutorial you'll see that you need 4 connections between your Pi-3 and the FONA (of course the tutorial shows you how to hook up the FONA directly to your PC/MAC and using a terminal application such as PuTTy, Real term etc., but the same applies to connecting it to a Pi or Arduino.

If you already have a FONA, I'd suggest looking at the tutorial and experimenting with the AT command set. Once you're comfortable, you can program the Pi to do that same.

Hope this helps.

shivkmr003
 
Posts: 124
Joined: Sun Feb 07, 2016 2:25 am

Re: Using FONA 808 with Pi3

by sidwales on Wed Apr 06, 2016 2:32 pm

Thanks for the prompt reply. We will work on it and if we find anything useful we will let you know

Regards

Sid

sidwales
 
Posts: 6
Joined: Tue Mar 29, 2016 4:36 pm

Re: Using FONA 808 with Pi3

by shivkmr003 on Thu Apr 07, 2016 1:22 am

I have a Console (command line/Terminal) application I built using C#.
My FONA SIM808 is connected to my PC via USB Serial Cable as described in the links I posted in the previous post
I see it on COM port 5 (COM5).
Made sure the FONA module's power (blue) LED is on and the Net LED (red) blinks once every 3 seconds or so.
Run the Application and....Ting! Text message arrived

Code: Select all | TOGGLE FULL SIZE
        private static string CTRL_Z = "\u001A"; // Unicode for ^Z or CTRL+Z
       
        static void Main(string[] args)
        {
            var serialPort = new SerialPort("COM5", 9600);
            serialPort.Open();
            try
            {
                serialPort.WriteLine("AT+CMGF=1"); // Set to TEXT mode not PDU (data) mode
                var response = serialPort.ReadLine();
                Console.WriteLine(response);
                serialPort.WriteLine("AT+CMGS=\"15551112222\""); // Send a SMS message
                response = serialPort.ReadLine();
                Console.WriteLine(response);
                serialPort.WriteLine("This message, sent to you via a C# Console application."); // SMS Message
                serialPort.Write(CTRL_Z); // Mark the end of the message
                response = serialPort.ReadLine();
                Console.WriteLine(response);
                response = serialPort.ReadLine();
                Console.WriteLine(response);
                response = serialPort.ReadLine();
                Console.WriteLine(response);
                response = serialPort.ReadLine();
                Console.WriteLine(response);
                Console.WriteLine("Press Enter to Exit");
                Console.ReadLine();
            }
            finally
            {
                serialPort.Close();
                serialPort.Dispose();
            }
        }

shivkmr003
 
Posts: 124
Joined: Sun Feb 07, 2016 2:25 am

Re: Using FONA 808 with Pi3

by sidwales on Thu Apr 07, 2016 6:20 am

Appreciate that. Thanks

Regards

Sid

sidwales
 
Posts: 6
Joined: Tue Mar 29, 2016 4:36 pm

Re: Using FONA 808 with Pi3

by mattdaniel on Thu Apr 21, 2016 6:41 pm

Hope you can let us know how it goes. I could not get Fona to work with Rasp Pi 3. The tutorial appears to be based on an older version of Raspian which won't run on Pi 3. The handy script mentioned tries to alter a file which no longer present in Raspian /etc/inittab.
I'm sure there are some good Linux folks among us that can point us in the right direction and make Fona on Pi 3 possible. My Fona worked great when connected via USB to a normal laptop with Putty.

mattdaniel
 
Posts: 2
Joined: Thu Apr 21, 2016 6:34 pm

Re: Using FONA 808 with Pi3

by sidwales on Fri Apr 22, 2016 5:37 am

Hi Matt

Will let you know if we get anywhere

sidwales
 
Posts: 6
Joined: Tue Mar 29, 2016 4:36 pm

Re: Using FONA 808 with Pi3

by mattdaniel on Mon Apr 25, 2016 5:08 pm

I was able to resolve my issue by running raspi-config, advanced options, Serial, disable shell and kernel messages.
I'll be continuing my project now that I can send commands to the Fona.

mattdaniel
 
Posts: 2
Joined: Thu Apr 21, 2016 6:34 pm

Please be positive and constructive with your questions and comments.