DIY Cellphone

Compiling the Software

The cellphone’s software is an Arduino program that makes use of various libraries and a third-party hardware definition. You can compile and upload it with the Arduino software but some initial setup is required:

  1. Download and install Arduino 1.0.4 (tested) or 1.0.5 from the Arduino software page.
  2. Install the Git version control software. See, for example, the instructions from GitHub for Windows or Mac.
  3. Checkout the cellphone’s source code from GitHub, e.g. “git clone https://github.com/damellis/cellphone2.git”. Then “cd cellphone2″ to change into the source code’s directory.
  4. Checkout the other repositories used by the cellphone’s software with “git submodule init” and “git submodule update”.
  5. For the LED matrix variant, checkout the LED matrix branch with “git checkout led-matrix”. (The code for the LCD variant is stored in the default master branch.)
  6. Run Arduino and, in the preferences dialog, set your sketchbook folder to the cellphone2 directory (that you checked out from github).
  7. Also in the preferences dialog, enable verbose information on compile and upload. (This will help you debug if anything goes wrong.)
  8. Restart the Arduino software.
  9. Select “DIY Cellphone” from the Tools > Board menu.
  10. Select AVRISP mkII (or whichever programmer you’re using) from the Tools > Programmer menu.
  11. Plug the LiPo battery into the cellphone.
  12. Initiate “Burn Bootloader” from the Tools menu (while holding the pins in the ISP header against the corresponding holes in the PCB). This may take a few minutes.
  13. Connect the 3.3V FTDI cable to the FTDI header (the black wire goes on the side labelled “B”, the green on the side labelled “G”).
  14. Open the Cellphone sketch from the sketchbook.
  15. From the Tools > Serial Port menu, select the item corresponding to the FTDI cable.
  16. Upload the Cellphone sketch.
  17. The screen should turn on and show the word “connecting”.
  18. Insert a SIM card into the socket.
  19. It may take a while for the cellphone to connect to the network. If it doesn’t connect after a few minutes, try resetting the board (by pressing the small reset button). You can see debugging information in the Arduino serial monitor at 9600 baud.
  20. Once the phone connects to the network, you’ll see the words “connected” and “caching” on the screen. After a few seconds, the screen will go blank. That’s a sign that the phone has successfully started up and is now on the lock screen. See “using the phone” below for more information.

22 Responses to “Compiling the Software”

  1. prabhav says:

    Can you tell me how did you uploaded the software to the cell phone. Please I am a school student and don’t know much about software so can you just tell me in a simpler language and please reply shortly to my email address

  2. Quinten Black says:

    Many thanks for any help you can provide. In totally over my head here.

    My 14 and 16 year old and I built two of these phones (1 complete, the second almost finished).
    Now time for the software…

    Git is scrambling my brain (I’m not a programmer and don’t really know how to navigate the command line of git). I have a Windows 8.2 machine. Is there any way to just download a zip file and end up with a folder with everything I need to point Arduino IDE 1.0.4 to?

    When trying with Git (which I seemed to get everything I needed in a local folder), it would never show me the DIY cellphone in the Board menu. I’m guessing I was doing something wrong with the submodules part which I really can’t get my head around what exactly I’m supposed to do with that. It seems this is what will give me the DIY cellphone option in the Boards menu?

    Any plain English explanations would be greatly appreciated!

    Thanks!

  3. admin says:

    Sorry you’re having trouble… but thanks for building the phone and posting here.

    Did you get to the point (using git) where you have the cellphone2/hardware/sanguino/boards.txt file (along with some other files and folders)? If so, you just need to make sure the sketchbook folder in the Arduino preferences dialog points to the cellphone2 folder (and then restart Arduino).

    If you don’t have all the files on your computer, the easiest option might be to use the graphical GitHub client:

    Mac: https://mac.github.com

    Windows: https://windows.github.com

    Then you can click the “Clone in Desktop” button at the lower-right on the repository webpage: https://github.com/damellis/cellphone2

    BTW, if you’re making the LED matrix version of the phone, you’ll need to make sure you’re on the led-matrix branch. In the GitHub software, you can click the download at the top that says “master” and select “led-matrix” from the menu.

    Let me know if you’re still having trouble or have any other questions.

    • Quinten Black says:

      Thanks for the help.

      I was able to find the board definition file(s) and put them into hardware folder and was able to get the DIY cellphone selection to appear in the ‘board’ menu in the Arduino IDE!

      Now of course, a new problem. I selected the proper programmer ‘AVRISPmkll’. Press the 6 pin ISP to the board and got the proper green light on the programmer box.

      I then tried to burn bootloader and got error:
      Using Port : usb
      Using Programmer : stk500v2
      avrdude: usbdev_open(): did not find any USB device “usb”

      I then opened Atmel Studio and went under the ‘Tools:Device Programming’ selection. I was able to select ATmega1284 with the mentioned programmer and ISP connection. The voltage reads “1.1v”. When I try to read the device signature, it returns an error that the chip needs 1.8-5.0v to run, so it is out of range.

      Went to board with a digital meter and I tested the battery cable connector that is soldered to the board. It shows 1.1v on the connector pins that are soldered to the board.

      If I check the voltage directly on the battery it shows 4.1v.

      Perplexing to me. Do I have an incorrect resistor placed, thus drawing down the voltage? I tested the 10k resistor that seems to be in the line of the power for the ISP and it read approximately 10K. Also the connection across this is component fine.

      I’ve checked the connections on the ATmega and they appear fine.

      Any thoughts?

      Again many thanks!

      • admin says:

        Thanks for keeping at it! It sounds like there might be two related problems here: (1) getting the Arduino software (which uses avrdude) to recognize the AVRISP mkII and (2) low voltage on the board.

        For (1), what operating system are you on? If Windows, you’ll need to install the AVRISP mkII drivers for avrdude (which are different than the ones it uses with Atmel Studio). You can try these: https://mightyohm.com/blog/2010/09/avrisp-mkii-libusb-drivers-for-windows-7-vista-x64/. There’s some more information here: http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.aspx

        Problem (2) makes it sound like there’s a short circuit on the board. If you remove the battery and then measure the resistance between power and ground, what do you get? You might need to measure a few times, and leave the probes in place for a while. (The huge, 1000uF, capacitors on the board can confuse the multi-meter at first.) But still, you should get a resistance of at least 30K or so. If it’s less than that, you’ll need to look for a short, e.g. near the microcontroller or the M10 module. I’ll add some diagrams to the troubleshooting page to point out where to look.

        • Quinten Black says:

          Many thanks again! Slowly chipping away toward success.

          1. Driver: I did have the Atmel driver, and changed to the one you suggested. Certainly a pain to get Windows 8.1 to install unsigned drivers. Good video that explains how to do that for anyone else struggling with this:

          https://www.youtube.com/watch?v=UPm_6aejOlo

          Now when I try to burn bootloader, it seems to recognize the chip and voltage I previously saw on Atmel Studio (1.1 volts). As a side note, the AVR programmer shows the green light indicating some sort of good connection. I get the following voluminous message in Arduino IDE with errors at the end.

          C:\Program Files (x86)\arduino-1.0.4\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega1284p -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFF:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

          avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
          Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
          Copyright (c) 2007-2009 Joerg Wunsch

          System wide configuration file is “C:\Program Files (x86)\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf”

          Using Port : usb
          Using Programmer : stk500v2
          avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200178061
          avrdude: usbdev_open(): using read endpoint 0x82
          avrdude: Sent: . [01]
          avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32]
          avrdude: stk500v2_getsync(): found AVRISP mkII programmer
          AVR Part : ATMEGA1284P
          Chip Erase delay : 9000 us
          PAGEL : PD7
          BS2 : PA0
          RESET disposition : dedicated
          RETRY pulse : SCK
          serial program mode : yes
          parallel program mode : yes
          Timeout : 200
          StabDelay : 100
          CmdexeDelay : 25
          SyncLoops : 32
          ByteDelay : 0
          PollIndex : 3
          PollValue : 0x53
          Memory Detail :

          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          eeprom 65 10 128 0 no 4096 8 0 9000 9000 0xff 0xff
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          flash 65 10 256 0 yes 131072 256 512 4500 4500 0xff 0xff
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
          Block Poll Page Polled
          Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
          ———– —- —– —– —- —— —— —- —— —– —– ———
          calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

          Programmer Type : STK500V2
          Description : Atmel STK500 Version 2.x firmware
          Programmer Model: AVRISP mkII
          avrdude: Sent: . [03] . [90]
          avrdude: Recv: . [03] . [00] . [01]
          avrdude: Sent: . [03] . [91]
          avrdude: Recv: . [03] . [00] . [01]
          avrdude: Sent: . [03] . [92]
          avrdude: Recv: . [03] . [00] . [17]
          Hardware Version: 1
          Firmware Version Master : 1.23
          avrdude: Sent: . [03] . [94]
          avrdude: Recv: . [03] . [00] . [0b]
          Vtarget : 1.1 V
          avrdude: Sent: . [03] . [98]
          avrdude: Recv: . [03] . [00] . [03]
          SCK period : 1.00 us

          avrdude: Sent: . [10] . [c8] d [64] . [19] [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00]
          avrdude: Recv: . [10] . [c0]
          avrdude: stk500v2_command(): command failed
          avrdude: Sent: . [03] . [a1]
          avrdude: Recv: . [03] . [00] . [00]
          avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
          avrdude: initialization failed, rc=-1
          Double check connections and try again, or use -F to override
          this check.

          avrdude: Sent: . [11] . [01] . [01]
          avrdude: Recv: . [11] . [00]

          avrdude done. Thank you.

          Again, any help would be greatly appreciated.
          I’ll address your #2 in next message.

        • Quinten Black says:

          Again, sorry to bother with this, but this is an incredibly cool project and I’m determined to finish it. Your help is greatly appreciated.

          2. Short circuits. I removed the battery from the board connector and set my ohm meter at 200K. I connected it to the first connection points at the battery connector and the meter just keeps counting up from 0.1 then up through 30.0 and just keeps going, about 1.0 every 3 seconds. It just keeps going up and up to the limit. Well above 30K, and certainly not lower than 30K. I’m assuming this is caused by the supercaps that you mentioned. So, as they charge up, resistance goes higher and higher? Key point though is that at no time did I get a 0.0 “short” reading.

          I tried all the test points you showed in the diagram and observed the same result.

          My conclusion seems to be that there is no short unless you note something in the error message in my previous post or other issue I’m not noticing.

          Again, any help greatly appreciated!

          • admin says:

            Sounds like the AVRISP mkII is now working fine but it can’t talk to the ATmega1284P on the phone. Generally, there’s only a few things that can cause this: either there’s no power getting to the chip, or there’s a problem with the connections between the chip and the AVRISP mkII.

            Take a look at the second diagram on the trouble-shooting page: http://diy-devices.com/devices/cellphone/troubleshooting/

            It shows the connections between the ISP header and the microcontroller. With the battery unplugged, check for continuity between the holes in the header and the corresponding pins of the microcontroller. (You want to touch the probe to the top of the microcontroller leg, near the plastic body, to check that the connection actually goes to the leg itself, not just the solder / pad underneath it.)

            Another issue can be the way you hold the pins against the ISP header. The long side of the pins goes into the ISP connector and the short sides go into the holes on the board. Then you tilt the connector at an angle and push the pins hard against the sides of the holes. You might try just soldering the pins onto the board.

            You might also test the voltage on the ISP header (with the battery connected of course). Power and ground are the two holes without any traces coming out of them in the diagram on the troubleshooting page. (They are connected, just not in a way that’s shown in the diagram.)

            Another thing to note is that the microcontroller has four power and four ground pins, and all of them probably need to be soldered correctly for the chip to work.

  4. Quinten Black says:

    Many thanks again. I made a huge mistake soldering the ISP onto the board…long pins the wrong way. So in the ensuing removal I ruined (I think pulled the metal off the board at the pin closest to the chip…. ugh). So I’m now await a CircuitWriter conductive pen to fix it…

    I’ll be out of town next week so I’ll come back to it in about 10 days. I’m sure I’ll run into other obstacles and reach out for help. Thanks again for all of your time on this.

  5. William says:

    Is there a way to program a pre-compiled software binary to the chip, without having to install old versions of Arduino?

    • admin says:

      Theoretically, yes, but it’s probably easiest to just install the old version of Arduino. I’ll try to update the code to work with the latest Arduino version soon.

  6. Tuomas Raunio says:

    Hi! I’m doing this awesome project and I have built the electronics. But now I have a problem: where can I find the files inside the hardware folder? Git clone gives me only an empty folder.

    Thanks in advance!

    • admin says:

      After doing a git clone, you have to get the git submodules, as described in step 4 above. Let me know if you have trouble…

      • Tuomas Raunio says:

        Thanks! One problem down, another one ahead.
        I don’t know what causes multiple compilation errors in the arduino ide. First was related to the missing GSM3Serial1.h file, which I replaced with GSM3SoftSerial.h. I had to add the rx/tx parameters and the microcontroller type to the .cpp file to get rid of the first error. But then I have another error that I have not yet solved. I’ll paste the latter one here

        “C:\Users\Tuomas\Desktop\puhelimen-softat\arduino-1.0.4\libraries\Adafruit_PCD8544\Adafruit_PCD8544.cpp: In member function ‘void Adafruit_PCD8544::begin(uint8_t, uint8_t)':
        C:\Users\Tuomas\Desktop\puhelimen-softat\arduino-1.0.4\libraries\Adafruit_PCD8544\Adafruit_PCD8544.cpp:174: error: ‘SPI’ was not declared in this scope
        C:\Users\Tuomas\Desktop\puhelimen-softat\arduino-1.0.4\libraries\Adafruit_PCD8544\Adafruit_PCD8544.cpp:175: error: ‘SPI_CLOCK_DIV4′ was not declared in this scope
        C:\Users\Tuomas\Desktop\puhelimen-softat\arduino-1.0.4\libraries\Adafruit_PCD8544\Adafruit_PCD8544.cpp:176: error: ‘SPI_MODE0′ was not declared in this scope
        C:\Users\Tuomas\Desktop\puhelimen-softat\arduino-1.0.4\libraries\Adafruit_PCD8544\Adafruit_PCD8544.cpp: In member function ‘void Adafruit_PCD8544::spiWrite(uint8_t)':
        C:\Users\Tuomas\Desktop\puhelimen-softat\arduino-1.0.4\libraries\Adafruit_PCD8544\Adafruit_PCD8544.cpp:242: error: ‘SPI’ was not declared in this scope”

        Am I missing some important fixed files that would solve these errors? I am not very experienced arduino user and and have a hard time solving error messages.

        • admin says:

          You shouldn’t have to edit anything in the source code, including the GSM3Serial1.h include. The version of the PCD library you should get using “git submodule init” and “git submodule update” doesn’t use the SPI library directly. Did you download the library separately?

          You should get all the files you need by doing “git clone”, “git submodule init” and “git submodule update” as described above. Did you set the Arduino sketchbook to the cellphone2 directory (in the Arduino preferences dialog)? That’s necessary for the Arduino software to find the hardware folder and libraries in that directory. Again, with this approach, you should end up with everything you need and you shouldn’t need to edit the source code at all. You might try starting over with a fresh git clone and see what happens.

  7. William says:

    I am having trouble compiling the software. I am using Arduino 1.0.4 and downloaded the software repository using github. It looks like I am missing some library files or they are in the wrong directory. Do you know where they should be, or can be downloaded from?

    Thanks for the help.

    C:\arduino-1.0.4\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=104 -IC:\arduino-1.0.4\hardware\arduino\cores\arduino -IC:\arduino-1.0.4\hardware\arduino\variants\standard -IC:\arduino-1.0.4\libraries\GSM C:\Users\User\AppData\Local\Temp\build3779868050484246890.tmp\Cellphone.cpp -o C:\Users\User\AppData\Local\Temp\build3779868050484246890.tmp\Cellphone.cpp.o
    In file included from C:\arduino-1.0.4\libraries\GSM/GSM.h:49,
    from Cellphone.ino:20:
    C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1ModemVerification.h:64:7: warning: extra tokens at end of #endif directive
    In file included from C:\arduino-1.0.4\libraries\GSM/GSM.h:50,
    from Cellphone.ino:20:
    C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1PinManagement.h:103:7: warning: extra tokens at end of #endif directive
    Cellphone.ino:22:25: warning: GSM3Serial1.h: No such file or directory
    Cellphone.ino:24:23: warning: PhoneBook.h: No such file or directory
    Cellphone.ino:25:30: warning: GSM3ClockService.h: No such file or directory
    Cellphone.ino:26:31: warning: GSM3VolumeService.h: No such file or directory
    Cellphone.ino:27:22: warning: GSM3DTMF.h: No such file or directory
    Cellphone.ino:29:26: warning: Adafruit_GFX.h: No such file or directory
    Cellphone.ino:30:30: warning: Adafruit_PCD8544.h: No such file or directory
    Cellphone.ino:32:20: warning: Keypad.h: No such file or directory
    In file included from C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1ModemCore.h:39,
    from C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1AccessProvider.h:38,
    from C:\arduino-1.0.4\libraries\GSM/GSM.h:45,
    from Cellphone.ino:20:
    C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1BaseProvider.h:57: warning: ‘__progmem__’ attribute ignored
    In file included from C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1AccessProvider.h:38,
    from C:\arduino-1.0.4\libraries\GSM/GSM.h:45,
    from Cellphone.ino:20:
    C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1ModemCore.h:170: warning: ‘__progmem__’ attribute ignored
    C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1ModemCore.h:189: warning: ‘__progmem__’ attribute ignored
    In file included from C:\arduino-1.0.4\libraries\GSM/GSM.h:46,
    from Cellphone.ino:20:
    C:\arduino-1.0.4\libraries\GSM/GSM3ShieldV1BandManagement.h:49: warning: ‘typedef’ was ignored in this declaration
    Cellphone:44: error: ‘GSM3ClockService’ does not name a type
    Cellphone:45: error: ‘GSM3VolumeService’ does not name a type
    Cellphone:46: error: ‘GSM3DTMF’ does not name a type
    Cellphone:47: error: ‘PhoneBook’ does not name a type
    Cellphone:57: error: ‘Adafruit_PCD8544′ does not name a type
    Cellphone:72: error: ‘Keypad’ does not name a type
    Cellphone:84: error: ‘DateTime’ does not name a type
    Cellphone.ino:104: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:104: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:104: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:104: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:104: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:112: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:112: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:112: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:112: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:112: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:118: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:118: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:118: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:130: error: ‘DateTime’ does not name a type
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:185: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:188: error: ‘DateTime’ does not name a type
    Cellphone.ino: In function ‘void setup()':
    Cellphone:199: error: ‘screen’ was not declared in this scope
    Cellphone.ino: In function ‘void loop()':
    Cellphone:245: error: ‘keypad’ was not declared in this scope
    Cellphone:246: error: ‘screen’ was not declared in this scope
    Cellphone:250: error: ‘DateTime’ was not declared in this scope
    Cellphone:250: error: expected `;’ before ‘datetime’
    Cellphone:252: error: ‘datetime’ was not declared in this scope
    Cellphone:252: error: ‘clock’ was not declared in this scope
    Cellphone:255: error: ‘datetime’ was not declared in this scope
    Cellphone:255: error: ‘clock’ was not declared in this scope
    Cellphone:259: error: ‘BLACK’ was not declared in this scope
    Cellphone:279: error: ‘clock’ was not declared in this scope
    Cellphone:279: error: ‘alarmTime’ was not declared in this scope
    Cellphone:294: error: ‘WHITE’ was not declared in this scope
    Cellphone:307: error: ‘clock’ was not declared in this scope
    Cellphone:308: error: ‘clock’ was not declared in this scope
    Cellphone:337: error: ‘missedDateTime’ was not declared in this scope
    Cellphone.ino:338: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:338: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:355: warning: comparison between signed and unsigned integer expressions
    Cellphone.ino:375: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:375: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:387: warning: comparison between signed and unsigned integer expressions
    Cellphone.ino:397: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:398: warning: comparison between signed and unsigned integer expressions
    Cellphone.ino:417: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:436: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:436: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:454: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:454: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:468: error: ‘pb’ was not declared in this scope
    Cellphone:468: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone:469: error: ‘pb’ was not declared in this scope
    Cellphone:469: error: ‘PHONEBOOK_MISSEDCALLS’ was not declared in this scope
    Cellphone:470: error: ‘pb’ was not declared in this scope
    Cellphone:470: error: ‘PHONEBOOK_RECEIVEDCALLS’ was not declared in this scope
    Cellphone:471: error: ‘pb’ was not declared in this scope
    Cellphone:471: error: ‘PHONEBOOK_DIALEDCALLS’ was not declared in this scope
    Cellphone:472: error: ‘pb’ was not declared in this scope
    Cellphone:474: error: ‘pb’ was not declared in this scope
    Cellphone:485: error: ‘WHITE’ was not declared in this scope
    Cellphone:489: error: ‘phoneBookDateTimes’ was not declared in this scope
    Cellphone.ino:501: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:501: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:516: error: ‘pb’ was not declared in this scope
    Cellphone.ino:549: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:549: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:569: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:569: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:584: error: ‘WHITE’ was not declared in this scope
    Cellphone.ino:590: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:590: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:604: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:609: error: ‘clock’ was not declared in this scope
    Cellphone:622: error: ‘WHITE’ was not declared in this scope
    Cellphone.ino:628: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:628: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:629: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:629: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:646: error: ‘clock’ was not declared in this scope
    Cellphone:658: error: ‘alarmTime’ was not declared in this scope
    Cellphone:667: error: ‘WHITE’ was not declared in this scope
    Cellphone:675: error: ‘WHITE’ was not declared in this scope
    Cellphone.ino:682: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:682: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:683: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:683: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:716: error: ‘alarmTime’ was not declared in this scope
    Cellphone.ino:730: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:733: error: ‘volume’ was not declared in this scope
    Cellphone:755: error: ‘missedDateTime’ was not declared in this scope
    Cellphone:755: error: ‘clock’ was not declared in this scope
    Cellphone.ino:763: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:763: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino:764: warning: comparison between signed and unsigned integer expressions
    Cellphone.ino:785: warning: deprecated conversion from string constant to ‘char*’
    Cellphone:788: error: ‘dtmf’ was not declared in this scope
    Cellphone:793: error: ‘volume’ was not declared in this scope
    Cellphone.ino: In function ‘boolean checkForCommandReady(GSM3ShieldV1BaseProvider&, int)':
    Cellphone.ino:813: warning: comparison between signed and unsigned integer expressions
    Cellphone.ino: In function ‘void deletePhoneBookEntry()':
    Cellphone:864: error: ‘pb’ was not declared in this scope
    Cellphone.ino: In function ‘void deleteCallLogEntry()':
    Cellphone:869: error: ‘pb’ was not declared in this scope
    Cellphone.ino: In function ‘boolean savePhoneBookEntry(int, char*, char*)':
    Cellphone:873: error: ‘pb’ was not declared in this scope
    Cellphone:873: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone.ino: In function ‘void cachePhoneBook()':
    Cellphone:905: error: ‘pb’ was not declared in this scope
    Cellphone:909: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone:927: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone.ino: In function ‘boolean phoneNumberToName(char*, char*, int)':
    Cellphone:961: error: ‘pb’ was not declared in this scope
    Cellphone:965: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone:978: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone.ino: In function ‘int loadphoneBookNamesForwards(int, int)':
    Cellphone:995: error: ‘pb’ was not declared in this scope
    Cellphone:1006: error: ‘phoneBookDateTimes’ was not declared in this scope
    Cellphone:1006: error: ‘DateTime’ was not declared in this scope
    Cellphone:1007: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone.ino: In function ‘int loadphoneBookNamesBackwards(int, int)':
    Cellphone:1031: error: ‘pb’ was not declared in this scope
    Cellphone:1040: error: ‘phoneBookDateTimes’ was not declared in this scope
    Cellphone:1040: error: ‘DateTime’ was not declared in this scope
    Cellphone:1041: error: ‘PHONEBOOK_SIM’ was not declared in this scope
    Cellphone.ino: In function ‘void numberInput(char, char*, int)':
    Cellphone.ino:1062: warning: comparison between signed and unsigned integer expressions
    Cellphone:1062: error: ‘screen’ was not declared in this scope
    Cellphone:1063: error: ‘screen’ was not declared in this scope
    Cellphone:1063: error: ‘WHITE’ was not declared in this scope
    Cellphone:1063: error: ‘BLACK’ was not declared in this scope
    Cellphone:1067: error: ‘screen’ was not declared in this scope
    Cellphone:1068: error: ‘WHITE’ was not declared in this scope
    Cellphone:1068: error: ‘BLACK’ was not declared in this scope
    Cellphone.ino: In function ‘void textInput(char, char*, int)':
    Cellphone:1094: error: ‘screen’ was not declared in this scope
    Cellphone:1095: error: ‘WHITE’ was not declared in this scope
    Cellphone:1095: error: ‘BLACK’ was not declared in this scope
    Cellphone.ino:1099: warning: comparison between signed and unsigned integer expressions
    Cellphone:1099: error: ‘screen’ was not declared in this scope
    Cellphone:1100: error: ‘screen’ was not declared in this scope
    Cellphone:1100: error: ‘WHITE’ was not declared in this scope
    Cellphone:1100: error: ‘BLACK’ was not declared in this scope
    Cellphone:1104: error: ‘screen’ was not declared in this scope
    Cellphone.ino:1131: warning: array subscript has type ‘char’
    Cellphone.ino:1135: warning: array subscript has type ‘char’
    Cellphone.ino:1137: warning: array subscript has type ‘char’
    Cellphone.ino: In function ‘void softKeys(char*)':
    Cellphone.ino:1152: warning: deprecated conversion from string constant to ‘char*’
    Cellphone.ino: In function ‘void softKeys(char*, char*)':
    Cellphone:1157: error: ‘screen’ was not declared in this scope
    Cellphone:1158: error: ‘WHITE’ was not declared in this scope
    Cellphone:1158: error: ‘BLACK’ was not declared in this scope
    Cellphone.ino:1161: warning: comparison between signed and unsigned integer expressions

  8. haehndi says:

    I hope anybody can help us. I have build this DIY cellphone as prototype for any workshops in Leipzig Germany. I was able to burn the bootloader by USBASP as an ISP with Arduino 1.0.4, only this was not expected:

    “avrdude: auto set sck period (because given equals null)
    !!(avrdude: warning: cannot set sck period. please check for usbasp firmware update.)!!
    avrdude: AVR device initialized and ready to accept instructions
    …………………>
    avrdude: verifying …
    avrdude: 1 bytes of lock verified
    avrdude done. Thank you.”

    I could compile the LED sketch with a FTDI 5V and upload it to the phone, but it is stuck trying to connect:

    “# | 100% 24.39s
    avrdude: verifying …
    avrdude: 38992 bytes of flash verified
    avrdude: Send: Q [51] [20]
    avrdude: Recv: . [14]
    avrdude: Recv: . [10]
    avrdude done. Thank you.”

    When I power up, the LED displays “connect” and just hangs there. During compiling I see several warning messages like: “GSMExtras\GSM3VolumeService.cpp:76: warning: enumeration value ‘BEGINSMS’ not handled in switch”
    The serial monitor output is:

    “AT%13%
    0 9>AT%13%%13%%10%OK%13%%10%
    AT+CGREG?%13%
    9 40>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
    AT+CGREG?%13%
    40 71>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%”

    , and so on.

    I tried the serialproxy debug program, the output for each query is:

    “READY
    AT
    OK
    ……………………..>
    NORMAL POWER DOWN (after I pushed the reset button)
    AT
    OK”

    The button test works fine. All three jumper are set to uC. 0 Ohm resistor is soldered in trace from M10 GSM module to the antenna. Board power is stable upon 4,13V. My SIM card is a Vodafon card.
    I used a Quectel M10E-04-NCH-STD/M10ER01A20WW32 from Germany: http://www.soselectronic.de/ . Hope it is right.
    LED2 from M10 module is emitting a yellow light. All legs of the components are soldered correctly so far. Also pads and the legs are free of shorts or solder bridges. I have checked it. Sure I used a goldcap Panasonic 5,5V 220mF instead a supercap DIGI-Key 414-VA5R 3,3V 70mF. I can measure there continuously 2,87V. Could that be causing problems with the goldcap/supercap?
    Any help would be great.

    • admin says:

      Thanks for trying this and for the deleted error report! There could potentially be two things going on: either a problem reading from the SIM card or a problem connecting to the network.

      Can you try the AT+CPBS?, AT+CPBS=”SM”, and AT+CPBR=1 commands from the serial debugging page? That should check if you can read from the SIM card or not. If not, it’s possible there’s a soldering issue or that you need a PIN for the SIM card (which you can pass to the GSM begin() call).

      If you can read from the SIM card okay, it’s probably the connection to the network. If your antenna and related connections seem to be soldered okay, you might try simply taking the phone outside or to a different location. I’ve sometimes had trouble connecting for the first time, even in places that should have good reception.

      I doubt the supercap is causing problems. It’s just there to allow the GSM module to continue to keep time when the main battery dies.

  9. haehndi says:

    Hi, Thanks a lot. It was a problem with connecting to the network. Exactly a PIN issue for the SIM. But on the LED display I could see three time following without touch some switchs “#0#0#00+0#0 and so on”. Maybe, switch bounce or software issue.

    • admin says:

      Hmm… if you’re seeing random button presses, I would check the soldering on the buttons (and the microcontroller). It sounds like there’s an issue on the bottom row somewhere (where 0 and # are).

Leave a Reply