Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 29,448
» Latest member: tgfdgfd
» Forum threads: 16,186
» Forum posts: 116,833
Full Statistics
|
Latest Threads |
Libre Office on Pinetab2?
Forum: General Discussion on PineTab
Last Post: Anonymous1989
Today, 07:48 AM
» Replies: 0
» Views: 21
|
Experimental Mobian kerne...
Forum: PinePhone Pro Software
Last Post: teekay
Today, 01:40 AM
» Replies: 0
» Views: 37
|
does the Joplin note taki...
Forum: PineNote Software
Last Post: Francus
Yesterday, 08:11 PM
» Replies: 4
» Views: 1,341
|
PulseAudio dropouts after...
Forum: Linux on Pinebook Pro
Last Post: Dendrocalamus64
Yesterday, 06:40 PM
» Replies: 1
» Views: 77
|
Any updates on Bluetooth ...
Forum: General Discussion on PineTab
Last Post: biketool
Yesterday, 06:38 AM
» Replies: 1
» Views: 77
|
Keyboard availability?
Forum: PinePhone Pro Accessories
Last Post: Peter Gamma
08-04-2025, 08:37 PM
» Replies: 9
» Views: 1,127
|
PINETAB-V doesn't boot.
Forum: Getting Started
Last Post: FEC
08-04-2025, 03:38 AM
» Replies: 0
» Views: 56
|
StarPro64 Irradium (based...
Forum: Getting Started
Last Post: mara
08-03-2025, 01:51 PM
» Replies: 4
» Views: 259
|
Trying to attach a serial...
Forum: RockPro64 Hardware and Accessories
Last Post: marietto
08-03-2025, 08:50 AM
» Replies: 0
» Views: 64
|
Full desktop Surfing and ...
Forum: General Discussion on Pinebook Pro
Last Post: KC9UDX
08-02-2025, 08:55 PM
» Replies: 1
» Views: 279
|
|
|
Turn your Pine64 into a music server with mpd |
Posted by: JulianM - 03-22-2017, 06:47 AM - Forum: Pine A64 Projects, Ideas and Tutorials
- Replies (2)
|
 |
Hi together!
This topic is structured into a few categories.
• Prepare your Pine64
• Installing and setup MPD
• Fix sound problems with alsamixer
• Installing und setup Samba
• Control your MPD via IR remote control
• My own setup
» Prepare your Pine64
What do you need?
- Pine64 board.
- Speakers via audiojack.
- Install the latest Ubuntu image by longsleep.
What you'll get?
- A music server which can be controlled via Windows, Linux and Android.
First of all:
Download the latest Ubuntu image by longsleep.
- Overview of all Ubuntu images powered by longsleep
I downloaded the following image:
- xenial-pine64-bspkernel-20161218-1
After you have downloaded and burned the image on your micro sdcard you need to apply some pre requirements.
If you just downloaded the Ubuntu image you have to resize the partitions of your microsd card.
Just enter this command:
Next step: Update the software of Pine64.
Code: pine64_fix_whatever.sh
pine64_update_kernel.sh
pine64_update_uboot.sh
apt-get update
apt-get upgrade
Ok, all pre requirements are given now.
» Installing und setup MPD
Let's install mpd!
Code: apt-get install mpc mpd
mpc (Music Player Command, client) is a command line program to manage mpd (Music Player Daemon, server).
Fix permissions of mpd directories:
Code: chmod 770 /var/lib/mpd/music/ /var/lib/mpd/playlists/
chown -R mpd:audio /var/lib/mpd/music/ /var/lib/mpd/playlists/
Apply my config for mpd:
Code: cat <<EOF >/etc/mpd.conf
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/tag_cache"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/pid"
state_file "/var/lib/mpd/state"
sticker_file "/var/lib/mpd/sticker.sql"
user "mpd"
port "6600"
log_level "verbose"
restore_paused "yes"
auto_update "yes"
auto_update_depth "3"
filesystem_charset "UTF-8"
id3v1_encoding "UTF-8"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
mixer_type "software"
}
EOF
The configuration of mpd is done.
Now activate audio output via 3.5 audiojack!
But please note:
The 3.5 audiojack will be the default device for all audio output with these configs!
Code: cat <<EOF >/etc/modules-load.d/pine64-audiojack.conf
sunxi_codec
sunxi_i2s
sunxi_sndcodec
EOF
Code: cat <<EOF >/etc/asound.conf
pcm.!default {
type plug slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
EOF
Reboot your Pine64 to apply changes of sound cards.
Just copy all your music files into the following directory:
I'll explain how to copy files from your Windows machine easily to your mpd server at the end of this post!
Take note that ownerships are correct!
If not, apply them.
Code: chown -R mpd:audio /var/lib/mpd/music/
Update the music database of mpd with mpc.
Alright, you're done!
Feel free to manage your mpd server with different mpd clients!
These are my favourites:
• Linux & Windows: Gnome Music Player Client
• Android: MPD Control, Droid MPD Client
» Fix sound problems with alsamixer
Normally there should be no problems with sound if you are using the latest Ubuntu image by longsleep.
So, you are advised to check the following settings in alsamixer.
Code: Unmute "Headphone" with toogling "m"
Set "ADCL Mux" to "DMIC".
Set "ADCR Mux" to "DMIC".
Set "AIF1 DAC timeslot 0 volume" to 85.
Set "AIF1IN0L Mux" to "AIF1_DA0L".
Set "AIFIN0R Mux" to "AIF1_DA0R".
Unmute "DACL Mixer ADCL" with toogling "m"
Unmute "DACL Mixer AIF1DA0L" with toogling "m"
Unmute "DARC Micer ADCR" with toogling "m"
Unmute "DACR Mixer AIFDA0R" with toogling "m"
Set "digital volume" to "0".
Set "headphone volume" to "75".
» Installing und setup Samba
How to copy your files from your Windows machine to your Pine64 - Use SFTP or... Let's install Samba!
Code: apt-get install samba-common samba
Create a Samba user to manage your files:
Just set a password for mpd user.
Apply my config to login via Samba with mpd user:
Code: cat <<EOF >/etc/samba/smb.conf
[global]
workgroup = WORKGROUP
server string = Samba Server %v
security = user
dns proxy = no
[mpd]
path = /var/lib/mpd
valid users = mpd
force user = mpd
force group = audio
create mask = 0660
directory mask = 0770
browsable = yes
writable = yes
EOF
Restart Samba.
Code: /etc/init.d/samba restart
Now you are able to copy your music very easily from Windows to your Pine64.
Just add a "Network ressource" on Windows with the following path:
Code: \\ip-address-of-pine64\mpd
Username: mpd
Password: You have choosen it with "smbpasswd -a mpd"
![[Image: mpdbsufd.png]](https://abload.de/img/mpdbsufd.png)
» Control your MPD via IR remote control
Control your MPD server with the official IR remote control by Pine64!
You need to install "keybinder", to re-mapping the keys of your IR remote control to execute commands.
Code: apt-get install unzip gcc make
cd ~
mkdir keybinder
cd keybinder
wget https://github.com/elopez/keybinder/archive/master.zip
unzip master.zip
cd keybinder-master/
make
make install
cd ~
rm -r ~/keybinder
Use "evtest" to determine the event input of IR receiver:
Code: apt-get install evtest
evtest
Choose the event number with "sunxi_ir_recv".
The event number depends of the plugged in usb devices!!!
Code: root@pine64:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: sunxi-keyboard
/dev/input/event1: axp81x-supplyer
/dev/input/event2: sunxi-ths
/dev/input/event3: audiocodec sunxi Audio Jack
/dev/input/event4: sunxi_ir_recv
/dev/input/event5: MCE IR Keyboard/Mouse (sunxi-rc-recv)
Now press a few buttons on your IR remote control.
You should see some entries like...
Code: Testing ... (interrupt to exit)
Event: time 1490184760.781095, type 4 (EV_MSC), code 4 (MSC_SCAN), value 40400d
Event: time 1490184760.781095, type 1 (EV_KEY), code 13 (KEY_EQUAL), value 1
Event: time 1490184760.781095, -------------- SYN_REPORT ------------
Event: time 1490184761.023186, type 1 (EV_KEY), code 13 (KEY_EQUAL), value 0
Event: time 1490184761.023186, -------------- SYN_REPORT ------------
Event: time 1490184761.793386, type 4 (EV_MSC), code 4 (MSC_SCAN), value 404010
Event: time 1490184761.793386, type 1 (EV_KEY), code 16 (KEY_Q), value 1
Event: time 1490184761.793386, -------------- SYN_REPORT ------------
Event: time 1490184762.043188, type 1 (EV_KEY), code 16 (KEY_Q), value 0
Event: time 1490184762.043188, -------------- SYN_REPORT ------------
Event: time 1490184762.734733, type 4 (EV_MSC), code 4 (MSC_SCAN), value 404011
Event: time 1490184762.734733, type 1 (EV_KEY), code 17 (KEY_W), value 1
Event: time 1490184762.734733, -------------- SYN_REPORT ------------
Event: time 1490184762.983185, type 1 (EV_KEY), code 17 (KEY_W), value 0
Event: time 1490184762.983185, -------------- SYN_REPORT ------------
Event: time 1490184763.508206, type 4 (EV_MSC), code 4 (MSC_SCAN), value 40400e
Event: time 1490184763.508206, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 1
Event: time 1490184763.508206, -------------- SYN_REPORT ------------
Event: time 1490184763.753183, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 0
Event: time 1490184763.753183, -------------- SYN_REPORT ------------
Event: time 1490184764.026059, type 4 (EV_MSC), code 4 (MSC_SCAN), value 40400b
Event: time 1490184764.026059, type 1 (EV_KEY), code 11 (KEY_0), value 1
Event: time 1490184764.026059, -------------- SYN_REPORT ------------
Event: time 1490184764.273206, type 1 (EV_KEY), code 11 (KEY_0), value 0
Event: time 1490184764.273206, -------------- SYN_REPORT ------------
Now we can work with keybinder
Code: keybinder /dev/input/eventX
X depends on the event number of your IR receiver!!!
You got the number by evtest.
Feel free to apply my config or create your own.
Code: cat <<EOF >/etc/keybinder.conf
24,mpc volume +10 # Set the volume +10
23,mpc volume -10 # Reduce the volume -10
16,mpc prev # Play previous track
17,mpc next # Play next track
13,mpc toggle # Play/Pause playback
69,mpc random # De-/Activate random playback
77,shutdown -h now # Shutdown the Pine64
EOF
![[Image: ir_remote_controlwkus1.png]](https://abload.de/img/ir_remote_controlwkus1.png)
Start keybinder automatically on boot.
Code: (crontab -l ; echo "@reboot /usr/bin/screen -dmS keybinder /usr/local/bin/keybinder /dev/input/eventX")| crontab -
X depends on the event number of your IR receiver!!!
» My own setup
![[Image: img_20170311_212802wauce.jpg]](https://abload.de/img/img_20170311_212802wauce.jpg)
![[Image: img_20170312_1337249cu2d.jpg]](https://abload.de/img/img_20170312_1337249cu2d.jpg)
Have fun with it 
Best regards
Julian
|
|
|
Forum Restructuring |
Posted by: pineadmin - 03-20-2017, 09:33 AM - Forum: News
- No Replies
|
 |
We will restructure this forum within this 1 to 2 weeks time after we had finalized the new forums structure with the moderators. Example of changes discussed are:
- Software and Hardware/Accessories main forums will be merged under a new main forum named "PINE A64(+)".
- All OS related forums will be moved into a new forum called "Software and OS".
- A new main SOPINE forum will be created.
- Some unpopular sub-forums' threads will be moved into their parent forum.
Existing Threads under the old forums will be moved to their new forums accordingly.
|
|
|
use uvc as primary camera |
Posted by: mathiraj - 03-19-2017, 08:27 PM - Forum: Android on Pine A64(+)
- Replies (11)
|
 |
I'm using Android 6.1 image with pine64 board. I have UVC webcam and don't have the pine64 camera.
I installed open camera app from play store and the app could use the webcam as the secondary camera.
But other apps like hangout, skype, etc., don't detect this camera. It appears that they look for the primary camera and then report that the camera is missing.
Is there a way to setup the UVC webcam as the primary camera so that the android apps use it?
|
|
|
Create a WiFi hotspot on Debian 8 |
Posted by: JulianM - 03-19-2017, 04:36 PM - Forum: Wifi/BT Module
- Replies (6)
|
 |
Hello together!
I tried something to create a WiFi hotspot with officially WiFi/bluetooth module by pine64 via ethernet and this is my solution.
Feel free to discuss about this topic 
Note: The WiFi hotspot is using the internet connection via ethernet. I wasn't able to bridge the internet connection from wlan0 to wlan1!
Note 2: I haven't installed NetworkManager on my system. NetworkManager can be responsible for problems with these instructions.
Install hostapd (create a hotspot), dnsmasq (dhcp server) and iptables-persistent (firewall settings)
Code: apt-get install hostapd dnsmasq iptables-persistent
Change the config of hostapd
/etc/hostapd/hostapd.conf
Code: interface=wlan0
driver=nl80211
ssid=MyPrivateHotspot
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=MyVeryStrongPassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Change the config of dnsmasq
/etc/dnsmasq.conf
Code: no-resolv
interface=wlan0
dhcp-range=10.0.0.3,10.0.0.20,12h
server=8.8.8.8
server=8.8.4.4
Restart dnsmasq to apply the new config
Code: /etc/init.d/dnsmasq restart
Activate forwarding of IPv4
/etc/sysctl.conf
Code: Just uncomment the following line:
net.ipv4.ip_forward=1
Apply it without reboot with the following command:
Code: sysctl -w net.ipv4.ip_forward=1
Setup the network configuration
/etc/network/interfaces
Code: auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
pre-up iptables-restore < /etc/network/iptables.rules
iface wlan1 inet manual
auto wlan0
iface wlan0 inet static
address 10.0.0.1
broadcast 10.0.0.255
netmask 255.255.255.0
And restart the network:
Code: /etc/init.d/networking restart
Apply iptables rules
Code: iptables -A FORWARD -o eth0 -i wlan0 -s 10.0.0.1/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Save the iptables rules
Code: iptables-save > /etc/network/iptables.rules
Create the WiFi hotspot
Code: hostapd /etc/hostapd/hostapd.conf
You're done!
Best regards
Julian
|
|
|
USB HUB 214b:7000 Not recognized |
Posted by: victagayun - 03-18-2017, 07:30 PM - Forum: Accessories
- No Replies
|
 |
Hello
Any device I plug in this USB is not recognized, Any help?
Code: victor@pine64:~$ lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 005: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 002 Device 004: ID 17ef:6032 Lenovo
Bus 002 Device 006: ID 214b:7000
Bus 002 Device 003: ID 214b:7000
Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
|
|
LCD Screen for running Octoprint |
Posted by: sb_88 - 03-13-2017, 03:24 PM - Forum: POT modules
- Replies (2)
|
 |
Hey!
I'm planning to install Octoprint on my pine but not sure about the LCD screen. Based on my quick search, it's possible to install Octoprint on the pine but the LCD touch screen only works with Android. Can anyone point me in the right direction here?
Thanks!
|
|
|
Help connecting to web interface - Newbie |
Posted by: YellowCake - 03-12-2017, 04:27 PM - Forum: openHAB
- Replies (3)
|
 |
Hello,
I have spent two days searching online before writing this, so please forgive me if the info is indeed out there somewhere.
I am fairly new to much of this as well as Linux but am determined and have struggled my way to having installed openhab on pine64 1Gig model with 16g SD card, bt/wifi module, and z-wave module. I have read and followed rabbit trails of links and forum threads and with much treasure hunting finally found the openhabian password and username and was able to log in and execute the "sudo openhabian-config". Clicked on pretty much all the options in the openhabian configuration tool, connected to wifi no problem.
In trying to find out how this 'easy', 'hassle free' connection all works. The link to the 'start here' and 'beginner tutorials' all seem to point to the open hab guides which show a screen of which package to choose, although I would love to get to this off my pine64, I cannot get past the command line to find any sort of UI or GUI, or know how to connect to myopenhab. Like when it says "will become available"...I need how to access, or know if it's become available.
I managed to find my IP address, as the tutorials said "will be a few more minutes until localhost becomes available" I am stuck!
I am obviously missing something, please, please don't point me to the wiki getting started guide, as I have gone through pretty much every link I could find on the topic, and I still can't find out how to make it past:
openhabian@openHABianPine64:~$
I would LOVE to see something I can click on...like this paper UI or something...
A couple hints would be greatly appreciated.
|
|
|
|