Difference between revisions of "PinePhone"
(→First time installation: added explanation)
|Line 20:||Line 20:|
See [[PinePhone#Battery|Battery]] for more information.
See [[PinePhone#Battery|Battery]] for more information.
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot, as pictured here:
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot, as pictured here:
Revision as of 23:08, 28 February 2021
The PinePhone is a smartphone created by Pine64. The PinePhone is capable of running mainline Linux and is supported by many partner projects. The Braveheart Edition of the PinePhone was the first publicly available version of the phone; it shipped without a fully functional OS and was geared specifically toward early adopters. The Braveheart Edition's successor is the Community Edition. The Community Edition became available in June 2020. The Community Edition will be available for at least five years after its initial release.
- 1 First time installation
- 2 Specifications
- 3 Components
- 4 Hardware revisions
- 5 Swapping in a new mainboard revision
- 6 Hardware accessory
- 7 Killswitch configuration
- 8 Camera
- 9 Battery
- 10 Modem
- 11 Operating Systems
- 12 Frequently asked questions
- 13 Replacing the screen
- 14 Spare parts not available in the Pine64 store
- 15 Press
- 16 PinePhone board information, schematics and certifications
- 17 Datasheets for components and peripherals
- 18 Developer works
- 19 External links
First time installation
|The default PIN for the KDE Community Edition is 123456.|
From the factory the battery has a sticker on it that isolates the battery from the phone. The battery will not charge until this is removed.
To remove the sticker after unboxing the phone:
- Remove the back panel using the notch in the corner of the back cover
- Remove the battery
- Peel off the clear plastic sticker below it, which isolates the charging contacts
- Reinsert the battery
See Battery for more information.
The PinePhone's SIM slot requires a micro SIM, please do not insert a nano SIM without an adapter. An adapter from a nano to a micro SIM might be included under orange tape in the camera notch of the phone's packaging. The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot, as pictured here:
Dimensions: 160.5 x 76.6 x 9.2mm
Weight: Between 180-200 grams
SIM Card: Micro-SIM
- Size: 5.95 inches (151mm) diagonal
- Type: HD IPS capacitive touchscreen, 16M colors
- Resolution: 1440x720, 18:9 ratio
System on Chip: Allwinner A64
RAM: 2GB or 3GB LPDDR3 SDRAM
Internal Storage: 16GB or 32GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC
Back Camera: Single 5MP, 1/4", LED Flash
Selfie Camera: Single 2MP, f/2.8, 1/5"
Sound: Loudspeaker, 3.5mm jack & mic (jack doubles as hardware UART if killswitch 6 is deactivated)
- LTE: B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28, B38, B39, B40, B41
- WCDMA: B1, B2, B4, B5, B6, B8, B19
- GSM: 850, 900, 1800, 1900 (MHz)
- WLAN: Wi-Fi 802.11 b/g/n, single-band, hotspot
- Bluetooth: 4.0, A2DP
- GNSS: GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS
Sensors: Accelerometer, gyro, proximity, ambient light, compass
Killswitches: Modem, WiFi & Bluetooth, Microphone, Cameras
Battery: Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery)
I/O: USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification
|Rear camera||OmniVision OV5640|
|Camera flash||SGMICRO SGM3140|
|Front camera||GalaxyCore GC2145|
|Ambient light / Proximity||SensorTek STK3335|
|Accelerometer / Gyroscope||InvenSense MPU-6050|
|Vibration motor||Unknown model|
|Volume buttons||Buttons connected to the KEYADC|
|Power button||X-Powers AXP803|
|Battery fuel gauge||X-Powers AXP803|
See the PinePhone Component List.
- Project Anakin
- "Project Don't Be Evil" devkit
- PinePhone v1.0 - Developer batch
- PinePhone v1.1 - Braveheart
- PinePhone v1.2 - Ubports Community Edition
- PinePhone v1.2a - postmarketOS Community Edition
- PinePhone v1.2b - Manjaro Community Edition, KDE Community Edition, Mobian Community Edition
Swapping in a new mainboard revision
The mainboard can be replaced, for example for upgrading to a newer hardware revision or if it is faulty. The replacement board does not have an OS preinstalled, to test if everything is working after swapping the mainboard a flashed SD card is required. The mainboard also comes with a non-functional firmware on the ANX chip, a newer firmware version has to be flashed as explained below to get certain USB functionality to work.
Replacing the mainboard
Prior to replacing your PinePhone’s mainboard please read the steps outlined in bullet points below and watch the attached video.
- You’ll need a small Phillip’s screwdriver and a prying tool to swap out the PinePhone’s mainboard.
- Remove the PinePhone’s back cover. See your quick start guide for details.
- Remove the battery as well as any inserted SD and SIM cards.
- Unscrew all 15 Phillip’s head screws around the midframe of the phone.
- Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.
- Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio/ UART jack.
- Pry the mainboard up gently from the left-hand side.
- Remove front and main cameras and reset them into the new mainboard.
- Check that the rubber proximity sensor housing is in the chassis, not stuck to the removed mainboard.
- Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.
A video tutorial can be found here:
Flashing the ANX firmware
|This method is currently not compatible with the Linux kernel 5.10.|
After swapping the mainboard the ANX chip has to be flashed for full USB functionality.
Download the latest ANX firmware image on the phone:
Execute as root ("sudo su") on the phone:
cp anx7688-fw.bin /lib/firmware/ echo 1 > /sys/class/typec/port0/device/flash_eeprom
Booting a factory test image will automatically flash the ANX chip. See PinePhone Software Releases#Factory-loaded postmarketOS build for such an image.
PinePhone hardware accessory compatibility
See PinePhone Hardware Accessory Compatibility for a list of devices working with the PinePhone (depending on their OS support).
The USB-C can be used to power the device, and offers USB2 host and OTG possibilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, HDMI port and Ethernet connection. The driver that would make this connection available is not supported at this time.
The PinePhone has 6 pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power input to charge the battery, power source and an I2C interface.
|5V / VBUS||VBAT||GND|
The VBUS pin is powered by USB and is 5V at up to 500mA. The second power pin is VBAT, which connects to the battery voltage. The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3V3 by the phone.
A step file for the back cover for creating custom cases is freely available here.
Community build protection case and stand
- PinePhone Development Stand at thingverse
- PinePhone Hard Case at thingverse
- PinePhone Hard Case at thingverse
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to "on", the headphone connector is in audio mode, if it is set to "off" it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.
The UART is 115200n8.
The pinout for the serial connector is:
- Tip: RX
- Ring: TX
- Sleeve: GND
You can buy a serial debug cable from the Pine64 Store. The store cable uses a 4 ring plug, as seen in the here, but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a "host"/DTE it means that you need a cross modem cable (Null Modem) with TX on Tip to be connected to RX. A cable like e.g. FTDI TTL-232R-3V3-AJ which has TX on Tip and RX on Ring fits perfectly.
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their "on" position is toward the top of the phone.
|1||Modem||Pulls Q1501 gate up (FET killing modem power)||"On" enables 2G/3G/4G communication and GNSS hardware, "off" disables it.|
|2||WiFi / Bluetooth||Pulls up CHIP_EN||"On" enables WiFi and Bluetooth communication hardware, "off" disables it.|
|3||Microphone||Breaks microphone bias voltage from the SoC||"On" enables audio input from on-board microphones (not 3.5mm jack), "off" disables it.|
|4||Rear camera||Pulls up PWDN on OV5640||"On" enables the rear camera, "off" disables it.|
|5||Front camera||Pulls up PWDN on GC2145||"On" enables the front camera, "off" disables it.|
|6||Headphone||Pulls up IN2 on analog switch BCT4717ETB||"On" enables audio input and output via the 3.5mm audio jack, "off" switches the jack to hardware UART mode.|
The PinePhone has two cameras, OmniVision OV5640 with 5MP (up to 2592 x 1944 pixels) as rear camera and GalaxyCore GC2145 with 2MP (up to 1600 x 1200 pixels) as front camera.
Further details regarding the camera and the Megapixels camera app can be found on Martijn's blog.
|The EG25 modem and RTL8723CS WiFi and bluetooth do not work without battery power, even if you are supplying enough power to the PinePhone with USB-C.|
The phone ships with a plastic sticker between the battery and the phone. You need to open the back cover (gently), then remove the battery and finally remove the sticker and check that the pins aren't bent. This is to protect the device from turning on during shipping.
- The extended life aftermarket BBU does fit, although it is a tight fit.
- There is a report that the EB-BJ700CBE isn't quite the same size, causing the back not to fit the Braveheart Edition properly.
The battery terminals, in order from nearest the edge to nearest the middle, are:
- not connected
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery can be recharged by connecting the phone to a charger. Once it has charged sufficiently you will be able to boot the phone.
If your battery is hard to remove from the phone, try loosening the screws in the midframe around it, which is pressing against the battery. Possibly cutting up a piece of plastic and sliding it under the battery as a pull tab can work too.
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem. The software
minicom can be used to send the commands.
To connect with the modem:
minicom -D /dev/ttyUSB2
A list of documented AT commands can be found in the EC25&EC21 AT Commands Manual from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website here.
The PinePhone's modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most OSes try to set the correct profile automatically.
To list the available VoLTE profiles:
AT+QMBNCFG="list" +QMBNCFG: "List",0,1,1,"ROW_Generic_3GPP",0x0501081F,201901141 +QMBNCFG: "List",1,0,0,"VoLTE-ATT",0x0501033C,201909271 +QMBNCFG: "List",2,0,0,"hVoLTE-Verizon",0x05010141,201911251 +QMBNCFG: "List",3,0,0,"Sprint-VoLTE",0x05010205,201908141 +QMBNCFG: "List",4,0,0,"Commercial-TMO_VoLTE",0x05010505,201811231 +QMBNCFG: "List",5,0,0,"Telus-Commercial_VoLTE",0x05800C43,201912031 +QMBNCFG: "List",6,0,0,"Commercial-SBM",0x05011C18,201904021 +QMBNCFG: "List",7,0,0,"Commercial-DT",0x05011F1C,201905311 +QMBNCFG: "List",8,0,0,"Reliance_OpnMkt",0x05011B38,201910161 +QMBNCFG: "List",9,0,0,"TF_Germany_VoLTE",0x05010C1B,201909201 +QMBNCFG: "List",10,0,0,"TF_Spain_VoLTE",0x05010CFA,201909261 +QMBNCFG: "List",11,0,0,"Volte_OpenMkt-Commercial-CMCC",0x05012071,201904281 +QMBNCFG: "List",12,0,0,"OpenMkt-Commercial-CT",0x05011322,201911081 +QMBNCFG: "List",13,0,0,"OpenMkt-Commercial-CU",0x05011505,201807052
To select a profile manually, select the best fitting one or a generic one if none fits:
Then enable Voice over LTE using:
And reboot the modem to apply the settings:
To check the status of VoLTE during a call, the AT command
CLCC can be used:
AT+CLCC +CLCC: 1,1,0,1,0,"",128 +CLCC: 2,1,0,1,0,"",128
The APN setting is only required for a public Internet connection ("data") on the phone. For tested APN settings and how to apply them see PinePhone APN Settings.
The page PinePhone Carrier Support contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.
Detailed information about the modem can be found on the page of the developer megi, including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi here. A script at the end of the document showcases a way to poweroff the modem before powering off the phone, which is integrated into most of the available OSes.
|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.|
The modem firmware can be updated to the latest version if it is outdated and dmesg returns the following message:
modem-power serial1-0: Your modem has an outdated firmware. Latest know version is EG25GGBR07A08M2G_01.002.07. Consider updating.
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.
- The battery needs to be charged sufficiently
- The phone needs to be plugged into a charger
- Deep sleep is recommended to be disabled as it can interrupt the update process
- It is recommended to close all other running applications
- Use common sense while doing the update, don't do the update while being impaired in any way
To get the latest firmware, clone the repository of user Biktorgj on the phone:
git clone https://github.com/Biktorgj/quectel_eg25_recovery
After cloning the directory, open it with cd:
Then run qfirehose, which starts the flashing process:
sudo ./qfirehose -f ./
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.
See PineModems for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.
Some phone operating systems may not have support for accessing your voicemail by holding down the 1 key. If you are in Canada and using rogers or a rogers associated carrier (such as Chatr), you can access your voice mail by calling an external number, see: https://www.howardforums.com/showthread.php/913346-Rogers-GSM-Voicemail-Retrieval-Numbers
In America, AT&T also has support for accessing your voicemail via an external phone number: https://www.att.com/support/article/wireless/KM1009101/
In Canada, Rogers voicemail can be called by dialing *98
GPS / GNSS
The AT commands for the GNSS are in a separate manual from the more general AT command documentation. The AGPS data upload uses the file management AT commands, which also have their own manual. All are linked in the documentation section below.
As with most smartphones, the PinePhone has a small antenna and has difficulty getting a first fix without assistance data. While the hardware supports this, it isn't yet used by the software in the distros. There is a proof of concept script which can be made to work, but support needs to be added to ModemManager, oFono etc. before it will be easy to use.
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.
The PinePhone Software Releases page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device.
For instructions on how to install the operating systems to the eMMC or SD card see PinePhone Installation Instructions.
Flashing eMMC using Jumpdrive
The internal eMMC flash storage can be flashed using the Jumpdrive utility by Danct12 and Martijn from postmarketOS. This utility boots from micro SD and exposes the internal eMMC flash storage when the PinePhone is connected to a computer. The process of flashing an OS to the exposed and mounted eMMC is identical to that of any other storage medium - e.g. a SD card. You can use the 'DD' command or a utility such as Etcher or Gnome Disks, etc.
Latest Jumpdrive can be found here.
Detailed usage instructions
- Download the Jumpdrive image
- Flash the Jumpdrive image to a micro SD card
- Boot the PinePhone from the Jumpdrive micro SD card
- Connect the PinePhone to your computer using USB-A -> USB-C cable
- Flash the exposed PinePhone drive (e.g. /dev/mm..., check for the right device in dmesg, GNOME disks, or similar, and make sure it's unmounted) with your chosen OS image
- Once the flashing process is complete, disconnect the PinePhone from your PC, power it down and remove the Jumpdrive SD card
- The process is now finished, and you can boot from eMMC
Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to 172.16.42.1, mount rootfs and fix it!
Resize file system (optional)
|Many OSes already include a script, which is resizing the partition on first boot, where this step is not required.|
If you flash a 4GB image distribution to your eMMC, your eMMC will only have a 3.7GB partition on it. To use the entire 14.7GB on the eMMC, run the following commands:
- sudo cfdisk /dev/sdX
- Change to [Resize] in the ncurses program, resize the 3.7GB partition to 14.7GB, and [Write]
- sudo resize2fs /dev/sdXY
Replace X with your drive's name. Replace Y with the partition you resized in cfdisk.
If you've found an issue or want to improve the tool consider these sites:
- Issues: https://github.com/dreemurrs-embedded/Jumpdrive/issues
- Pull Requests: https://github.com/dreemurrs-embedded/Jumpdrive/pulls
Frequently asked questions
For a list of frequently asked questions (including information regarding the shipping) see PinePhone FAQ.
Replacing the screen
Before attempting to replace the screen be sure to review the section on replacing the mainboard since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.
- Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.
- There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.
- The vibrator motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.
- The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a gold-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.
Take your time, use the right tools, be careful and you should be rewarded with success.
Spare parts not available in the Pine64 store
- Earpiece dimensions: 12x6x2 mm. Compatible with Xiaomi Mi2 / Mi3 / Mi4, Lenovo A536 and others. (ref)
- Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 and others. (ref)
- Proximity sensor rubber gasket
For an overview about media of the PinePhone you can use for the news, blogs, or similar see PinePhone Press.
PinePhone board information, schematics and certifications
- PinePhone mainboard schematic:
- PinePhone mainboard Released Schematic ver 1.2b
- PinePhone mainboard Released Schematic ver 1.2a
- PinePhone mainboard Released Schematic ver 1.2
- PinePhone schematic ver 1.2 change list
- "Braveheart" PinePhone mainboard Schematic ver 1.1
- "Braveheart" PinePhone mainboard component top placement drawing ver 1.1
- "Braveheart" PinePhone mainboard component bottom placement drawing ver 1.1
- PinePhone component list
- PinePhone USB-C small board schematic:
- PinePhone certifications:
Datasheets for components and peripherals
- Allwinner A64 SoC information:
- X-Powers AXP803 PMU (Power Management Unit) information:
- LPDDR3 (178 Balls) SDRAM:
- eMMC information:
- CMOS camera module information:
- LCD touch screen panel information:
- Lithium battery information:
- WiFi/BT module information:
- LTE module information:
- Digital video to USB-C bridge:
- Other components:
- See links in the Component List
- Getting start with PinePhone Hardware
- State of development progress
- PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC
- Contributions to the kernel development