Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 30,251
» Latest member: naturasy
» Forum threads: 16,391
» Forum posts: 117,628

Full Statistics

Latest Threads
Article: Will Linux phone...
Forum: General
Last Post: elinkser
4 hours ago
» Replies: 3
» Views: 174
Star64 Irradium (based on...
Forum: Getting Started
Last Post: mara
10-08-2026, 02:00 PM
» Replies: 21
» Views: 20,710
Pinecil V2 + Raspberry Pi...
Forum: General
Last Post: candera
10-08-2026, 03:26 AM
» Replies: 0
» Views: 68
SlateOS feedback needed!
Forum: Development Discussion on PineTime
Last Post: Nolegdai
10-05-2026, 02:04 PM
» Replies: 1
» Views: 735
Unknown Startup Password ...
Forum: PineTab Hardware
Last Post: tllim
10-05-2026, 12:44 PM
» Replies: 1
» Views: 220
HDMI or VGA From Pinebook...
Forum: Pinebook Pro Hardware and Accessories
Last Post: tllim
10-05-2026, 12:42 PM
» Replies: 7
» Views: 10,233
Delivery to Ukraine
Forum: Shipment Related Discussion
Last Post: freidepiter
10-01-2026, 12:56 PM
» Replies: 10
» Views: 16,626
PINEPOCALYPSE (pics inclu...
Forum: General Discussion on Pinebook Pro
Last Post: segaloco
09-29-2026, 11:36 PM
» Replies: 2
» Views: 676
PineTab-V Experiences
Forum: General Discussion on PineTab
Last Post: segaloco
09-29-2026, 11:28 PM
» Replies: 0
» Views: 242
irradium (based on crux l...
Forum: Linux on Rock64
Last Post: mara
09-27-2026, 11:55 AM
» Replies: 14
» Views: 21,259

 
  Sanity check on spliced charger
Posted by: jcun4128 - 05-06-2023, 07:04 PM - Forum: Pinebook Pro Hardware and Accessories - Replies (12)

I want to know if I'm going to burn my house down with what I've made lol.

[Image: UPQhv5R.png]

This is a hardware fix for the PBP not waking from sleep.

My intent is to just have it plugged in most of the time but this will have a python script running on pbp to check battery voltage eg. between 20-80% and then tell the charger to stop charging or to charge.

This whole thing works. I was just concerned with the temperatures... maybe there is an obvious reason you should not do this.

With a bench top power supply it pulls 5V at 2.58A when the battery is in 50% range... maybe it pulls more when battery is near 0%.

I measured 106F bottom of the PBP case and 122F on charger surface. It was 80F in the room (AC broken).


  Zephyr Backlight Examples for PineTime
Posted by: lcj - 05-06-2023, 02:54 PM - Forum: Development Discussion on PineTime - No Replies

This is a very junior question but I am just trying to get the backlight going using Zephyr, VS Code (with nRF Connect for VS Code Add-In), the PineTime DevKit0 board in Zephyr, and a PineTime DK.

I am trying to figure out how to do the backlight from the button example (which replaced the board specific example). I have not been able to get it working. It uses code like this:

Code:
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios,
                                  {0});
static struct gpio_callback button_cb_data;

/*
* The led0 devicetree alias is optional. If present, we'll use it
* to turn on the LED whenever the button is pressed.
*/
static struct gpio_dt_spec led = GPIO_DT_SPEC_GET_OR(DT_ALIAS(led0), gpios,
                             {0});

void button_pressed(const struct device *dev, struct gpio_callback *cb,
            uint32_t pins)
{
    printk("Button pressed at %" PRIu32 "\n", k_cycle_get_32());
}

void main(void)
{
    int ret;

    if (!device_is_ready(button.port)) {
        printk("Error: button device %s is not ready\n",
               button.port->name);
        return;
    }

    ret = gpio_pin_configure_dt(&button, GPIO_INPUT);
    if (ret != 0) {
        printk("Error %d: failed to configure %s pin %d\n",
               ret, button.port->name, button.pin);
        return;
    }

    ret = gpio_pin_interrupt_configure_dt(&button,
                          GPIO_INT_EDGE_TO_ACTIVE);
    if (ret != 0) {
        printk("Error %d: failed to configure interrupt on %s pin %d\n",
            ret, button.port->name, button.pin);
        return;
    }
...
}

These other examples:

pinetime-zephyr/main.c at master · najnesnaj/pinetime-zephyr · GitHub

[/url][url=https://github.com/albsod/pinetime-hypnos/blob/master/app/hypnos/src/backlight.c]pinetime-hypnos/backlight.c at master · albsod/pinetime-hypnos · GitHub

pinetime/backlight.c at develop · ck-telecom/pinetime · GitHub

Use code which looks like this:

Code:
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
#define LED0    DT_GPIO_LABEL(LED0_NODE, gpios)
#define PIN     DT_GPIO_PIN(LED0_NODE, gpios)
#define FLAGS   DT_GPIO_FLAGS(LED0_NODE, gpios)
#endif

static void backlight_init(void)
{
        const struct device *dev;

        dev = device_get_binding(LED0);
        /* If you have a backlight, set it up and turn it on here */
        gpio_pin_configure(dev, PIN, GPIO_OUTPUT_ACTIVE | FLAGS);
        gpio_pin_set(dev, PIN, 1);
}


or this:

Code:
/* ********** ********** DEFINES ********** ********** ********** */
#define BACKLIGHT_PORT  DT_GPIO_LABEL(DT_ALIAS(led1), gpios)
#define BACKLIGHT_1     DT_GPIO_PIN(DT_ALIAS(led0), gpios)
#define BACKLIGHT_2     DT_GPIO_PIN(DT_ALIAS(led1), gpios)
#define BACKLIGHT_3     DT_GPIO_PIN(DT_ALIAS(led2), gpios)
/* ********** **********  ********** ********** ********** */

/* ********** ********** VARIABLES AND STRUCTS ********** ********** */
static const struct device* backlight_dev;
static bool backlight_enabled = false;
/* ********** ********** ********** ********** ********** ********** */

/* ********** ********** FUNCTIONS ********** ********** */
void backlight_init()
{
    backlight_dev = device_get_binding(BACKLIGHT_PORT);
    gpio_pin_configure(backlight_dev, BACKLIGHT_1, GPIO_OUTPUT);
    gpio_pin_configure(backlight_dev, BACKLIGHT_2, GPIO_OUTPUT);
    gpio_pin_configure(backlight_dev, BACKLIGHT_3, GPIO_OUTPUT);
    backlight_enable(true);
    LOG_DBG("Backlight init: Done");
}


I guess my questions is should I try to use the GPIO_DT_SPEC_GET_OR syntax or DT_GPIO_PIN, DT_GPIO_LABEL, and DT_GPIO_FLAGS.

I'm really new at this, as you can probably tell. I might be mixing things up. Trying to figure out the GPIO to turn on/off the backlight and it seems like this commonly/historically used device* structure and the gpio_dt_spec from the examples.


  PINE A64 SBC: Clone of a functional 32GB SD card doesn't boot
Posted by: burningkrome - 05-06-2023, 06:01 AM - Forum: General Discussion on PINE A64(+) - Replies (3)

I have a Pine64 from the original Kickstarter (2016.) It boots from a 32GB SD card, which I've imaged from an Ubuntu16 Pine64 image file. 

I've created a full disk backup of this 32GB SD card using AOMEI Backupper, and then restored the entire disk to a new 64GB SD card. The restore is successful, and the disk looks OK, but the 64GB card won't boot. Putting it in the Pine64 and powering on simply remains at a black screen (the original SD boots as soon as I plug the Pine64 in. I don't have to press a "Start" button or anything.) 

I have also tried this with a 256 SD card, with the same results. 

I have tried copying the entire 32GB SD card with DD in linux, and restoring via DD. Same problem. 

What am I missing. Does the new disk have to have a boot sector activated or something?

I absolutely can't see the difference (see image for full details about the drive and copy)...

[Image: 6rXMvv3]

https://ibb.co/6rXMvv3 (If image link is broken)

   


Bug Star64
Posted by: cpnetserver - 05-05-2023, 01:04 AM - Forum: General - No Replies

Hi guys!
Does anyone know when new BXE-4-32 GPU drivers will be available for Linux Kernel 6.x?
Thanks for reply.


  SMS not delivered if receiver offline at sending time
Posted by: alpineduck - 05-03-2023, 05:48 PM - Forum: General Discussion on PinePhone - Replies (14)

Hello,

I've been using the PinePhone regularly for about half a year. Calls and SMS have been reliable, with the notable exception of the following problem that I would like to understand, and hopefully solve:

If I send a SMS to a phone that's offline, the expected behaviour of any SMS service is that the message is temporarily stored by the carrier, and when the receiver phone is later brought online, it gets the message delivered. For some reason, this isn't the case for the messages I send from the PinePhone. Messages are delivered properly when the receiver is online, but they never reach their destination if it was offline at the time of sending.

I tried with two different carriers and both 3G and 4G networks for each: the problem is systematic with the PinePhone, while messages are delivered properly when the same SIM card is used in another phone. The problem also persisted across various upgrades of the modem firmware, including ADSP.

When logged in to my user account on my carrier's website, I can see that the messages were successfully sent.

To me, this looks like the PinePhone sends its messages together with some kind of metadata meaning "do not attempt later delivery, instead discard the message if the receiver is unreachable". Could anyone confirm this? Can it be changed and how? I couldn't find any information on that matter and to be honest I'm quite surprised to be the first one to bring this up.


Information QEMU with Alpinelinux
Posted by: Surehand53 - 05-03-2023, 01:41 PM - Forum: General Discussion on Pinebook Pro - Replies (6)

Alpinelinux in QEMU

I have used the introduction from astr0baby and a few other internet sources and came up with a working solution to boot Alpinelinux in QEMU on the Pinebook Pro. The settings are relatively simple and should work with other target ISOs in a similar way. There is no graphics support, yet. The host distro used here is Manjaro. There might be some differences with other distros. Mind you, this describes how to run an arch64 ISO on an arch64 system.

Install Qemu and create a folder to keep all files together:

Code:
pacman -S qemu-base
pacman -S qemu-img
mkdir qemu

Copy the ISO of Alpinelinux to your qemu folder.  I have used the Standard ISO for the aarch64 architecture.

Then you need to download a BIOS

Code:
wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd

Last thing to prepare is a virtual harddrive to install Alpinelinux

Code:
qemu-img create -f qcow2 alpine.qcow2 8G

This makes a 8G virtual hard disk in a file named alpine.qcow2, the qcow2 format being a format which appears to be 8G to the guest (VM), but only actually writes to the host any sectors which were written to by the guest in practice.

Install Alpinelinux

With all in place you can now start qemu from the .iso file and then install Alpinelinux to your virtual harddrive

Code:
qemu-system-aarch64 \
-machine virt -cpu cortex-a57 \
-m 1024M -nographic \
-bios QEMU_EFI.fd \
-drive format=raw,readonly=on,file=alpine-standard-3.17.3-aarch64.iso \
-drive file=alpine.qcow2,media=disk,if=virtio

A small explanation. The first line is qemu for the aarch64 architecture. The second line describes the cpu. Then memory of 1024M is assigned. 512M is also fine. No graphics is supported. Next is the bios and then the two drives. The ISO file and the virtual harddrive.

Later I show how to use kvm and smp. They could also be used here, but this keeps is simple.

Once Alpinelinux has booted login like this:

user: root

passwd: <leave empty>

Once logged in you can straight away start the install process.

Code:
setup-alpine

Please see the Alpine Docu  and Alpine Wiki for details of the installation process.

You will be asked a bunch of questions, most of them will be default. Things to notice:
  • maybe set your timezone
  • you will be asked which drive you want to use: vda
  • what kind of installation you want: sys

Run Alpinelinux

After the system is installed successfully, you can poweroff. To restart the system you don't need the ISO file anymore. The command after installation is:

Code:
qemu-system-aarch64 \
-machine virt -cpu cortex-a57 \
-m 1024M -nographic \
-bios QEMU_EFI.fd \
-drive file=alpine.qcow2,media=disk,if=virtio

SMP

If you want qemu to use more than one cpu add the [backcolor=#f6f8fa]-smp 2[/backcolor] switch. This gives two cpus, more is possible.

KVM

For Kvm to work you either have to add your user in Manjaro to the kvm group, or run qemu with sudo.

Also:
  • add -accel kvm
  • you can switch [backcolor=#f6f8fa]-cpu[/backcolor] to host

If you use KVM there appears to be a bug that sometimes creates this error message:

Quote:qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument

Just repeat the start command until it works.

Code:
qemu-system-aarch64 \
-accel kvm -machine virt -cpu host -smp 2 \
-m 1024M -nographic \
-bios QEMU_EFI.fd \
-drive file=alpine.qcow2,media=disk,if=virtio

Edit See comment from jpalus below for a better way to call qemu with kvm.

That's it. I am sure there is still much to improve, but it works.

References

https://drewdevault.com/2018/09/10/Getti...-qemu.html


  PinePhone app development
Posted by: WhiteHexagon - 05-03-2023, 08:48 AM - Forum: PinePhone Software - Replies (14)

okay, so my new PinePhone arrived, yay! and after a tricky challenge to get past the user registration screen, I am now ready to do some app development.  I have previous experience with iOS and Android, and currently playing around with Zig.  However I am new to Linux development, and from my brief bit of research I can see GUI options using SDL or GTK...  Do we currently have a 'getting started' as an App developer type resource?  maybe a template very basic GUI App? responding to orientation events, life cycle events etc, or is someone able to give me some pointers please?  Something low level like single header C libs linking into my Zig would be ideal.  i.e. I have no interest in giant frameworks with dependency hell.  Alternative approach would be something like a unikernal template with a framebuffer starting point?  I am open to suggestions Smile


  Jabber with chatty
Posted by: user641 - 05-03-2023, 07:54 AM - Forum: Mobian on PinePhone - Replies (2)

Hello, I've been using jabber with chatty, I like it's simple interface. But I have the problem that omemo encryption works not with all contacts and when the phone goes into ibernation encrypted messages are not unencrypted after unlocking the phone. Is there a way around?


  Getting all keys working on pine phone keyboard-case
Posted by: undata - 05-03-2023, 07:21 AM - Forum: PinePhone Accessories - Replies (5)

Does anyone have a definite, exact, way to get the keyboard working for characters such as '|' which are on the front bevel of the function keys? Please.

There were various posts and threads I followed, which loaded the so-called "userland" driver, which I built, and which I know installed, since it disabled any functioning from the pine phone keyboard.

Some (or maybe all) of these posts come from people who may be smarter than myself. But can we have an exact , EXACT, set of steps? It's just surreal that we have instructions making crucial changes to the boot sequence etc., which also include steps such as "To save changes and close Nano, type CTRL-X, Y, and Enter."

I mean really, they are giving somewhat vague instructions about how to create daemons and drivers, and assuming that a person performing those would need exact keystrokes for how to save a file using nano???? Wow.


  Article: NuttX RTOS for PinePhone: Phone Calls and Text Messages
Posted by: lupyuen - 05-02-2023, 10:51 PM - Forum: PinePhone Software - Replies (2)

What makes PinePhone a phone? Because it will make Phone Calls and send Text Messages!

We’re porting Apache NuttX RTOS (Real-Time Operating System) to PinePhone. Today let’s turn NuttX into a Feature Phone…

1. Outgoing and Incoming Phone Calls over 4G

2. Send and receive SMS Text Messages

3. Why we prefer Encoded PDU Messages for SMS

4. Programming the 4G LTE Modem with Apache NuttX RTOS

5. Doing all these over UART vs USB


Read on for more...

NuttX RTOS for PinePhone: Phone Calls and Text Messages