Search the Community

Showing results for tags 'tutorial'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Technical support
    • Getting started
    • Allwinner A20
    • Allwinner H2 & H3
    • Amlogic S905(x)
    • Armada A388, A3700
    • Freescale imx6
    • Rockchip 3288 & 3328
    • Other supported boards
    • Common issues
  • Community forums
    • Peer to peer technical support
    • TV boxes
    • General chit chat
  • Development
    • Allwinner A64, H5 & H6
    • Rockchip 3399
    • Development

Categories

There are no results to display.

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 22 results

  1. tkaiser has built a new Kernel with i2s Modules. With this Kernel and some cheap DAC e.g. (http://www.ebay.de/itm/Audiophonics-I2S-DAC-ES9023-Sabre-to-Analog-24bit-192KHZ-fur-Raspberry-PI-/291573327639?hash=item43e31fe717:g:TTwAAOSw~OdVZXtm) 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 http://www.diyaudio.com/forums/pc-based/285427-i2s-connection-orange-dac.html#post4587580 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
  2. 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.
  3. 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. Kerberos.io (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. Kerberos.io 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 Kerberios.io 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 Kerberios.io 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!
  4. 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.
  5. Since I wondered why FriendlyARM chose just 432MHz DRAM clock for their new NanoPi NEO (said to be an IoT node for lightweight stuff) and I also wondered how low consumption could be configured with a H3 device I decided to simply try it out. Since I have no NanoPi NEO lying around (and FriendlyARM seems not to ship developer samples) I used Orange Pi Lite instead. Same amount of DRAM (but dual bank configuration therefore somewhat faster), same voltage regulator but Wi-Fi instead of Ethernet. I adjusted the fex file to stay always on the lower VDD_CPUX voltage (1.1V), disabled all unnecessary stuff (Wi-Fi, HDMI/Mali400 and so on, please see modified fex settings), also adjusted /etc/defaults/cpufreq-utils to jump between 240-912MHz cpufreq and added the following to /etc/rc.local to make H3 as slow as an RPi Zero: echo 0 >/sys/devices/system/cpu/cpu3/online echo 0 >/sys/devices/system/cpu/cpu2/online echo 0 >/sys/devices/system/cpu/cpu1/online echo 408000 >/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/userspace/set_freq (disabling 3 CPU cores and limiting DRAM clockspeed to 408 MHz -- lowering DRAM clockspeed from 672 MHz down to 408 MHz is responsible for a whopping 200mW difference regarding consumption). With this single core setup OPi Lite remains at 800mW when idling at 912MHz, when running a 'sysbench --test=cpu --num-threads=1 --cpu-max-prime=20000 run' consumption increases by 300mW (and H3 is still a bit faster at 912MHz compared to a RPi Zero at 900 MHz: 808 seconds vs. 930 seconds). Further reducing CPU clockspeed or disabling leds doesn't help that much or at least my powermeter isn't that precise. I find it already pretty nice to be able to limit consumption down to 160mA (800mW) by disabling 3 CPU cores (easy to bring back when needed!), downclocking DRAM and limiting VDD_CPUX voltage to 1.1V. That means that on H3 devices featuring the more flexible SY8106A voltage regulator even lower consumption values could be achieved since VDD_CPUX voltage could be lowered even more. And consumption might be reduced further by disabling more stuff. But that's something someone else with a multimeter has to test since my equipment isn't precise enough. To sum it up: By simply tweaking software settings (most of them not even needing a reboot but accessible from user space) average idle consumption of an H3 device can be reduced from 1.5W (300mA) to almost the half. In this mode (one single CPU core active at 912MHz and DRAM downclocked to 408MHz) a H3 device is still faster than an RPi Zero while providing way more IO and network bandwidth. And if settings are chosen wisely performance can be increased a lot from userspace (transforming a single core H3 @ 912MHz to a quad-core H3 @ 1200/1296 MHz with faster DRAM which translates to roughly 6 times the performance)
  6. 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 https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb 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 https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb 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; https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=941 http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=1988 (some resources for motion) http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-linux-with-motion/(VERY 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*
  7. 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 !
  8. 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)
  9. 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.
  10. 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 https://raw.githubusercontent.com/ua3nbw/opihotspot/master/opihotspot_debian.sh chmod +x opihotspot_debian.sh ./opihotspot_debian.sh Russian version https://ua3nbw.ru/all/orangepi-coovachilli-and-freeradius-for-a-wifi-hotspot-with-capt/
  11. Hi All, I recently bought a cheap 16 character, 2 row LCD display from aliexpress.com 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: http://www.raspberrypi-spy.co.uk/2015/05/using-an-i2c-enabled-lcd-screen-with-the-raspberry-pi/ 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: https://www.abelectronics.co.uk/kb/article/1061/i2c--smbus-and-armbian-linux sudo apt-get install -y python-smbus i2c-tools Step 4) Check to see what the address of the LCD Screen is: Reference: http://www.raspberrypi-spy.co.uk/2014/11/enabling-the-i2c-interface-on-the-raspberry-pi/ 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: http://www.raspberrypi-spy.co.uk/2015/05/using-an-i2c-enabled-lcd-screen-with-the-raspberry-pi/ 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 https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/lcd_i2c.py 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_i2c.py # LCD test script using I2C backpack. # Supports 16x2 and 20x4 screens. # # Author : Matt Hawkins # Date : 20/09/2015 # # http://www.raspberrypi-spy.co.uk/ # # 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 <http://www.gnu.org/licenses/>. # #-------------------------------------- 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: https://www.abelectronics.co.uk/kb/article/1061/i2c--smbus-and-armbian-linux sudo adduser <YOUR_USER_ID> i2c eg: sudo adduser johnsmith i2c Step 8) Run your script! python lcd_i2c.py 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: https://gist.github.com/DenisFromHR (you will need to adjust the code in 'RPi_I2C_driver.py' to refer to port=0, not port=1 to get this to work. Also change the address of the LCD device if required) http://www.circuitbasics.com/raspberry-pi-i2c-lcd-set-up-and-programming/ What a level shifter looks like:
  12. 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 manage.py 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 manage.py runserver 192.168.0.44:8000'. 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 settings.py 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/settings.py --> ALLOWED_HOSTS = ['192.168.x:xx'] (IP of yor SBC) Start up the runserver: python manage.py 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
  13. If you follow https://github.com/ejurgensen/forked-daapd 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 https://github.com/ejurgensen/forked-daapd.git 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/$NAME.pid 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/$NAME.pid --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/$NAME.pid --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/$NAME.pid --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
  14. 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 192.168.3.164 netmask 255.255.255.0 network 192.168.3.0 #----- Realtek 8192cu wlan interface client ( access defined in /etc/wpa_supplicant/wpa_supplicant.conf ) allow-hotplug wlan0 iface wlan0 inet static address 192.168.2.164 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.77 dns-nameservers 192.168.1.1 dns-nameservers 8.8.8.8 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 192.168.3.164 netmask 255.255.255.0 network 192.168.3.0 #----- Realtek 8188eu wlan interface AP ( access defined in /etc/hostapd.conf ) allow-hotplug wlan0 iface wlan0 inet static address 192.168.4.164 netmask 255.255.255.0 network 192.168.4.0 #----- Realtek 8188eu wlan interface client ( access defined in /etc/wpa_supplicant/wpa_supplicant.conf ) allow-hotplug wlan1 iface wlan1 inet static address 192.168.2.164 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.77 dns-nameservers 192.168.1.1 dns-nameservers 8.8.8.8 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.
  15. 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: http://forum.armbian.com/index.php/topic/691-banana-pro-testers-wanted-sata-drive-not-working-on-some-boards/page-4#entry5641 Regards, Steve
  16. What shall moderators do on our forum. Basics: - job should be invisible - spam control and clean up (rare) - approve posts from new users (daily) - Warning: editing topic tittle change it's URL - move topic to appropriate forum (rare) (tick "Leave a link to the new location" - it deletes auto in 30 days) recognise and tag tutorials & researches. Move them into "Research Guides & Tutorials" - merge, pin and lock topics (rare, with caution) - cut and move posts to new topics (rare, with caution) Intermediate: - Warn User for: spamming, inappropriate language, signature violation, abusive behaviour, topic bumping. Stop being a moderator: - when you don't want - on multiple complains To study and add more: https://bubbajuju.com/forum-moderating/
  17. Here is a short instruction how to enable S/PDIF digital audio output on NanoPI M1 board running Debian Jessie with legacy kernel. This instruction can be applied to other H3 based boards but connect S/PDIF output hardware to GPIOA17 can be tricky (soldering miniature camera connector pins). Operations can be done over serial console or ssh. Login as root Get a .fex file and open it in editor: bin2fex /boot/script.bin /tmp/script.fex nano /tmp/script.fex Search a csi0 (camera) section an disable it: [csi0] vip_used = 0 Search a S/PDIF section and enable it: [spdif0] spdif_used = 1 Get the name of the file pointed by the /boot/script.bin link and convert modified .fex to it: ls -la /boot/script.bin ----- /boot/script.bin -> bin/nanopim1.bin fex2bin /tmp/script.fex /boot/bin/nanopim1.bin Open /etc/modules to instruct Jessie to load S/PDIF modules at boot: nano /etc/modules Add module names near the end of file: sunxi_spdif sunxi_spdma sndspdif sunxi_sndspdif Reboot system: sync reboot After reboot login as root again Get the list of ALSA devices available: aplay -l **** List of PLAYBACK Hardware Devices **** card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: sndspdif [sndspdif], device 0: SUNXI-SPDIF sndspdif-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0 To connect board S/PDIF output to my favorite DAC i use an optical S/PDIF module soldered out from dead DVD player: There are 3 wires connected to board 40-pin connector: GND (pin 6), VDD_5V (pin 2) and SPDIF-OUT/GPIOA17 (pin 26) Module pinout can be found in datasheet http://www.mouser.com/catalog/specsheets/totx177(f,t).pdf Modules come in 2 types: 6-MBit (up to 24 bit / 96KHz) and 15-MBit (up to 24 bit / 192KHz). Most likely from DVD or SAT receiver You get the 6-MBit module. 15-MBit modules can be purchased at Digikey, etc. When listening to music, I faced with spontaneous fadings. This is due to some problem of the CPU speed switching. To this do not happen, I banned the clock frequency of 240 MHz in the /etc/default/cpufrequtils: MIN_SPEED=480000
  18. Hello everyone! Is there anyone who tried to run Docker on armbian? Ok, let's start from the beginning: I am from the Hypriot Team (we made Docker available on ARM) and recently saw some guys successfully playing with Docker on armbian. Meanwhile, we know, that our Docker runs at least on the Cubietrack and Lamobo R1/BananaPi R1 on top of armbian! This is awesome because, you know, IoT is coming, and Docker on ARM helps get a grip on many challenges induced by IoT. However, we were only able to support Docker on Raspberry Pis so far... Imagine if Docker would run on more than just a few ARM boards! Armbian seems an awesome platform to extend the family of Docker compatible boards. So, I wonder if there is anyone who tried to run Docker on armbian? If you are now curious about this topic and wanna get started, please see this blog post of how to install Docker on ARM within no time: http://blog.hypriot.com/post/family_arm_hardware_for_docker_more_children/ Looking forward to get in touch with you guys!
  19. Questions and answers about powering the Orange Pi Zero using the "Power over Ethernet" option. The aim is to answer community questions about Power Over Ethernet options (both official 802.3af/at and unofficial "PoE" solutions) and to improve the wiki page with these answers: http://linux-sunxi.org/Xunlong_Orange_Pi_Zero Helpful links: http://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Powering_the_board https://en.wikipedia.org/wiki/Power_over_Ethernet https://forum.armbian.com/index.php/topic/1762-new-oranges-with-h5-and-h2/page-2#entry19054 Examples of standards-compliant PoE hardware: 802.3af switch: https://www.amazon.com/TP-Link-8-Port-Ethernet-Desktop-TL-SF1008P/dp/B003CFATT2/ 100MBit 802.3af to 5V power supply (10W max): https://www.aliexpress.com/item/1PCS-Micro-USB-Active-POE-Splitter-Power-48V-to-5V-2-4A-for-Raspberry-pi-3/32741378583.html Gigabit 802.3af to 12/9/5V power supply (12W max): http://www.tp-link.com/en/products/details/cat-4794_TL-POE10R.html Examples of non-standards-compliant PoE hardware: 8 port "PoE" injector (you pick the input voltage): https://www.aliexpress.com/item/Cameye-8-Channel-CCTV-POE-Injector-for-Surveillance-IP-Cameras-Power-over-Ethernet-Adapter-with-Shell/32745669802.html "PoE" splitter: https://www.aliexpress.com/item/POE-Adapter-cable-Tape-Screened-Passive-Power-Over-Ethernet-RJ45-Injector-Splitter-Kit-12-48v-Synthesizer/32516398486.html https://www.aliexpress.com/item/10cm-3-9-5-5mm-x-2-1mm-DC-Female-to-Micro-USB-Male-Charging-Cable/32319957922.html (Zero soldering option!) Solder to pads on Orange Pi Zero and use a DC-DC step down converter to get 5V: https://www.aliexpress.com/item/5-pcs-Ultra-Small-Size-DC-DC-Step-Down-Power-Supply-Module-3A-Adjustable-Step-Down/32261885063.html https://www.aliexpress.com/item/15924-Free-shipping-DC-DC-Step-Down-Converter-Module-LM2596-DC-4-0-40-to-1/32354635261.html https://www.aliexpress.com/item/24V-12V-To-5V-5A-DC-DC-Buck-Step-Down-Power-Supply-Module-Synchronous-Rectification-Power/32689938167.html Q&A: 1. The Orange Pi Zero says it supports "PoE" how is this implemented? The Ethernet port on the Orange Pi Zero exposes pins 4/5 and 7/8 via pads on the bottom of the board. Photo here. Note that this is 802.3af mode B, which is not fully standards compliant (802.3af/at specifies mode A and mode B, it is not allowed to have a device which only accepts one mode). Out of the box, there is NO way to power the board from Ethernet, either with an 802.3af/at switch or with passive "PoE" injectors. More effort is needed. 2. What are the options to power the Orange Pi with "PoE" ? Option 1: Solder 0 Ohm resistors across the pads and use a PoE injector with 5V. Pro: + No additional power supply needed Con: - 5V cannot travel long distances without voltage sag. You can put in a higher voltage (e.g. 7V DC) but then all the cables would need to be the same length and you risk destroying the Orange Pi if the voltage spikes. Option 2: Solder a step-down converter and use a PoE injector with a higher voltage (e.g. 24V). Pro: + 24V will travel much farther than 5V in a CAT5/6 cable. Cons: - You will need to purchase and solder an additional voltage regulator to take the input voltage and drop it down to 5V. Option 3: Buy/use a PoE switch implementing 802.3af/at. Pro: + Standards compliant + 802.3af/at operate at ~48V, which can power devices up to 100m away from the switch + Plugging in a non-PoE device will not result in fireworks + Cable faults will not result in short circuits because the switch will shut down the port Con: - Power electronics to turn 48V into 5V may consume more power than the Orange Pi itself - More expensive
  20. Requirements Fresh enough nighly or manually built image Latest kernel and dtb packages (26.03.2017 or newer) Limitations As stated in other PWM related threads, hardware PWM output is supported only on pin PA5 which is also UART0 ("debug" serial console) RX pin, so enabling PWM will disable this console. Activation Add "pwm" to "overlays" line in /boot/armbianEnv.txt Example: overlays=pwm Reboot is required to apply the changes Armbian overlays documentation: https://docs.armbian.com/User-Guide_Allwinner_overlays/ PWM sysfs interface Official documentation: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/ABI/testing/sysfs-class-pwm?h=v4.10 Please note that this ABI is considered "testing" so it may change in the future. Sysfs interface example # activate the PWM. On H3 only 1 PWM is supported, so exporting PWM 0 echo 0 > /sys/class/pwm/pwmchip0/export # set period to 10ms echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/period # set normal polarity. needs to be reset explicitly. Bug? echo "inversed" > /sys/class/pwm/pwmchip0/pwm0/polarity echo "normal" > /sys/class/pwm/pwmchip0/pwm0/polarity # enable the PWM echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable # set duty cycle to 1ms echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle Result: # set duty cycle to 2ms echo 2000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle Result: # set duty cycle to 1us, period to 2us echo 1000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle echo 2000 > /sys/class/pwm/pwmchip0/pwm0/period Result: Please note that some settings needs to be changed in a correct sequence, i.e. you can't set duty cycle higher than period root@orangepiplus2e:~# echo 1000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle root@orangepiplus2e:~# echo 500 > /sys/class/pwm/pwmchip0/pwm0/period -bash: echo: write error: Invalid argument root@orangepiplus2e:~#
  21. Is not important, and is a topic related to desktop environment and I know that armbian is more a server OS than a dektop replacement ... but I'm stuck trying to have all the environment in my mother language, Spanish. I change locale in root user and in the additionally created desktop user, I use dpkg-reconfigure locales locales and also export LANGUAGE=es_ES.UTF-8 but after reboot is again in English. And also when I update and upgrade the system I can see Translation-en logs but never a Translation-es. Is there any chance to do a better localization of the Desktop Environment? Thanks.
  22. http://forum.odroid.com/viewtopic.php?f=138&t=20972