Wish List
#1
[img]chrome-extension://hiidjliailpkjeigakikbfedlfijngih/images/right-arrow.png[/img]


Hello World.. 

Is there a way to make a wifi hotspot in manjara ARM on pinephone?

And a protonmail client?

And the Geary is still not working.. 

Any solutions?

Zeven
  Reply
#2
Regarding protonmail, I have successfully rebuilt the protonmaill bridge in nogui mode, and was able to get my protonmail email from geary (I built it myself from geary's github, the one pre installed segfaults...)
  Reply
#3
in order to have usb tethering, you need those two scripts:

pinephone-setup-usb-nework.sh:
Code:
#!/bin/sh

if [ ! -e /etc/NetworkManager/system-connections/USB.nmconnection ]; then
    # Create network connection
    nmcli connection add con-name USB \
                        ifname usb0 \
                        type ethernet \
                        ip4 10.66.0.1/8

    # Set priorities so it doesn't take precedence over WiFi/mobile connections
    nmcli connection modify USB ipv4.route-metric 1500
    nmcli connection modify USB ipv4.dns-priority 150

    # Share connection so it can be used for tethering
    nmcli connection modify USB ipv4.method shared
fi

and, pinephone-usb-gadget.sh:
Code:
#!/bin/sh

CONFIGFS=/sys/kernel/config/usb_gadget/g1
USB_VENDORID="0x1D6B"  # Linux Foundation
USB_PRODUCTID="0x0104" # Multifunction composite gadget
USB_MANUF="Mobian Project"
USB_PRODUCT="Mobian"
USB_SERIAL=`cat /etc/machine-id`

setup() {
    # Don't do anything if the USB gadget already exists
    #[ -d $CONFIGFS ] && exit 0

    # Required to make a composite gadget
    modprobe libcomposite

    # Create all required directories
    echo "Creating the USB gadget..."
    mkdir -p $CONFIGFS
    mkdir -p $CONFIGFS/strings/0x409
    mkdir -p $CONFIGFS/configs/c.1
    mkdir -p $CONFIGFS/configs/c.1/strings/0x409

    # Setup IDs and strings
    echo "Setting up gadget strings..."
    echo $USB_VENDORID > $CONFIGFS/idVendor
    echo $USB_PRODUCTID > $CONFIGFS/idProduct
    echo $USB_MANUF > $CONFIGFS/strings/0x409/manufacturer
    echo $USB_PRODUCT > $CONFIGFS/strings/0x409/product
    echo $USB_SERIAL > $CONFIGFS/strings/0x409/serialnumber

    # Create ECM (ethernet) function
    echo "Adding ECM function..."
    mkdir $CONFIGFS/functions/ecm.usb0

    # TODO: create RNDIS function for Windows compatibility

    # Create MTP using FunctionFS
    # echo "Adding MTP function using FunctionFS..."
    # mkdir $CONFIGFS/functions/ffs.mtp

    # Create configuration
    echo "Creating gadget configuration..."
    echo "Ethernet" > $CONFIGFS/configs/c.1/strings/0x409/configuration
    # echo "Ethernet + MTP" > $CONFIGFS/configs/c.1/strings/0x409/configuration
    ln -s $CONFIGFS/functions/ecm.usb0 $CONFIGFS/configs/c.1
    # ln -s $CONFIGFS/functions/ffs.mtp $CONFIGFS/configs/c.1

    # Mount the MTP FunctionFS
    # echo "Mounting FunctionFS..."
    # mkdir -p /dev/ffs-mtp
    # mount -t functionfs mtp /dev/ffs-mtp
}

start() {
    echo "Enabling the USB gadget..."
    sleep 1
    UDC=`ls /sys/class/udc`
    echo "$UDC" > $CONFIGFS/UDC
}

reset() {
    echo "Removing the USB gadget..."

    # Remove USB gadget
    if [ -d $CONFIGFS ]; then
        echo "Removing gadget configuration..."
        # rm $CONFIGFS/configs/c.1/ffs.mtp
        rm $CONFIGFS/configs/c.1/ecm.usb0
        rmdir $CONFIGFS/configs/c.1/strings/0x409/
        rmdir $CONFIGFS/configs/c.1/
        # rmdir $CONFIGFS/functions/ffs.mtp
        rmdir $CONFIGFS/functions/ecm.usb0
        rmdir $CONFIGFS/strings/0x409/
        rmdir $CONFIGFS
    fi

    # Unmount FunctionFS and delete its mount point
    # if [ -d /dev/ffs-mtp ]; then
    #    echo "Unmounting FunctionFS..."
    #    umount /dev/ffs-mtp
    #    rmdir /dev/ffs-mtp
    #fi
}


case "$1" in
    reset) reset ;;
    setup) setup ;;
    start) start ;;
    *) ;;
esac

then run:


Code:
sudo ./pinephone-setup-usb-nework.sh
sudo ./pinephone-usb-gadget.sh reset
sudo ./pinephone-usb-gadget.sh setup
sudo ./pinephone-usb-gadget.sh start
  Reply
#4
(11-12-2020, 05:46 PM)ak42 Wrote: Regarding protonmail, I have successfully rebuilt the protonmaill bridge in nogui mode, and was able to get my protonmail email from geary (I built it myself from geary's github, the one pre installed segfaults...)

Are you running protonmail bridge cli each time before opening geary, or do you have it setup to auto start on boot?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)