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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 29,422
» Latest member: fnosai
» Forum threads: 16,178
» Forum posts: 116,806

Full Statistics

Latest Threads
booting is looping
Forum: PineNote Software
Last Post: jabi27
4 hours ago
» Replies: 2
» Views: 26
Can’t login to Linux
Forum: Linux on Pinebook Pro
Last Post: fnosai
5 hours ago
» Replies: 0
» Views: 18
* /lib64 is a symbolic li...
Forum: PineNote Software
Last Post: jabi27
8 hours ago
» Replies: 2
» Views: 42
Invalid Signature by m-we...
Forum: PineNote Software
Last Post: Francus
07-25-2025, 05:26 AM
» Replies: 0
» Views: 55
Pinetab2 not starting
Forum: PineTab Hardware
Last Post: biketool
07-25-2025, 03:04 AM
» Replies: 12
» Views: 6,612
incorporate a multimeter ...
Forum: General
Last Post: angelaeng
07-24-2025, 10:41 PM
» Replies: 1
» Views: 286
invalid signatures
Forum: Getting Started
Last Post: Dendrocalamus64
07-24-2025, 08:35 PM
» Replies: 2
» Views: 220
Pinebook problem
Forum: General Discussion on Pinebook Pro
Last Post: mikehenson
07-24-2025, 07:28 AM
» Replies: 1
» Views: 94
? Introducing RoutineHero...
Forum: General Discussion on PineTime
Last Post: oscar-gardiazabal
07-24-2025, 03:25 AM
» Replies: 0
» Views: 71
pinetab2 danctnix broken ...
Forum: PineTab Software
Last Post: acruhl
07-23-2025, 06:27 PM
» Replies: 6
» Views: 303

 
  PinePhone Blender / STL model?
Posted by: blihp - 05-30-2021, 09:42 PM - Forum: PinePhone Hardware - No Replies

I was curious if anyone has produced a Blender / OBJ / STL / other model of the PinePhone suitable for rendering?  So far I'm not finding much luck beyond finding a couple of rendered images of the PinePhone but nothing which points me to a model I can use for my own renders.


  Switching your PineTime between InfiniTime and Wasp-os
Posted by: Peetz0r - 05-30-2021, 06:55 PM - Forum: PineTime Tutorials - Replies (1)

Hey all! Many people want to try both Infinitime and Wasp-os. They hear about the reloader, but then find out that the reloader-factory.zip in Wasp-os 0.4 is broken, and building your own usually fails. There is some information about that, but not everyone can find it. That's the goal of this forum post.

The short version: don't use reloader-factory.zip, use the zip from here instead.

This does not contain full InfiniTime, only the recovery. This arrangement is necessary due to the size, but also allows you to flash any future release of InfiniTime without having to find a new reloader zip. After flashing this reloader zip and letting the reloader finish, hold the button until the pinecone turns red to reboot into recovery, then flash the latest InfiniTime.

The long version with step-by-step instructions and pictures for switching in both directions is on the wiki: https://wiki.pine64.org/wiki/Switching_y...nd_Wasp-os


  [Turorial] NAS Using A Recycled 1U Proliant Case
Posted by: ColPanic_ - 05-30-2021, 05:54 PM - Forum: RockPro64 Projects, Ideas and Tutorials - Replies (1)

So you've just gotten your brand new Rockpro64, you're looking for a clean way to stuff a PSU and 4 HDD backplane into a box that fits nicely onto your network rack. What do you do? Well, you could get the official NAS case. But that only fits 2 disks, and how are you supposed to mount that on your rack? With a shelf?? Inconceivable.

Well here's what I did:

Having bought my home network equipment off eBay, I know retired enterprise gear can be had for dirt cheap. So after some quick searching, I came across the perfect 1U case, that happened to also have a Proliant DL160 server inside it. Perfect for a weekend project.

Steps to NAS:

1. Gut the server, leaving only the PSU, backplane, and fans.

2. If the original SAS controller works, great! If not, find a Rockpro64 compatible PCIe SAS controller. I used an IBM H1110.

3. An ATX breakout board is handy for connecting to the case's power supply. But if you prefer crimping wires, you do you. As a side note, I'm using the ATX supply to directly control power to the Rockpro. The Rockpro actually has some solder points for power control, near the power buttons, which could be used to improve on my design. I'll be adding that mod myself whenever I get around to it.

4. You'll need an Arduino as well, I like using Nano's. They're super cheap and fit nicely into just about any project.

5. Shove it all into the case. It should look something like this:
   

6. You'll need to wire all those pieces together. I'm driving the LEDs directly from the Arduino GPIO, because I'm lazy I like to live dangerously. If you're more concerned about damaging your AVR than I am, you might want to buffer each of those LED lines with a transistor. I decided to wire the fancy buttons and blinkenlights on the front panel up to the Arduino for my NAS. You can put together a wiring harness to mate with the case connector, or be like me and shove your wires directly into the case connector. They're not going anywhere:
   
   

7. The front panel has a 2 row, 2.5mm pitch female connector for the USB connections. Hack a connector onto couple USB cables. You can then use the hacked cables as an adapter between the case USB connector and the Rockpro USB inputs. My DL160 case only supports USB 2.0, so I can't take full advantage of the Rockpro's USB interface:
   

8. If you don't like your NAS to sound like a jet plane taking off, take out some fans. I've left just one fan. It's keeping everything nice and cool, and runs almost silently. To maintain proper airflow, stuff some packing foam in place of the old fans:
   

9. You'll need to get some code onto the Arduino. This script handles power up/shutdown; fan control; and, just to look like a real enterprise grade server, blinking some lights:

Code:
#include <Arduino.h>
#include <elapsedMillis.h>

#define PIN_UART_RX     1
#define PIN_PSU_ON      2
#define PIN_PANEL_PWR   3
#define PIN_SYS_LED_P1  4
#define PIN_NIC_LED_P   5
#define PIN_HDD_LED_P   6
#define PIN_BOARD_PWR   7
#define PIN_FAN_PWM     9
#define PIN_PWR_LED_GP_RN   12
#define PIN_PWR_LED_GN_RP   13
#define PIN_SYS_LED_G_N     19
#define PIN_SYS_LED_R_N     20
#define PIN_SYS_LED_P2      21

#define PWR_STATE_OFF           0   //PSU powered off
#define PWR_STATE_STARTUP       1   //PSU starting up, power button is still held
#define PWR_STATE_ON            2   //PSU powered up, button no longer held
#define PWR_STATE_SHUTDOWN_TMR  3   //PSU powered up, shutdown timer is counting
#define PWR_STATE_SHUTDOWN      4   //PSU shut down, button is still held
#define PWR_STATE_BOARD_OFF     5   //board shut down, PSU still on

#define BLINK_STATE_READY   0   //LED is not blinking
#define BLINK_STATE_ON      1   //LED is off
#define BLINK_STATE_OFF     2   //LED is on

#define UART_STATE_OK       0
#define UART_STATE_ERR      1

#define UART_WATCHDOG_TIMEOUT   10000

uint8_t power_state = PWR_STATE_OFF;
_Bool uart_state = UART_STATE_OK;

int blink_chance = 0;

elapsedMillis event_timer;
elapsedMillis uart_watchdog;
elapsedMillis blink_timer;

void setup() {

    // Configure PWM on pin 9 (and 10) @ 25 kHz.
    TCCR1A = 0;
    TCCR1B = 0;
    TCNT1  = 0;
    TCCR1A = _BV(COM1A1)
           | _BV(COM1B1)
           | _BV(WGM11);
    TCCR1B = _BV(WGM13)
           | _BV(CS10);
    ICR1   = 320;

    pinMode(PIN_UART_RX, INPUT);
    pinMode(PIN_PSU_ON, INPUT);
    pinMode(PIN_PANEL_PWR, INPUT_PULLUP);
    pinMode(PIN_SYS_LED_P1, OUTPUT);
    pinMode(PIN_NIC_LED_P, OUTPUT);
    pinMode(PIN_HDD_LED_P, OUTPUT);
    pinMode(PIN_BOARD_PWR, INPUT);
    pinMode(PIN_FAN_PWM, OUTPUT);
    pinMode(PIN_PWR_LED_GP_RN, OUTPUT);
    pinMode(PIN_PWR_LED_GN_RP, OUTPUT);
    pinMode(PIN_SYS_LED_G_N, OUTPUT);
    pinMode(PIN_SYS_LED_R_N, OUTPUT);
    pinMode(PIN_SYS_LED_P2, OUTPUT);

    digitalWrite(PIN_SYS_LED_P1, HIGH);
    digitalWrite(PIN_NIC_LED_P, LOW);
    digitalWrite(PIN_HDD_LED_P, LOW);
    analogWrite(PIN_FAN_PWM, 0);
    digitalWrite(PIN_PWR_LED_GP_RN, LOW);
    digitalWrite(PIN_PWR_LED_GN_RP, LOW);
    digitalWrite(PIN_SYS_LED_G_N, LOW);
    digitalWrite(PIN_SYS_LED_R_N, HIGH);
    digitalWrite(PIN_SYS_LED_P2, HIGH);

    Serial.setTimeout(50);
}

void loop() {
   
/*********************************************
* handle system power
*********************************************/
    switch(power_state)
    {

        case PWR_STATE_OFF:
        {
            if( (digitalRead(PIN_PANEL_PWR) == LOW) || (PIN_BOARD_PWR == HIGH) )
            {
                power_state = PWR_STATE_STARTUP;
                pinMode(PIN_PSU_ON, OUTPUT);
                digitalWrite(PIN_PSU_ON, LOW);

                //turn on the GREEN power LED
                pinMode(PIN_PWR_LED_GP_RN, OUTPUT);
                pinMode(PIN_PWR_LED_GN_RP, OUTPUT);
                digitalWrite(PIN_PWR_LED_GN_RP, LOW);
                digitalWrite(PIN_PWR_LED_GP_RN, HIGH);

                event_timer = 0;
            }
        } break;
        case PWR_STATE_STARTUP:
        {
            //after button is released, wait 5 seconds for startup
            if( (digitalRead(PIN_PANEL_PWR) == HIGH) && (event_timer > 5000) )
            {
                power_state = PWR_STATE_ON;
            }
        } break;
        case PWR_STATE_ON:
        {
            if(digitalRead(PIN_PANEL_PWR) == LOW)
            {
                event_timer = 0;
                power_state = PWR_STATE_SHUTDOWN_TMR;
            }
            else if(digitalRead(PIN_BOARD_PWR) == LOW)
            {
                event_timer = 0;
                power_state = PWR_STATE_BOARD_OFF;
            }
        } break;
        case PWR_STATE_SHUTDOWN_TMR:
        {
            if(digitalRead(PIN_PANEL_PWR) == LOW)
            {
                //button was held for 3 seconds, shut down
                if( event_timer > 3000 )
                {
                    //tri-state the power pin
                    power_state = PWR_STATE_SHUTDOWN;
                    pinMode(PIN_PSU_ON, INPUT);

                    //turn on the RED power LED
                    digitalWrite(PIN_PWR_LED_GP_RN, LOW);
                    digitalWrite(PIN_PWR_LED_GN_RP, HIGH);

                    //disconnect UART
                    Serial.end();
                    pinMode(PIN_UART_RX, INPUT);
                }
            }
            else
            {
                power_state = PWR_STATE_ON;
            }
        } break;
        case PWR_STATE_SHUTDOWN:
        {
            //wait until button is released
            if(digitalRead(PIN_PANEL_PWR) == HIGH)
            {
                power_state = PWR_STATE_OFF;
            }
        } break;
        case PWR_STATE_BOARD_OFF:
        {
            if(digitalRead(PIN_BOARD_PWR) == LOW)
            {
                //board was off for 3 seconds, shut down
                if( event_timer > 3000 )
                {
                    //tri-state the power pin
                    power_state = PWR_STATE_SHUTDOWN;
                    pinMode(PIN_PSU_ON, INPUT);

                    //turn on the RED power LED
                    digitalWrite(PIN_PWR_LED_GP_RN, LOW);
                    digitalWrite(PIN_PWR_LED_GN_RP, HIGH);

                    //disconnect UART
                    Serial.end();
                    pinMode(PIN_UART_RX, INPUT);
                }
            }
            else
            {
                power_state = PWR_STATE_ON;
            }
        } break;
        default:
            break;
    }

/*********************************************
* blink Eth0 LED
*********************************************/
    // 100 megabit blinks fastest
    #define BLINK_MAX_CHANCE    100000000
    #define BLINK_MILLIS        30

    static uint8_t blink_state = BLINK_STATE_READY;

    if( (power_state == PWR_STATE_ON) &&
        (uart_state == UART_STATE_OK) )
    {
        switch(blink_state)
        {
            case BLINK_STATE_READY:
            {
                // blink the eth0 LED randomly, with a frequency based
                // on the network traffic
                if( (blink_chance != 0) &&
                    ( (random(0,BLINK_MAX_CHANCE) < blink_chance) ||
                    (random(0,2000) == 0) )
                    )
                {
                    blink_state = BLINK_STATE_ON;
                    blink_timer = 0;
                    digitalWrite(PIN_NIC_LED_P, HIGH);
                }
            } break;
            case BLINK_STATE_ON:
            {
                if(blink_timer > BLINK_MILLIS)
                {
                    blink_state = BLINK_STATE_OFF;
                    blink_timer = 0;
                    digitalWrite(PIN_NIC_LED_P, LOW);
                }
            } break;
            case BLINK_STATE_OFF:
            {
                if(blink_timer > (BLINK_MILLIS/2))
                {
                    blink_state = BLINK_STATE_READY;
                }
            } break;
            default:
            {
                    blink_state = BLINK_STATE_READY;
                    blink_timer = 0;
                    digitalWrite(PIN_NIC_LED_P, LOW);
            }
        }
    }

    #undef BLINK_MAX_CHANCE
    #undef BLINK_TICKS        

/*********************************************
* handle UART commands
*********************************************/
    #define UART_IDENTIFIER_IDX  0
    #define UART_CMD_IDX         9

    /* enable/reset UART */

    // keep UART off until board is powered up
    if(power_state != PWR_STATE_ON)
    {
        uart_watchdog = 0;
    }
    // no commands received in timeout period, reset UART
    else if(uart_watchdog > UART_WATCHDOG_TIMEOUT)
    {
        Serial.end();
        Serial.begin(115200);
        uart_watchdog = 0;

        uart_state = UART_STATE_ERR;

        //set warning LED
        digitalWrite(PIN_SYS_LED_G_N, HIGH);
        digitalWrite(PIN_SYS_LED_R_N, LOW);
    }

    /* monitor the console output */

    if (Serial.available() > 0) {

        String command;
        int argument = 0;

        // monitor the serial port for the identifier string
        command = Serial.readStringUntil('\n');

        if(command.substring(UART_IDENTIFIER_IDX, UART_CMD_IDX)
            .equals("SimonSays"))
        {
            // reset the watchdog timer
            uart_watchdog = 0;

            uart_state = UART_STATE_OK;

            // system OK
            digitalWrite(PIN_SYS_LED_R_N, HIGH);
            digitalWrite(PIN_SYS_LED_G_N, LOW);

            // parse the command
            command.remove(UART_IDENTIFIER_IDX, UART_CMD_IDX);
            command.trim();

            int arg_idx = command.lastIndexOf(' ')+1;
            if(arg_idx > 0)
            {
                argument = command.substring(arg_idx).toInt();
                command.remove(arg_idx);
                command.trim();
            }

        }

        /* commands */

        // change the fan speed
        if(command.equals("SET FAN"))
        {
            analogWrite(PIN_FAN_PWM, argument);
        }

        // blink the eth0 LED
        else if(command.equals("SET NET LED"))
        {
            blink_chance = argument;
        }
    }

    #undef UART_IDENTIFIER_IDX
    #undef UART_CMD_IDX
}

10. Now you'll need something on the Rockpro side to help with fan and light control. This script uses a wake word to send commands to the Arduino over the UART console. You'll want to add this python script to systemd so it runs automagically on boot:
Code:
#!/usr/bin/python3

import io
import time
import psutil
import os

net_traffic_prev = 0

os.system("stty -F /dev/ttyS2 ospeed 115200")

while True:
    temp_file1 = open("/sys/class/thermal/thermal_zone0/temp", "r")
    temp_file2 = open("/sys/class/thermal/thermal_zone1/temp", "r")

    temp1 = temp_file1.readline()
    temp2 = temp_file2.readline()

    temp_file1.close()
    temp_file2.close()

    if temp1 > temp2:
        hightemp = int(temp1)
    else:
        hightemp = int(temp2)

    if hightemp < 40000:
        pwm = 0
    else:
        pwm = int(( (hightemp-40000) / 40000 ) * 255)

    net_counters = psutil.net_io_counters()
    net_traffic_curr = (net_counters.bytes_sent + net_counters.bytes_recv)
    net_traffic = str(net_traffic_curr - net_traffic_prev)
    net_traffic_prev = net_traffic_curr

    uart_out = open("/dev/ttyS2", "w")
    uart_out.writelines("\nSimonSays SET FAN "+str(pwm)+"\n")
    uart_out.writelines("\nSimonSays SET NET LED "+str(net_traffic)+"\n")
    uart_out.close()

    time.sleep(2)

11. Now put it onto your rack, and make all your friends jealous of your new ultra-quiet ultra-low-power 1U server!


I promised earlier that I'd post my project if I got some useful help from this forum, so I hope I didn't disappoint!

My scripts and schematic can also be found on my github page.  Feel free to send me a pull request with any suggestions.

Big Grin


  Can't get through "User Configuration" on new PinePhone
Posted by: a-l - 05-30-2021, 05:36 PM - Forum: General Discussion on PinePhone - Replies (24)

I feel silly, but have now spent many hours trying to set up my new PinePhone.
Have watched many videos and read many posts, but none mentions this issue.
After the KDE symbol comes up, everyone talks about a PIN screen, but that's not what I get.
I'm getting something called 'User Configuration', where it asks for Full Name, Username, and Password.
After (I think) entering those (it's very awkward because it just shows the keyboard - I'm hitting <CR> and
      then have to push the Power button to see the entries!) and using '123456' as the Password, nothing happens.
I'm sure there is a simple explanation for this - can someone please tell me what I'm doing wrong?
Thanks in advance, everyone.


  Increasing max voltage to use a bigger battery
Posted by: SocialNetworkingWasAMistake - 05-30-2021, 12:55 PM - Forum: Mobian on PinePhone - Replies (4)

In https://wiki.pine64.org/wiki/PinePhone_FAQ#Battery it says I can use this to allow my phone to charge more:

Code:
echo 4350000 > /sys/class/power_supply/axp20x-battery/voltage_max_design
When I do that however I get a write error, what's going on?
I want to install this battery but it's not going to be able to use the full capacity if I can't set the max voltage, right?
https://www.ebay.co.uk/itm/333992044176


Brick VR apps for the Pinephone (Google Cardboard)
Posted by: MirceaKitsune - 05-30-2021, 10:45 AM - Forum: PinePhone Software - No Replies

Despite the screen quality of phones being horrible for VR, I bought a Google Cardboard to use my Samsung Galaxy S3 as a headset with. There are some simple apps I enjoyed toying with on Android; Once I visit an appropriate store I plan on getting a better holder that's made of plastic and hopefully has better quality.

I'd like to use my Pinephone for this as well. Which is why I wanted to know: What is the status of VR applications, under the default Manjaro OS? Are there any apps that let you do things with the phone attached to your face, using stereoscopic rendering and the gyroscope / compass for orientation? I'm not looking for detailed games or anything: Even stuff like image or video viewers would be a fun way to pass the time getting immersed in something fun.


  Hardwired software or functionality imposed by companies or authorities
Posted by: MirceaKitsune - 05-30-2021, 09:21 AM - Forum: General Discussion on PinePhone - Replies (16)

One thing I can't stand about conventional smartphones, from Android to Apple and pretty much all of them these days, is the practice of hiding or forcing certain software in the device either for the sake of a company or that of the government. There's been news in recent years that some devices made it impossible to uninstall Facebook if you don't want to use it: Obviously there's no such issue with the Pinephone thank goodness... I take it there isn't even a Facebook app to begin with, you probably use that from a web browser like on a normal computer the way it's meant to be.

But I was also wondering about things some pesky governments have been pushing smartphone manufacturers to include in their devices. I know encryption backdoors aren't a risk thankfully; They haven't gotten their way with that and never will... especially not on open-source devices where it wouldn't even be possible to maintain them, people would find out and the community wouldn't accept it thus replacing any compromised software packages.

On the other side, there was talk many years ago about the government of South Korea doing the extremely creepy thing of trying to force phone manufacturers to install tracking software on every teenage user in the country, even threatening teens or their parents with arrest if the state's spying software is removed from any device. I take it Koreans can still buy Pinephones despite this, which of course don't come infested with such a disgusting product thank the gods.

Another big example closer to home is an alert system that was discussed a few years ago if I'm not mistaken; Something that allowed authorities to track where your phone is located, and if you're in an area where a calamity is happening they'd have the ability to force a message on your device and you couldn't disable the thing. As an optional service I'm definitely not against it, quite the contrary... but forced and hardcoded into my device, no way I don't want any of that stuff.

So other than compliance with certain radio frequencies and normal technical stuff: Is all top level software in the device free from services or practices that can't be disabled, based on the desire of any authority other that the user of each device? I don't doubt it should be so but asking just to ensure there's no such risk.


  Does the Pinephone rely on components built with slave labor?
Posted by: MirceaKitsune - 05-30-2021, 08:45 AM - Forum: General Discussion on PinePhone - Replies (8)

To be clear: I'm in no way thinking of not getting a Pinephone based on the answer to this question, nor have anything against the creators of this beautiful device if the answer happens to be yes (especially if it's out of necessity). I generally encourage others to do the same and be constructive on the matter, for angry social justice only ruins every good cause it starts out being against without doing anything to achieve the goal of stopping the original issue in the end.

So with increasing discussion on the matter, I wanted to at least know the truth for my curiosity: Does the Pinephone rely on parts produced in China, particularly in regions or by manufacturers suspected of using slave labor? And if so, is there no way to replace some of those supply chains, without having to sacrifice the amazing price the Pinephone is offered to us at?



In recent months it's been uncovered that a lot of smartphone parts, including those used by companies in the West, were created using slave labor in China... because that's somehow still a thing in the 21th century because CCP. Apple in particular has come under fire after it was uncovered they knowingly use parts made by enslaved Uighurs in Xinjiang... namely for the fact that they've been actively trying to hide it, whereas hardened Apple fanboys also refuse to hear of it or anything that could make the company less holy in their eyes. Like I said I won't blame the PP team whatever the case here, but believe this should be known if it affects us too so we may think of ways to discourage it, for instance by supporting suppliers that have the same prices but don't rely on medieval practices to keep them low.


  POE 802.3af/at on the H64 Model B
Posted by: h64poe - 05-30-2021, 07:42 AM - Forum: Pine H64 Hardware and Accessories - Replies (1)

Hi team,

Can you please advise is the POE on the H64 B is 802.3af/at? Does it come built in. I can’t see the detail on the wiki or the store.


  POE support for the Rock64 v3
Posted by: h64poe - 05-30-2021, 07:40 AM - Forum: Rock64 Hardware and Accessories - No Replies

Hi team,

Can you please advise is the POE on the Rock64 is 802.3af/at? Does it come built in. I can’t see the detail on the wiki or the store.