Search the Community

Showing results for tags 'tutorial'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Announcements & first aid
    • Announcements
    • Board doesn't start
  • Community forums
    • Common issues
    • Peer to peer technical support
    • TV boxes
    • General chit chat
  • Bug tracker
    • Allwinner A20
    • Allwinner H2 & H3
    • Allwinner H5 & A64
    • Armada A388, A3700
    • Amlogic S905(x)
    • NXP (Freescale)
    • Rockchip 3288 & 3328
    • Other supported boards
  • Development
    • Allwinner H6
    • Rockchip 3399
    • Development

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 32 results

  1. I made a hardware setup guide for the Pine64 Clusterboard. It's over on their forums: Long and short is that it's a $99 motherboard that can accommodate 7x $30 compute modules.
  2. Is OPI ONE a toy or a toy ? Yes and yes and a fun one too ! The following experiment shows the OPI ONE in use as a Virtual Desktop Server AND Virtual Desktop Client. Setup as Virtual Desktop Server ( remotely access headless OPI ONE desktop ) OPI ONE : install xrdp and tightvncserver <clients> : install and configure remote desktop ( rdesktop on linux, aRDP on android - not yet tested on OS-X or WIN ) Setup as Virtual Desktop Client ( OPI ONE securely accesses a remote linux desktop ) OPI ONE : install x2goclient <server> : install x2goserver on linux server ( physical or virtual ) of choice This document explains the experiment ( you have to click/enlarge pictures in your browser .. sorry ) And here is a screenshot of the actual session : Red : Linux server desktop connecting to OPI ONE via rdesktop / xrdp Orange : OPI ONE desktop connecting to UK virtual server via x2goclient/x2goserver Purple : virtual server (UK) desktop running libreoffice White : actual document being edited ( incl. drawings ! ) in window ( Headline : Italian guy in Switzerland abuses OPI ONE to edit nerd stuff in the UK ) Remote desktop access from smartphone ( cheap Wiko Lenny 2 ) for touch-fumbling nano-fingers Remote desktop access from tablet ( Galaxy Note 8.0 ) using pen There are numerous use cases covered with the simple techniques employed.Thanks to the Armbian team and the forum buddies for their excellent job in making OPI ONE usable. Have fun !
  3. It's *amazing* what you can find reading the Armbian documentation! I dig the shell, even old-school in a virtual terminal or minimal server type setup. Normally that means going through some squinty-eyed hoops to get the Terminus console font installed with larger sizes in the first place on large monitors. Wait - what's this? sudo dpkg-reconfigure console-setup I did this in a virtual terminal, and allowed setup to pick the right character set for me. Then I blasted the framebuffer with the largest Terminus font size allowed. Perfection! Not a big deal to most, but having this be part of the standard distribution image made my day. Soooo easy. thanks!
  4. You may have seen discussions around the forum regarding work being done by @adafruit using circuit python with Armbian, but I wanted to make sure this nice write-up had proper visibility.
  5. For enabling - to use stockfish/armfish-chess-engine - as a TCP service we need to configure (add the lines at the end of the file) /etc/inetd.conf #:OTHER: Other services stockfish08 stream tcp nowait guido /usr/games/stockfish stockfish10 stream tcp nowait guido /usr/games/stockfish_10_64 armfish stream tcp nowait guido /usr/games/armfish_aarch64 and add the TCP-Port - we want to use - to the /etc/services (for optical reasons after pop3s port 995/tcp) pop3s 995/tcp # POP-3 over SSL # # stockfish08 1024/tcp # stockfish 8 chess engine stockfish10 1025/tcp # stockfish 10 chess engine armfish 1026/tcp # armfish chess engine at the end we have to restart inetd (or reboot) systemctl restart inetd Additional (important?) informations: - guido is a local user on my system - you need to change the name for the /etc/inetd.conf to a local user of your system - /usr/games/stockfish is the stockfish-binary installes by apt install stockfish - the stockfish-binary we compiled for stockfish v10 64Bit in another thread from ./Stockfish-master/src/stockfish (directory of the cloned github-repository) to /usr/games/stockfish_10_64 - /usr/games/armfish_aarch64 is the (on a 64Bit PC-Linux compiled with fasmg) assembler-version of stockfish which could run twice as fast see precompiled aarch64-binary as attachment (think about the chmod 755 armfish_aarch64 after the transfer ) Binary-Overview in /usr/games/ root@t95k-pro( ls -l insgesamt 644 -rwxr-xr-x 1 root root 128050 Mär 14 22:08 armfish_aarch64 -rwxr-xr-x 1 root root 216216 Nov 12 2016 stockfish -rwxr-xr-x 1 root root 308896 Mär 14 13:57 stockfish_10_64 armfish_aarch64
  6. Normally you could install (if you use a 64Bit arm-system/OS) the 64Bit version of stockfish with apt install stockfish stockfish is a uci-chess-engine where some Chessboard-Display-Apps can conenct to (later I would show how to use this with TCP) Then you will get (at this time) the Version 8 64Bit = 8 64 = 11/2016 But the actual stockfish-engine is at Version 10 = 12/2018 ( see ) So I did clone the git-master at as .zip After unzipping and cd to ./Stockfish-master/src you could do -make clean -make help BUT there is for arm only a ARCH=armv7 (32Bit) option When using the ARCH=general-64 option make build ARCH=general64 COMP=gcc COMPCXX=g++ then the start of the compile did fail because g++ says that he didnt knows the -m64 commandline-option I searched the Web and found there no solution So I did take a look into the Makefile and first I didnt found anything about -m64, but then I discoverd in the gcc-options the follwing part which I then deleted: else CXXFLAGS += -m$(bits) LDFLAGS += -m$(bits) endif after that I did create a aarch64-ARCH-section under the armv7-ARCH-section: ifeq ($(ARCH),aarch64) arch = any prefetch = yes bits = 64 endif arch = any is copied from the "general-64" section, prefetch is copied from the "armv7"-section and maybe the "bits = 64" is obsolete? Now we can compile - there are two options: dpkg -l|grep 'g++' ii g++ 4:6.3.0-4 arm64 GNU C++ compiler ii g++-6 6.3.0-18+deb9u1 arm64 GNU C++ compiler make build ARCH=aarch64 COMP=gcc COMPCXX=g++ make build ARCH=aarch64 COMP=gcc COMPCXX=g++-6 When the compile has completed you will have the executeable stockfish in your ./Stockfish-master/src directory. see stockfish_10_64 as attached binary at the end of this thread-message When started you will see: Stockfish 140319 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott Enter uci and you will see the stockfish-info: id name Stockfish 140319 64 id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott option name Debug Log File type string default option name Contempt type spin default 24 min -100 max 100 option name Analysis Contempt type combo default Both var Off var White var Black var Both option name Threads type spin default 1 min 1 max 512 option name Hash type spin default 16 min 1 max 131072 option name Clear Hash type button option name Ponder type check default false option name MultiPV type spin default 1 min 1 max 500 option name Skill Level type spin default 20 min 0 max 20 option name Move Overhead type spin default 30 min 0 max 5000 option name Minimum Thinking Time type spin default 20 min 0 max 5000 option name Slow Mover type spin default 84 min 10 max 1000 option name nodestime type spin default 0 min 0 max 10000 option name UCI_Chess960 type check default false option name UCI_AnalyseMode type check default false option name SyzygyPath type string default <empty> option name SyzygyProbeDepth type spin default 1 min 1 max 100 option name Syzygy50MoveRule type check default true option name SyzygyProbeLimit type spin default 7 min 0 max 7 uciok You could leave the stockfish chess-engine with quit I will add (these days) a tutorial for setting up stockfish as TCP-Service (via inetd) and then we could connect via Windows/Android/Linux ChessBoard-Display-Apps to play with the stockfish engine on your 64Bit ARM-System Preview-Information-Links for setting up , connecting and playing with the engine: stockfish_10_64
  7. Orange Pi Zero NTP Stratum 1 PPS GPS Server with Armbian OS. Link to the Tutorial - This tutorial uses a 3.3V capable GPS module with PPS output - TOPGNSS GN-701 (u-blox 7) but other similar modules should work. This tutorial is for the Orange Pi Zero, but will probably work for other boards. I couldn't easily do a comprehensive hardware and software tutorial on this forum, so I've published it on my web server and linked from here and attached a PDF. Link to the Tutorial - Tutorial PDF ntp-stratum1.pdf If you spot any typo's or errors please let me know.
  8. For those of you who're interested in running a CMS on Armbian I've a small tutorial how to get django CMS working. If you're not interested in the 'story' just want a step by step installation guide, scroll to the end of this post, there you find it. Story: Following their installation guide it fails during creation of a django project with 'djangocms -f -p . mysite'. The error looks something like: After a brief google search I found that other also had similar problems. It seemed that pillow is the problem while the whole installation failed. Unfortunately pip pillow also failed, and this one helped me to install pillow. After installation of libpq-dev python-dev libjpeg8-dev, pillow could be installed without any issues and 'djangocms -f -p . mysite' too. Starting the CMS with 'python runserver' worked too but unfortunately wasn't accessible over local network (since all of my armbian devices are running headless, I need access over network to the CMS). Inspired by a next google result, I found out that I should run the CMS on the SBCs network IP not on localhost by using 'python runserver'. Which led in a next error. ... DisallowedHost: Invalid HTTP_HOST header: '192.168.x.xx:8000'. You may need to add u'192.168.x.xx' to ALLOWED_HOSTS. Some housekeeping in the and restart of the CMS led than to a working system. # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['192.168.x:xx'] Lessons learned: Even if you're not a dev and your background is limited, it is possible to get something like this CMS to work if you're able to use google. By reading through google results and have a look on the output errors during installation you learn much more about your project/SBC than just following the step by step procedure I'll show at the end of this post. The 'tarzan approach' - Tarzan/me swings from tree/error to tree/error holding on to elastic lianas/error logs works but it makes sense to repeat this installation after get a straight forward approach for the next time you'll use it. Step by step procedure: Installing package dependencies sudo apt-get install libpq-dev python-dev virtualenv libjpeg8-dev Make your virtualenv folder for all your CMS projects (since django cms is capable to run multiple cms at once it might make sense to have a 'parent folder' where all of them are placed): mkdir CMS --> cd CMS Create and activate a virtual env: virtualenv env --> source env/bin/activate Update pip: pip install --upgrade pip Use the django CMS installer: pip install djangocms-installer Create a new directory to work in: mkdir tutorial-project --> cd tutorial-project Run it to create a new Django project: djangocms -f -p . mysite Setup for access via LAN: nano mysite/ --> ALLOWED_HOSTS = ['192.168.x:xx'] (IP of yor SBC) Start up the runserver: python runserver 192.168.x.xx:8000 Your CMS will be accessible via browser on your SBCs IP port 8000. Tested on: OPi 0: ARMBIAN 5.31 stable Ubuntu 16.04.2 LTS 3.4.113-sun8i Odroid HC1: ARMBIAN 5.33 user-built Debian GNU/Linux 8 (jessie) 4.9.46-odroidxu4
  9. I like it to anounce some messages/informations via TTS ( T(text)T(o)(S)peech) . Normally I use espeak with a litte better sounding mbrola-voice (No. 6 german). But on Android you could buy - for cheap againt the PC-version - some better voices. Like my favourite german Voice "Julia" from Acapela. So I always wanted to use this voice for the informations. I did found a "server"-app for android which takes a UDP/HTTP-request to play a given string via the default TTS on the android-device (or a .MP3 stored in the memory of the android-device). Its named Home24-MediaPlayer - and can be found at (isnt anymore in the Google PlayStore for me - only the Home24-App for Smartphone or Tablet): You could give the android-device the request via HTTP or UDP from your armbian-commandline or shell-script: # HTTP samples curl'This is a Test' 1>/dev/null 2>/dev/null wget'This is a Test' 1>/dev/null 2>/dev/null wget 1>/dev/null 2>/dev/null # UDP samples echo 'tts=This is a Test'|nc -w 0 -u 50002 echo 'track=MySong.mp3'|nc -w 0 -u 50002 The Message could combine many commands in one line (also in HTTP/UDP): track=Alarm.mp3|tts=Alarm|sms=0150123456&message=Alarm see also the Wiki for the Home24-MediaPlayer: On my Smartphone it also does work, but when the screen and the device goes to sleep it wouldnt work anymore. So I did think about a device without a battery and did try a Orange Pi PC (H3) with H3Droid, but this was too slow for me - because the OPi PC always did work on the SD-Card (dont know if my card was too slow). I was hoping getting a better performance with the OPi PC because of the 1GB of Ram. [EDIT] ========================================================================= It was the card After the Minix NEO X5 - which did work without problems. I did gave the OPi PC a second chance with a brandnew 32GB Sandisk EVO. With this new card the access is now MUCH snappier I installed Acaplea's Julia and the Home24-MediaPlayer and its sounds - for me - a little bit better than the Minix NEO 5. PS: old card seems to be a Fake-SONY Class 10 card (or very old and used) ========================================================================= Now I will try a "old" Android-TVBox: Mini NEO X5 ( Dual Core RK3066 Cortex A9 1.6GHz , 1GB Ram / 16GB Flash). Does any one know another Android-App with a function like this?
  10. Stuart Naylor

    tutorial MagicMirror

    I stopped tinkering for a while but perked my interest and been grinning at such a simple project and generally think its really great. I think they have made some odd options as the server and electron browser have been lumped together which is a really strange choice for absolutely no advantage. The server does need restarts and would seem far more often than you would expect and the use of electron means armv7l only which is a shame for the 0/1 owners. You can install using chromium and you certainly don't need the load of a desktop?! Dunno been wondering. I wanted to use a zero as love that tiny footprint and price and there are loads tutorials out there that seem to have much more than necessary and electron is chromium in a java wrapper with reduced architecture offerings so why no support? But hey. Not that bothered about that but why the have made the server and browser monolithic as a server restart now causes a cool device to display a desktop and even why desktop on a mirror has me scratching my head. if anything it will present a different take on the install as for some reason they depart from vanilla and I actually think it works better. Shame there isn't a Banana pi zero image or is there as loving that form factor. I do know it gets hot as hell but just tinkering by a tiny mind with tiny boards. PS if there is something near working give us a shout with Armbian and BPIZ
  11. Not much of a tutorial, but it is something that often needs some googling and head scratching. This is how I got my particular modem working, your mileage may vary. Step 1) Get a modem that will work. I got a Huawei E397u LTE/UMTS/GSM modem. It's Cricket branded, but I'm on Google Fi, it will work with my data SIM. Step 2) Plug it in and see that it doesn't work. Step 3a) apt update Step 3b) apt upgrade Step 4) Install usb-modeswitcher Step 4, optional part 2) install modem-manager, modem-manager-gui (for general playing around) Step 5) unplug/replug the USB modem, see that it should magically have a different VID:PID when you type lsusb. You should also have some ttyUSB's, and you can check out modem details in the modem-manager-gui Step 6) set up network connection via the network dropdown at the top right of the desktop. You will need APN information for your carrier. I put in modem-manager so I could debug. It will cause issues if you do certain things with it while connected. My modem was $15, Ebay has them. So does amazon.
  12. Full root filesystem encryption on an Armbian/Orange Pi PC 2 system MMGen ( This tutorial provides detailed, step-by-step instructions for setting up full root filesystem encryption on an Armbian/Orange Pi PC2 system. With minor changes, it can be adapted to other Armbian-supported boards. The disk is unlocked remotely via ssh, permitting unattended bootup. Requirements: Linux host system One Orange Pi PC 2 Two blank Micro-SD cards (or a working Armbian system for your board + one blank SD card) USB Micro-SD card reader Ability to edit text files and do simple administrative tasks on the Linux command line Part 1 - Get, unpack and copy the latest Armbian image for the Orange Pi PC 2 $ mkdir ~/opi-build; cd ~/opi-build # For a server image: $ curl -L -O # For a desktop image: $ curl -L -O # Consult the download directory for changes, as well as torrent files: $ Unpack (if the 7zr command is missing on your system, first install the 'p7zip' package): $ 7zr x Ubuntu_*.7z Check the PGP signature and integrity of the image (optional): $ gpg --keyserver --recv-key 9F0E78D5 $ gpg --verify *.img.asc Or, alternatively, just check its integrity with a checksum: $ sha256sum -c sha256sum.sha Now you're ready to copy Armbian to the SD card or cards. If you have two blank cards, the first will hold an ordinary unencrypted Armbian system used for the setup process, while the second will hold the target encrypted system. Alternatively, if you already have a working Armbian system for your board, you can use it for the setup process. In that case, your one blank SD card will be considered the “second” card, and you can ignore all instructions hereafter pertaining to the first card. Note that for the remainder of this section, the first SD card will be referred to as '/dev/sdX' and the second as '/dev/sdY'. You'll replace these with the SD cards' true device filenames. The device names can be discovered using the command 'dmesg' or 'lsblk'. If you remove the first card before inserting the second, it's possible (but not guaranteed) that the cards will have the same device name. Insert the first blank SD card and copy the image to it: $ sudo dd if=$(echo *.img) of=/dev/sdX bs=4M After the command exits, you may remove the first card. Now insert the second SD card, which will hold a small unencrypted boot partition plus your encrypted Armbian system. Copy the image's boot loader to it: $ sudo dd if=$(echo *.img) of=/dev/sdY bs=512 count=4096 Now partition the card: $ sudo fdisk /dev/sdY Within fdisk, create a new DOS disklabel with the 'o' command. Use the 'n' command to create a primary partition of size +100M beginning at sector 4096. Type 'p' to view the partition table. Note the end sector. Now create a second primary partition beginning one sector after the first partition's end sector and filling the remainder of the card. When you're finished, your partition table will look something like this: Device Boot Start End Sectors Size Id Type /dev/sdY1 4096 208895 204800 100M 83 Linux /dev/sdY2 208896 31422463 31213568 14.9G 83 Linux Double-check that the second partition begins one sector after the end of the first one. If you mess something up, use 'd' to delete partitions or 'q' to exit fdisk and try again. Once everything looks correct, type 'w' to write the partition table. Now you'll begin the process of copying the system to the second card. First you'll associate the image file with a loop device and mount the device: $ losetup -f # displays the name of the loop device; remember this $ sudo losetup -Pf *.img # associate image file with the above loop device $ mkdir mnt boot root $ sudo mount /dev/loopXp1 mnt # replace '/dev/loopX' with the above loop device Create a filesystem on the SD card's boot partition and copy the boot partition data from the image file to it: $ sudo mkfs.ext4 /dev/sdY1 $ sudo e2label /dev/sdY1 OPI_PC2_BOOT # don't omit this step! $ sudo mount /dev/sdY1 boot $ sudo cp -av mnt/boot/* boot $ (cd boot; sudo ln -s . boot) Create the encrypted root partition (for this the 'cryptsetup' package must be installed on the host). You'll be prompted for a passphrase. It's recommended to choose an easy one like 'abc' for now. The passphrase can easily be changed later (consult the 'cryptsetup' man page for details): $ sudo cryptsetup luksFormat /dev/sdY2 Activate the encrypted root partition, create a filesystem on it and mount it: $ sudo cryptsetup luksOpen /dev/sdY2 foo # enter your passphrase from above $ sudo mkfs.ext4 /dev/mapper/foo $ sudo mount /dev/mapper/foo root Copy the system to the encrypted root partition: $ (cd mnt && sudo rsync -av --exclude=boot * ../root) $ sync # be patient, this could take a while $ sudo mkdir root/boot $ sudo touch root/root/.no_rootfs_resize Unmount the mounted image and second SD card, and free the loop device and encrypted mapping: $ sudo umount mnt boot root $ sudo losetup -d /dev/loopX $ sudo cryptsetup luksClose foo From here on, all your work will be done on the Orange Pi. Part 2 - boot into the unencrypted Armbian system If applicable, insert the first (unencrypted) SD card into the Pi's Micro-SD card slot. Insert a USB card reader holding the second SD card into a USB port on the Pi. Boot the Pi. If applicable, log in as root with password '1234', follow the password update instructions, and stay logged in as root. The following steps will be performed from a root shell. Part 3 - set up the unencrypted Armbian system Update the APT package index and install cryptsetup: # apt-get update # apt-get install cryptsetup Part 4 - set up the encrypted Armbian system Prepare the encrypted system chroot: # BOOT_PART=($(lsblk -l -o NAME,LABEL | grep OPI_PC2_BOOT)) # ROOT_PART=${BOOT_PART%1}2 # cryptsetup luksOpen /dev/$ROOT_PART foo # mkdir /mnt/enc_root # mount /dev/mapper/foo /mnt/enc_root # mount /dev/$BOOT_PART /mnt/enc_root/boot # cd /mnt/enc_root # mount -o rbind /dev dev # mount -t proc proc proc # mount -t sysfs sys sys Copy some key files so you'll have a working Internet connection within the chroot: # cat /etc/resolv.conf > etc/resolv.conf # cat /etc/hosts > etc/hosts Now chroot into the encrypted system. From this point on, all work will be done inside the chroot: # chroot . # apt-get update # echo 'export CRYPTSETUP=y' > /etc/initramfs-tools/conf.d/cryptsetup # apt-get install cryptsetup dropbear-initramfs Check to see that the cryptsetup scripts are present in the initramfs (command should produce output): # gunzip -c /boot/initrd.img* | cpio --quiet -t | grep cryptsetup Edit '/etc/fstab' to look exactly like this: /dev/mapper/rootfs / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 /dev/mmcblk0p1 /boot ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 2 tmpfs /tmp tmpfs defaults,nosuid 0 0 Add the following lines to '/etc/initramfs-tools/initramfs.conf'. If the Orange Pi's IP address will be statically configured, substitute the correct static IP address after 'IP='. If it will be configured via DHCP, omit the IP line entirely: DEVICE=eth0 IP= Add the following parameters to the quoted bootargs line in '/boot/boot.cmd'. Note that the 'root' parameter replaces the existing one: root=/dev/mapper/rootfs cryptopts=source=/dev/mmcblk0p2,target=rootfs If you want to be able to unlock the disk from the virtual console (which you probably do) as well as via ssh, then comment out the following line: # if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttyS0,115200"; fi In case you're wondering, 'setenv console "display"' doesn't work. Don't ask me why. Compile the boot menu: # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr Copy the SSH public key from the machine you'll be unlocking the disk from to the Armbian machine: # rsync yourusername@remote_machine:.ssh/id_*.pub /etc/dropbear-initramfs/authorized_keys If you'll be unlocking the disk from more than one host, then edit the authorized_keys file by hand and add the additional SSH public keys. Edit '/etc/dropbear-initramfs/config', adding the following lines: DROPBEAR_OPTIONS="-p 2222" DROPBEAR=y Reconfigure dropbear: # dpkg-reconfigure dropbear-initramfs Make sure everything was included in the initramfs (both commands should produce output): # gunzip -c /boot/initrd.img* | cpio --quiet -t | grep dropbear # gunzip -c /boot/initrd.img* | cpio --quiet -t | grep authorized_keys Your work is finished! Exit the chroot and shut down the Orange Pi: # exit # halt -p Swap the SD cards and restart the Pi. Unlock the disk by executing the following command on your remote machine. Substitute the Pi's correct static or DHCP-configured IP address for the one below. If necessary, also substitute the correct disk password in place of 'abc': $ ssh -p 2222 -x root@ 'echo -n abc > /lib/cryptsetup/passfifo' If you choose to unlock the disk from the tty, just enter your disk password and hit ENTER. If all went well, your root-filesystem encrypted Armbian system is now up and running!
  13. tkaiser has built a new Kernel with i2s Modules. With this Kernel and some cheap DAC e.g. ( it is possible to get good quality sound out of the Orange Pis. After installing the Kernel Two Things have to be changed in the fex File: Change Directory to boot: cd /boot Turn the script.bin to a fex-File and open it in an Editor sudo bin2fex script.bin script.fex sudo nano script.fex Now change the following Entries: [twi1] twi_used = 1 to [twi1] twi_used = 0 and [pcm0] daudio_used = 0 to [pcm0] daudio_used = 1 Save your changes and do : sudo fex2bin script.fex script.bin After a reboot your done. I do not know for what the Section [twi1] is good for, i hope nothing serious.. This connections have to be made: 5V > Pin 2 Gnd > Pin6 BCK > Pin 27 LRCK > Pin 28 Data > Pin37 (according to the Picture "giachi" has posted on the diyaudio Forum see below) The second Picture is only for orientation on an Orangepi PC, the red Wire is 5V ! Be aware that the Header is rotated by 180°on the One! That´s all . Regards
  14. Orange Pi One PCB is designed to easy add almost all removed features from Orange Pi PC. Currently only RAM expansion is unprofitable. To add 2 removed USB ports just solder wires to solder points as shown below on the photo: Data lines for USB #3: points 1,2 Data lines for USB #2: points 3,4 Power can be taken directly from GPIO header or DC socket. OPiOne has no separate voltage regulators for USB ports like previous boards used to have. This way I want to solder mini WiFi dongle (after removing the case and USB port) directly to the PCB.
  15. UPDATE 11-FEB-2017: Version 2.2.0 is released: now including video recording in stead of only images and also a privacy option to black out areas that may not be filmed. UPDATE 09-FEB-2017: Version 2.2.1 is released: memory leak(s) fixed and in some cases video stopped recording. This should be fixed now. Download via this page. (link) is a relative new video surveillance program focusing mainly on the Raspberry Pi. In collaboration with the owner of the github project I managed to get it working on my Orange Pi Plus and PCDuino3 nano using Armbian (Debian Jessie) and a Logitech UVC compatible USB webcam. It consists of 2 modules: the Machinery module and Web module. The machinery module was very Raspberry Pi specific, but is now updated and can also run with very little extra effort on Armbian. The Web module runs without any modification. Follow the instructions below and you should be able to install or compile it. is very fast and has a modern interface. Furthermore it is (IMHO) a very nice alternative for zoneminder and motion.It also provides a videostream on a webpage. Follow the instructions below and share your comments, ideas etc. Method 1 (easy) - Install on Armbian Debian Jessie. Follow the instructions on the dedicated Armbian page (link). Here you will find an Armbian precompiled .deb armhf package. Further installation / configuration options can be found on the webpages. Method 2 (advanced) - Compiling the machinery and web module on Armbian Debian Jessie. Install the following packages: sudo apt-get install pkg-config libavcodec-dev libavformat-dev libswscale-dev Follow the instructions on this page (link). Further installation / configuration options can be found on the webpages. In all cases: please note that you must alter the camera configuration: default it comes with the Raspberry Pi camera that you probably won't have!
  16. Hi there, this very short tutorial is a solution when you need to backup/clone/save as small *.img file as possible of your whole fully bootable system (e.g. you have 8GB card but you want to make smaller system image for 2GB card). And another reason why I created this tutorial - I need to burn the same image to many microsd cards. I am using Windows (yup, hate me know) and Debian in these steps: Put your microsd card to Windows machine and make image of card with Win32diskimager. If your card is e.g. 8GB, you get *.img file with the same size (my name backup.img). Now in linux maxine (in my case Debian virtual machine) we are going to work with backup.img file. Run these commands in terminal (if you are not root use sudo at the start of each line) modprobe loop losetup -f losetup /dev/loop0 backup.img partprobe /dev/loop0 Run gparted with this command and move slider of main partition to the left to make partition smaller (leave some space, e.g. I left 400MB free space) gparted /dev/loop0 Click on Apply once you are happy with it. We can unload loopback device now losetup -d /dev/loop0 With fdisk find out end of last block fdisk -l backup.img In my case last block is 3571711 so I run command truncate --size=$[(3571711+1)*512] backup.img Done! Size of your backup.img file should be now about 1.5GB. You can burn this new backup.img file to another (or the same) card/s now. In my case I dramatically reduced time needed for burning data to many many cards (it saves hours/days when you need to burn a lot of microsd cards). Enjoy! P.S. this can be done also with just Debian, so no need for Windows, in this case you just need to make first step with backup.img with linux command (e.g. dd). And of course you can set up a script on your newly burned card to expand system partition to the whole microsd size during first boot, if needed.
  17. Tom_Neverwinter

    tutorial Motioneye (OPI)

    There have been several disjointed tutorials on making a raspberrypi or orangepi into a surveillance camera. So I threw this together to maybe help someone out there with any issues. I used the orangepipc+ but any orangepi board should work as long as it has the basics, internet connectivity, storage, and a camera. (I highly suggest heatsinks as well) any feedback or enhancements to this tutorial are greatly appreciated. ------------------------------------------------------------------ ORANGEPI IPCAMERA ------------------------------------------------------------------ su root apt-get update apt-get upgrade apt-get install wget dpkg -i ffmpeg_3.1.1-1_armhf.deb apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54 apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5 wget dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb pip install motioneye mkdir -p /etc/motioneye cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf mkdir -p /var/lib/motioneye cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service systemctl daemon-reload systemctl enable motioneye systemctl start motioneye sudo modprobe gc2035 sudo modprobe vfe_v4l2 systemctl restart motioneye Accessing The Frontend After having successfully followed the installation instructions, the motionEye server should be running on your system and listening on port 8765. Fire up your favorite web browser and visit the following URL (replacing [your_ip] with... well, your system's IP address): http://[your_ip]:8765/ Use admin with empty password when prompted for credentials. For further details on how to configure motionEye, see Configuration. ------------------------------------------------------------------ FOR UPDATES; ------------------------------------------------------------------ pip install motioneye --upgrade systemctl restart motioneye sudo nano /etc/motioneye/motioneye.conf ctrl+x then y (nano) Modifiy the motion.config file to turnoff localhost; stream_localhost off change the port to 80 from 8765 if desired by; systemctl enable motion systemctl start motion Tutorial sources; (some resources for motion) OLD) WIP tutorial, I want to add a version with facial recognition using openface and a version using ALPR (automatic license plate recognition, as the orangepi systems can have 2GB of ram) Update 1 09/30/16; seems there is a issue with motioneye and being unable to find the csi camera. I'm trying to find a work around, any help is appreciated. Update 2 11/05/2016 Updated motioneye installation added information on motion and basic setup (incomplete) the editor seems to be breaking my wget addresses I forgot to add the login information and frontend... *DOH*
  18. We included in Armbian a small utility called h3disp. If called without arguments it displays just a usage information: tk@orangepipc:~$ sudo h3disp [sudo] password for tk: Usage: h3disp [-h/-H] -m [video mode] [-d] [-c [0-2]] ############################################################################ This is a tool to set the display resolution of your Orange Pi by patching script.bin. In case you use an HDMI-to-DVI converter please use the -d switch. The resolution can be set using the -m switch. The following resolutions are currently supported: 480i use "-m 480i" or "-m 0" 576i use "-m 576i" or "-m 1" 480p use "-m 480p" or "-m 2" 576p use "-m 576p" or "-m 3" 720p50 use "-m 720p50" or "-m 4" 720p60 use "-m 720p60" or "-m 5" 1080i50 use "-m 1080i50" or "-m 6" 1080i60 use "-m 1080i60" or "-m 7" 1080p24 use "-m 1080p24" or "-m 8" 1080p50 use "-m 1080p50" or "-m 9" 1080p60 use "-m 1080p60" or "-m 10" Two examples: 'h3disp -m 1080p60 -d' (1920x1080@60Hz DVI) 'h3disp -m 720i' (1280x720@30Hz HDMI) You can also specify the colour-range for your HDMI-display with the -c switch. The following values for -c are currently supported: 0 -- RGB range 16-255 (Default, use "-c 0") 1 -- RGB range 0-255 (Full range, use "-c 1") 2 -- RGB range 16-235 (Limited video, "-c 2") ############################################################################ This tool tries to patch script.bin (adjusts the display settings there) and requires a reboot afterwards. While it is not useable with vanilla kernel (script.bin doesn't play any role there and a display driver is also still not ready) it might be also useful for H3 users that rely on other OS images (Debian/Ubuntu based from Xunlong or from loboris). Our h3disp tries also to patch script.bin there with your settings so it should be useful for non Armbian users too BTW: It could also be used with Debian based Linux OS images for A83T/H8 (Cubietruck Plus, pcDuino8 Uno or Banana Pi M3) but unfortunately these vendors fail to provide OS images that use a patched u-boot version that could deal with script.bin. At least 'Team BPi' got it finally after being told since months where/how to copy&paste this stuff but since they only update their sources and provide no updates for their OS images, Banana Pi M3 customers are still lost In case you're an Android user you'll have to go the extra mile since the Android OS image for H3 Orange Pi's doesn't support script.bin. You could apply the changes h3disp offers to one of our provided fex files but have then to overwrite a few sectors on your SD card to get this stuff working (by choosing our fex files you could also 'patch' the Android image to run better on the Orange Pi One or get all USB ports and Ethernet on the other models and improve realiability and decrease SoC temperature)
  19. For those of you who are interested in using a OPI zero as a small IoT-Server. I have some hints to get it working. It's more or less a lmgtfy How To plus some arduino code to test if it works. Hardware: OrangePi 0 with Armbian 5.25 connected over lan to my router DHT11 Module on a Wemos D1 mini (a small cheap wlan MCU for ~3$ which can be programmed via the Arduino IDE) Installation: First of all we install node-red on the OPI. Instead of rewrite how to do that again I just give you the link who to do that: Node-Red on armbian Second we install Mosquitto as a mqtt broker. If I have it right in mind I followed this instructable (I'm not shure, it's more than 2 weeks ago and I didn't save the link then): Mosquitto To represent the data of our DHT sensor-node graphically we install the node red dashboard module in: /usr/lib/node_modules/ with npm i node-red-dashboard If everything goes right you should have access to node-red via browser on port 1880: 192.168.1.xx:1880 and to the UI of dashboard: 192.168.1.xx:1880/ui/ Setting up everything: Now we're setting up the Wemos D1 mini. DHT11 wiring (DHT-->Wemos): VCC -->3.3V Signal --> D4 GND -->GND Some of the Wemos pins are capable for 5V (A0 definitly not!) but the DHT readings gets noisier when the device is powered through 5V (don't ask me why, I'm not en electronic engineer...) For the testprogramm we need two libraries which can be installed via the arduino IDE lib manager (+ ESP8266WiFi.h which comes when adding the generic ESP8266 board via Boardmanager): PubSubClient.h (PubSubClient by Nick O'Leary) DHT.h (DHT sensor library by Adafruit) And here comes the simplyfied code publishing to the mqtt broker: The code is more or less a combination of the examples which comes with the PubSubClient & DHT libraries + throw away all the stuff that we don't need (I had also a version of code where the Wemos D1 mini subscribe to the mqtt broker and gets a timestamp injected from node-red which was then added to the published sensor data). Humidity data is stored in the "hum" topic, temperature in "temp". Keep in mind that if you plan use more than one senor-node, you should name the topics properly (see: MQTT topics best practices for more information about proper topic nameing) We can now generate our test-flow on the node-red webpage (See printscreen). Subscribe to the mqtt topics and publish it on the chart and gauge (more information about Dashboard can be found on: Node-Red & Dashboard). Powering the Wemos and deploy the created flow shoud show us the graphs on 192.168.1.xx:1880/ui/ (see picture) To call me an IoT expert is like someone calling tkaiser a fan of micro USB powered SBCs. According to the MIT licence this HowTo is provided "as is", without warranty etc.
  20. Hello everyone, today I would like to show you how to compile CoovaChilli and Freeradius for a Wifi Hotspot with captive portal on an Orange Pi PC (or PC Plus). I'm writing this because I couldn't find anything related to this topic on the internet, so I wrote this not very detailed guide. wget chmod +x ./ Russian version
  21. Hi All, I recently bought a cheap 16 character, 2 row LCD display from for use with my Orange Pi PC. I got it to work without too much pain, but I thought I would document it here for the benefit of others. Some good instructions are already available on the internet, but there are some tweaks required for the Orange PI. Armbian I believe already has the I2C module compiled into the kernel directly. So no Linux Kernal insmod work required, unlike what many Raspberry PI guides seem to imply. Step 1) Buy the things you will need. 1. You obviously need a 1602 LCD module which also comes with the the I2C converter. You can buy a 1602 LCD and wire it directly to the 16 GPIO pins required if you want, but that isn't the point of this guide. 2. You will need a level shifter. The LCD display works on +5volts. The OrangePI/H3 GPIO pins are 3.3 volts. I have seen guides stating that you don't need a level shifter, but I'm sure you're slowly frying some transistors in your OrangePI over time. 3. You will need a bunch of jumper cables etc. Like these, female to female only required really. Step 2) Wire things up accordingly. Thanks to this fantastic guide, the instructions on wiring the Orange PI to the Level Shifter LV ('low voltage') pins, and then the Level Shifter HV ('high voltage') pins to the 1602 I2C module is pretty clear: Level Shifter OrangePI 1602 I2C Backpack LV 3.3V (pin 1) – LV1 SDA (pin 3) – LV2 SCL (pin 5) – GND GND (pin 6) GND HV 5V (pin 2) VCC HV1 SDA HV2 SCL Note, you connect the 1602 I2C module/backpack directly to the 5Volt Pin on the PI (Pin 2 or 4) and Ground (Pin 6) respectively. Note: For some strange reason the level shifter works if you don't connect the ground pins to either side of it (i.e. Use the LV, LV1, LV2, HV, HV1 and HV2 pins only). No idea why - electrical engineering degree required I think. If all works well, you should see the LCD module light-up with the top row being a bunch of white bars (you might need to check the contrast setting of the module as well). White bars = uninitialised LCD screen. Step 3) Install the required packages int Armbian Reference: sudo apt-get install -y python-smbus i2c-tools Step 4) Check to see what the address of the LCD Screen is: Reference: user@orangepipc:~/Downloads/i2c$ sudo i2cdetect -y 0 [sudo] password for userpi: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- user@orangepipc:~/Downloads/i2c$ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- Looks like it's 0x3f as the address on I2C bus 0 (which is apparently right according to the aliexpress buyer feedback comments) Step 5) Download Example Script Reference: The example script will allow you to send text to the screen via I2C. It is very similar to my scripts for the normal 16×2 screen. To download the script directly to your Pi you can use : wget Step 6) Adjust the Sample Script I need to adjust the script to reference a 1602 LCD device with address 0x3f, on Orange Pi PC I2C Bus, 0. The script as it is references a device of 0x27 on Bus 1 - it won't work. You might have a LCD device of address 0x27 (you'll know from the previous step), but it seems many of the cheap LCD modules from aliexpress are 0x3f for some reason. Adjusted script below: #!/usr/bin/python #-------------------------------------- # ___ ___ _ ____ # / _ \/ _ \(_) __/__ __ __ # / , _/ ___/ /\ \/ _ \/ // / # /_/|_/_/ /_/___/ .__/\_, / # /_/ /___/ # # # LCD test script using I2C backpack. # Supports 16x2 and 20x4 screens. # # Author : Matt Hawkins # Date : 20/09/2015 # # # # Copyright 2015 Matt Hawkins # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <>. # #-------------------------------------- import smbus import time # Define some device parameters I2C_ADDR = 0x3f # I2C device address LCD_WIDTH = 16 # Maximum characters per line # Define some device constants LCD_CHR = 1 # Mode - Sending data LCD_CMD = 0 # Mode - Sending command LCD_LINE_1 = 0x80 # LCD RAM address for the 1st line LCD_LINE_2 = 0xC0 # LCD RAM address for the 2nd line LCD_LINE_3 = 0x94 # LCD RAM address for the 3rd line LCD_LINE_4 = 0xD4 # LCD RAM address for the 4th line LCD_BACKLIGHT = 0x08 # On #LCD_BACKLIGHT = 0x00 # Off ENABLE = 0b00000100 # Enable bit # Timing constants E_PULSE = 0.0005 E_DELAY = 0.0005 #Open I2C interface bus = smbus.SMBus(0) # Rev 1 Pi uses 0 (and Orange PI PC, for pins 3 and 5) #bus = smbus.SMBus(1) # Rev 2 Pi uses 1 def lcd_init(): # Initialise display lcd_byte(0x33,LCD_CMD) # 110011 Initialise lcd_byte(0x32,LCD_CMD) # 110010 Initialise lcd_byte(0x06,LCD_CMD) # 000110 Cursor move direction lcd_byte(0x0C,LCD_CMD) # 001100 Display On,Cursor Off, Blink Off lcd_byte(0x28,LCD_CMD) # 101000 Data length, number of lines, font size lcd_byte(0x01,LCD_CMD) # 000001 Clear display time.sleep(E_DELAY) def lcd_byte(bits, mode): # Send byte to data pins # bits = the data # mode = 1 for data # 0 for command bits_high = mode | (bits & 0xF0) | LCD_BACKLIGHT bits_low = mode | ((bits<<4) & 0xF0) | LCD_BACKLIGHT # High bits bus.write_byte(I2C_ADDR, bits_high) lcd_toggle_enable(bits_high) # Low bits bus.write_byte(I2C_ADDR, bits_low) lcd_toggle_enable(bits_low) def lcd_toggle_enable(bits): # Toggle enable time.sleep(E_DELAY) bus.write_byte(I2C_ADDR, (bits | ENABLE)) time.sleep(E_PULSE) bus.write_byte(I2C_ADDR,(bits & ~ENABLE)) time.sleep(E_DELAY) def lcd_string(message,line): # Send string to display message = message.ljust(LCD_WIDTH," ") lcd_byte(line, LCD_CMD) for i in range(LCD_WIDTH): lcd_byte(ord(message[i]),LCD_CHR) def main(): # Main program block # Initialise display lcd_init() while True: # Send some test lcd_string("RPiSpy <",LCD_LINE_1) lcd_string("I2C LCD <",LCD_LINE_2) time.sleep(3) # Send some more text lcd_string("> RPiSpy",LCD_LINE_1) lcd_string("> I2C LCD",LCD_LINE_2) time.sleep(3) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass finally: lcd_byte(0x01, LCD_CMD) Step 7) ADD YOUR USER ACCOUNT TO 'i2c' GROUP This is a really useful thing to do, otherwise you'll need to run the python script as ROOT (via. sudo etc.) every time. No good if you want to write a python script that runs using your normal user account and sends messages over I2C to the LCD. Reference: sudo adduser <YOUR_USER_ID> i2c eg: sudo adduser johnsmith i2c Step 8) Run your script! python Amazing! Please note: You can probably use a more advanced library to output data to the LCD, but for now, it probably isn't required: (you will need to adjust the code in '' to refer to port=0, not port=1 to get this to work. Also change the address of the LCD device if required) What a level shifter looks like:
  22. If you follow you will get a lot of error-messages. Here is guide to install it on your Orange Pi Pc (Debian Jessie), sudo apt-get install build-essential git autotools-dev autoconf libtool gettext gawk gperf \ antlr3 libantlr3c-dev libconfuse-dev libunistring-dev libsqlite3-dev \ libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavutil-dev \ libasound2-dev libmxml-dev libgcrypt11-dev libavahi-client-dev zlib1g-dev \ libevent-dev for Armbian you need some little extras installed sudo apt-get install libcurl4-gnutls-dev sudo apt-get install libjson0 libjson0-dev sudo apt-get install avahi-daemon avahi-discover libnss-mdns then you run git clone cd forked-daapd autoreconf -i ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var make sudo make install create the new user sudo adduser daapd adjust the settings for your music-path in /etc/forked-daapd.conf on my Orange Pi, the file /etc/init.d/forked-daapd was missing. If yours is missing, too, just add it: sudo nano /etc/init.d/forked-daapd and copy this text inside: #! /bin/sh ### BEGIN INIT INFO # Provides: forked-daapd # Required-Start: $local_fs $remote_fs $network $time avahi # Required-Stop: $local_fs $remote_fs $network $time # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: media server with support for RSP, DAAP, DACP and AirTunes # Description: forked-daapd is an iTunes-compatible media server for # sharing your music library over the local network with RSP # clients like the SoundBridge from Roku and DAAP clients like # iTunes. It can also stream music to AirTunes devices. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/forked-daapd NAME=forked-daapd DESC="RSP and DAAP media server" test -x $DAEMON || exit 0 PIDFILE=/var/run/$ set -e running_pid() { # Check if a given process pid's cmdline matches a given name pid=$1 name=$2 [ -z "$pid" ] && return 1 [ ! -d /proc/$pid ] && return 1 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` # Is this the expected child? [ "$cmd" != "$name" ] && return 1 return 0 } running() { # Check if the process is running looking at /proc # (works for all users) # No pidfile, probably no daemon present [ ! -f "$PIDFILE" ] && return 1 # Obtain the pid and check it against the binary name pid=`cat $PIDFILE` running_pid $pid $DAEMON || return 1 return 0 } force_stop() { # Forcefully kill the process [ ! -f "$PIDFILE" ] && return if running ; then kill -15 $pid # Is it really dead? if running ; then kill -9 $pid if running ; then echo "Cannot kill $NAME (pid=$pid)!" exit 1 fi fi fi rm -f $PIDFILE return 0 } case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile $PIDFILE \ --exec $DAEMON -- $DAEMON_OPTS if running ; then echo "$NAME." else echo " ERROR." fi ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \ --exec $DAEMON echo "$NAME." ;; force-reload) start-stop-daemon --stop --test --quiet --pidfile \ /var/run/$ --exec $DAEMON \ && $0 restart \ || exit 0 ;; restart) PID=$(cat $PIDFILE 2> /dev/null || true) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --oknodo --pidfile \ /var/run/$ --exec $DAEMON if [ -n "$PID" ]; then while running_pid $PID $DAEMON; do echo -n "."; sleep 1; done fi start-stop-daemon --start --quiet --pidfile \ /var/run/$ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; status) echo -n "$NAME is " if running ; then echo "running" else echo " not running." exit 1 fi ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 Save it. Now we need to allow the service access to it´s own database: sudo chown -R daapd /var/cache/forked-daapd Start the service: sudo /etc/init.d/forked-daapd restart tail -f /var/log/forked-daapd.log you should see some activity on the log-file. After the scanning is complete, you can see your Orange Pi music-server in iTunes. Automatic updates for the music-server (e.g. at 4am in the morning, necessary if you use a network-share for the data): sudo crontab -e and add the line 0 4 * * * touch /{path to your music}/trigger.init-rescan
  23. Relax - Wireless is solved for OPI ONE There seems to be a lot of confusion and missing information on how to access the dirt cheap OPI ONE wirelessly and the steps necessary to successfully use cheap Realtek USB dongles ( 8188cus, 8188eu ) with Armbian_5.10. This is a short summary of the needed materials and steps to turn your OPI ONE into a wireless client or wireless AP. There are NO custom kernels, custom modules or anything else needed, we are using stock Armbian_5.10 with stock kernel, stock modules and stock software to configure wireless access for select tested and working Realtek wifi dongles. Follow the steps without variation. Once you get wifi working you may adapt setup/configuration to your specific needs Prerequisites - OPI ONE with quality power supply 5V/2A - MicroSD ( 4G or higher ) with stock Armbian_5.10 installed per official instructions - Supported wifi USB dongle - LAN connection to host computer ( preferrably notebook running Linux ) for needed setup/configuration - WLAN-router accessible from host computer to test wireless connections. General procedure to set up wireless on OPI ONE - Set up your OPI ONE with basic Armbian_5.10 and configure a static IP LAN-address - Access OPI ONE via ssh from your host computer - Plug in wireless dongle and load correct driver module - check capabilities of wifi dongle (iw list) - configure wpa_supplicant for client mode - configure hostapd for AP mode >>> all configurations will be minimal without added automagic complexities ( bridges, DHCP etc...) OPI ONE wireless client Module 8192cu works with Realtek 8188CUS dongles and provides a wireless interface wlan0 ready to be configured in managed mode with wpa_supplicant. nano /etc/modules-load.d/modules.conf ===================================== #8189es 8192cu nano /etc/network/interfaces (adapt to your network setup) ========================================================== auto lo iface lo inet loopback #----- lan interface ( standard maintenance connection via ssh ) allow-hotplug eth0 iface eth0 inet static address netmask network #----- Realtek 8192cu wlan interface client ( access defined in /etc/wpa_supplicant/wpa_supplicant.conf ) allow-hotplug wlan0 iface wlan0 inet static address netmask network broadcast gateway dns-nameservers dns-nameservers wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf nano /etc/wpa_supplicant/wpa_supplicant.conf ============================================ ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="<your_ssid>" psk="<your_password>" key_mgmt=WPA-PSK priority=99 } After restarting OPI ONE it should be connected to your configured wireless router and accessible under the static IP. Wireless connection is working now and the rest is up to your hopefully wild imagination and creativity. Tested working dongles RTL8188CUS cheap no-name dongle from Aliexpress ( < $2 ) Bus 002 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter RTL8188CUS Edimax EW-7811Un high quality dongle ( $10 ) Bus 001 Device 008: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] Wifi performance is not stellar, but definitely adequate. Under ideal conditions ( same room as router, little interference ) speeds of 80mbps ( measured with iperf ) can be expected. Crossing two walls at 20m distance from router the signal was still usable yielding 20mbps. OPI ONE access point + wireless client Surprise : You were asking for AP mode and now you are getting AP deluxe with an extra client interface for free. Module 8188eu works with Realtek 8188EU dongle and provides TWO wireless interfaces : wlan0 is ready to be configured in AP mode with hostapd and wlan1 in managed mode with wpa_supplicant. When the dongle is plugged in and the driver correctly loaded, iw list will enumerate the drivers parameters for the two new interfaces. iwconfig will show wlan0 and wlan1. nano /etc/modules-load.d/modules.conf ===================================== #8189es 8188eu nano /etc/default/hostapd ========================= DAEMON_CONF="/etc/hostapd.conf" nano /etc/network/interfaces ============================ auto lo iface lo inet loopback #----- lan interface ( standard maintenance connection via ssh ) allow-hotplug eth0 iface eth0 inet static address netmask network #----- Realtek 8188eu wlan interface AP ( access defined in /etc/hostapd.conf ) allow-hotplug wlan0 iface wlan0 inet static address netmask network #----- Realtek 8188eu wlan interface client ( access defined in /etc/wpa_supplicant/wpa_supplicant.conf ) allow-hotplug wlan1 iface wlan1 inet static address netmask network broadcast gateway dns-nameservers dns-nameservers wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf nano /etc/hostapd.conf ====================== ssid=<your-OPI-ONE-ssid> interface=wlan0 hw_mode=g channel=5 driver=nl80211 logger_syslog=0 logger_syslog_level=0 wmm_enabled=1 ieee80211n=1 wpa=3 preamble=1 #wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 wpa_passphrase='12345678' wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP auth_algs=1 macaddr_acl=0 noscan=1 #ht_capab=[HT40-][sHORT-GI-40][sHORT-GI-40][DSSS_CCK-40] country_code=<your country code> #ieee80211d=1 nano /etc/wpa_supplicant/wpa_supplicant.conf ============================================ ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="<your-router-ssid>" psk="<your-router-password>" key_mgmt=WPA-PSK priority=99 } After restarting OPI ONE it should be connected to your configured wireless router and accessible under the static IP. On your notebook the newly created OPI ONE access point should be visible when scanning. Specify a static IP for the link and connect using the chosen password ( e.g. '12345678' ) . Feel like a hero, empty a sixpack and order more pizza.... Wireless connection is working now and the rest is up to your hopefully wild imagination and creativity. Tested working dongle for AP mode : RTL8188EU cheap no-name dongle from Aliexpress ( $2.20 ) Bus 001 Device 009: ID 0bda:0179 Realtek Semiconductor Corp. ( noname identified as 8188EU ) Wifi performance with both interfaces active is surprisingly good. Under ideal conditions ( same room as router, little interference ) speeds of 60 (client) / 30 (AP) mbps can be expected. Crossing two walls at 20m distance from router signals were still usable yielding 20 (client) / 5 (AP) mbps. Troubleshooting Most of the problems encountered while setting up WIFI are caused by inadequate or overly complicated testing setups, procedures and rampant wild guesses. Keep it simple and solve one problem at a time. As a stable datum you should realize that the procedures outlined above DO WORK and have been adequately TESTED and RETESTED.. Solution No. 1 : Follow the steps outlined Solution No. 2 : Find out where you did not follow the steps outlined Solution No. 3 : Find out what you added to the steps outlined Solution No. 4 : Reiterate Good luck with your wireless OPI ONE, enjoy and flood the forum with working solutions.
  24. Hallo, this Mini-Howto describes how to change the behavior of the onboard LEDs during booting. There are many ways to do that. Two ways are shown here, a SysV style using /etc/rc.local and a systemd style using a configuration file in /etc/tmpfiles.d/. The systemd file is earlier interpreted than rc.local. It is tested on Banana Pi M1*/M2/R1 with Debian jessie next (5.0x, 4.4.x). * partly Which LEDs could be accessed? root@bananapim2:~# ls -1 /sys/class/leds/ bpi-m2:blue:usr bpi-m2:green:usr bpi-m2:red:usr * The Banana Pi M1 lists the blue LED but it couldn't be set via /etc/tmpfiles.d/ or /etc/rc.local. Which behaviors are possible? root@bananapim2:~# cat /sys/class/leds/bpi-m2\:green\:usr/trigger none rc-feedback kbd-scrollock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usb-gadget usb-host [mmc0] heartbeat cpu0 cpu1 cpu2 cpu3 default-on mmc1 rfkill0 Edit /etc/rc.local to set the behavior of the onboard LEDs root@bananapim2:~# cat /etc/rc.local #!/bin/sh -e echo "default-on" > /sys/class/leds/bpi-m2\:red\:usr/trigger echo "mmc0" > /sys/class/leds/bpi-m2\:green\:usr/trigger echo "heartbeat" > /sys/class/leds/bpi-m2\:blue\:usr/trigger exit 0 or edit /etc/tmpfiles.d/leds.conf. root@bananapim2:~# cat /etc/tmpfiles.d/leds.conf w /sys/class/leds/bpi-m2:red:usr/trigger - - - - default-on w /sys/class/leds/bpi-m2:green:usr/trigger - - - - mmc0 w /sys/class/leds/bpi-m2:blue:usr/trigger - - - - heartbeat /etc/rc.local can be executed on the console, /etc/tmpfiles.d/leds.conf needs a reboot. A third way may be to create systemd rules. But it doesn't work for me. root@bananapim2:~# udevadm info -a -p /sys/class/leds/bpi-m2\:red\:usr [snip] looking at device '/devices/platform/leds/leds/bpi-m2:red:usr': KERNEL=="bpi-m2:red:usr" SUBSYSTEM=="leds" DRIVER=="" ATTR{brightness}=="255" ATTR{max_brightness}=="255" ATTR{trigger}=="none rc-feedback kbd-scrollock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usb-gadget usb-host mmc0 heartbeat cpu0 cpu1 cpu2 cpu3 [default-on] mmc1 rfkill0 " [snip] root@bananapim2:~#nano /etc/udev/rules.d/10-leds.rules For setting the LEDs via dts files, have a look at this discussion: Regards, Steve