Jump to content

[WiP / Orange Pi One] Support for the upcoming Orange Pi One?


tkaiser

Recommended Posts

How can I change to german language.

 

I set /etc/default/locale to

LANG="de_DE.UTF-8"

LC_ALL="de_DE.UTF-8"

 

and made

 

apt-get install --reinstall locales
locale-gen de_DE.UTF-8
dpkg-reconfigure locales

 

but all is still in english

 

this procedure has worked with other images like from eg. loboris and others

 

I use the ubuntu-trusty version 5.04

 

thank you for helping

Link to comment
Share on other sites

More importantly please provide us with the output of

dmesg
/bin/bash -x /etc/init.d/armhwinfo start

Please use the spoiler function here or put it on pastebin.com and post the link. 

 

Since it's a bit boring to only get complaints but no useful feedback, we'll drop support for the Orange Pi 2 if none of the users provide these informations to enable us to fix the issue. None of the devs has this board so if we won't get help from users we simply withdraw OS images for the 2 and stop supporting it. :)

Link to comment
Share on other sites

Since it's a bit boring to only get complaints but no useful feedback, we'll drop support for the Orange Pi 2 if none of the users provide these informations to enable us to fix the issue. None of the devs has this board so if we won't get help from users we simply withdraw OS images for the 2 and stop supporting it. :)

Just got my One up and running today so will dust off the Pi 2 tomorrow and load it up and get the info. for you :)

Link to comment
Share on other sites

What about adding 'LC_MESSAGES=de_DE.UTF-8' to /etc/default/locale and then 

update-locale LANG=de_DE.UTF-8 && dpkg-reconfigure locales && reboot

On Ubuntu things seem to be slightly different. Please report back whether that helps and also how the GUI is affected

 

100 Points - you was perfectly right - now I have German Desktop and also German in the Terminal.

 

Thanks a lot

Link to comment
Share on other sites

Hi, i have a problem with my Orange Pi One, because the Armbian Orangepih3 5.04 Ubuntu trusty desktop identifies as "orangepi 2 mini", sometimes "orangepi plus". But after first reboot terminal show root@orangepione, hmm. H3disp writes change the resolution to a file /boot/orangepi2.bin. It is correct?

Link to comment
Share on other sites

Hi, I'm providing same testing on PC with big heasting with fun on it. I'm using Ubuntu 5.04 image.

 

cpufreq is reporting max freq 1540, but if I can set higher frequencies, only 1300 is set.

 

How can I set higher frequencies on board?

Link to comment
Share on other sites

Any chance you've SPI devices lying around to test with? :)

 

I am able to test SPI successfully with 5.04 release.

Device  used : RFID Reader RC522

 

Here is the steps to followed :

 

1. Connection

 

     Mifare_RC522_RFID  OP One

     MOSI ——————————> pin 19

     MISO ——————————-> pin 21

     SCLK ——————————-> pin 23

     SDA ——————————–> pin 24

     RST ———————————> pin 22

     IRQ ———————————-> NONE

 

2. Check device ls /dev/spidev0.0 ( Armbian 5.04 gives it out of the box)

 

3) Install python dev

     apt-get install python-dev

 

4) Install orangepi_PC_gpio_pyH3 Library

      git clone https://github.com/duxingkei33/orangepi_PC_gpio_pyH3.git

      cd orangepi_PC_gpio_pyH3

      python setup.py install

 

5) Install SPI-Py Library

    git clone https://github.com/lthiery/SPI-Py.git

    cd SPI-Py

     python setup.py install

 

6) Install MFRC522-python

     git clone https://github.com/rasplay/MFRC522-python.git

 

7)To read id data:

    cd MFRC522-python

    edit  MFRC522.py and comment out line 108.109.110  and 356( as shown below)

          # GPIO.setmode(GPIO.BOARD)

          #GPIO.setup(22, GPIO.OUT)

          #GPIO.output(self.NRSTPD, 1)

    

           #GPIO.output(self.NRSTPD, 1)

 

        python read.py

 

root@orangepione:~/MFRC522-python# python read.py

Card read UID: 193,11,21,149,74

 

Link to comment
Share on other sites

Just got my One up and running today so will dust off the Pi 2 tomorrow and load it up and get the info. for you :)

 

Thx but I believe we found it already (since I enhanced auto detection for the upcoming H3 based Banana Pi M2+ and run now into the same problem as OPi 2 users). On the very first boot for whatever reasons no network is detected but my auto detection code relies on that and fails:

root@bananapim2plus:~# grep PHY /var/log/armhwinfo.log                                      
[    3.525687] gmac0 gmac0: eth0: eth0: PHY ID 00441400 at 0 IRQ poll (gmac0-0:00)
[    7.520233] PHY: gmac0-0:00 - Link is Up - 100/Full

(this is already the 2nd boot so 2 occurences of PHY should be there -- don't search for /var/log/armhwinfo.log now, that's WiP). I'm trying to fix that now.

 

Hi, I'm providing same testing on PC with big heasting with fun on it. I'm using Ubuntu 5.04 image. cpufreq is reporting max freq 1540, but if I can set higher frequencies, only 1300 is set. How can I set higher frequencies on board?

 

Use loboris' images. We don't support that. It's a bit weird to choose a slow ARM board when you're looking for high performance :)

Link to comment
Share on other sites

Use loboris' images. We don't support that. It's a bit weird to choose a slow ARM board when you're looking for high performance :)

Wau...OK, I understand you. I don't looking for high performance, but why don't allow choice of higher frequencies, if it can run stable with proper cooling? Why I can't use full potential of board, if I have about 65sC at max CPU stress(with fan OFF) ?

 

I start using Opi-PC board also as second home computer now (switchable with Old RPI as Openelec multimedia center) and I'm waiting to S905 board (Odroid C2 or maybe android box? if will working Linux image), or nex gen S912 for this purpose(second PC). But now I don't have stronger little board and don't buy big HTPC at 5x bigger price for web, Openelec or GPIO hacking.

Link to comment
Share on other sites

I don't looking for high performance, but why don't allow choice of higher frequencies

 

What do you really expect if you try to increase max. cpufreq from 1296 to 1536 MHz? 18% more $something?

 

The important steps to get more 'real world' performance happen somewhere else. 'Work smarter not harder' applies not only to humans but also to the combination of hardware and software.

 

If you really just buy numbers then it's up to you to fork our repo and tweak this overclocking/overvolting stuff in both kernel sources and fex settings. Everything's documented (check loboris github repo) and you're free to do any harm to your device if you want :)

 

But please don't expect support from us. We're more interested in stability and ease of use than overclocking...

Link to comment
Share on other sites

Is it posible to provide a resolution for 1280*1024 for 4:3 Monitors as it is possible with loboris roms.

 

Not at the moment. These 'hacks' users in the OPi forums developed and adopted by loboris simply redefine one or two of the available HDMI modes to support 1024x768 or 1280x1024 in the kernel sources and then you would use 'h3disp -m2' for example to get 1280x1024.

 

A way more sane approach would be to port the tons of fixes the linux-sunxi community applied to Allwinner's kernel sources for A10/A20 already years ago (most importantly full EDID support) so this would be the way to go. Since you can easily check out the Armbian build system it's up to you to set up a virtual 64-bit Ubuntu 14.04 in Virtualbox on a PC, clone our repo, apply the patches to get 1280x1024 and then get back to us with patches and a full description so this might get included.

 

Please be aware that the majority of Armbian devs doesn't use HDMI at all since our use cases differ. And as already said: Instead of implementing a few more quick&dirty hacks it would make more sense to port the fixes from sun7i to sun8i (the 3.4.x kernel we're using on the Oranges now is literally hundreds of fixes behind the 3.4 kernel for A10/A20)

Link to comment
Share on other sites

I had a quick play with my OPI 2 and the image boots 1st time, then after the 2nd boot hangs. Quickly looking at the SD card shows it picked the orangepiplus.bin and didn't complete the fsresize, so I swapped that out for the orangepi2.bin, but still no boot. Did this a couple of times with different SD cards with the same result. Will look into it further today with the serial console.

Link to comment
Share on other sites

I had a quick play with my OPI 2 and the image boots 1st time, then after the 2nd boot hangs. Quickly looking at the SD card shows it picked the orangepiplus.bin and didn't complete the fsresize, so I swapped that out for the orangepi2.bin, but still no boot. Did this a couple of times with different SD cards with the same result. Will look into it further today with the serial console.

 

Thx! The issue should be fixed/workarounded with latest commits but feedback is welcome anyway. If you can deal with a serial console it might also be an idea to setup the Armbian build environment to follow development?

 

The Armbian build system makes it extremely easy to modify sources, eg. trying out to apply the patches made by @dni in Orange Pi forums to get 4:3 display resolutions simply put them in the 'userpatches' dir, recompile the kernel, adjust script.bin (or better use h3disp) and test whether it works.

Link to comment
Share on other sites

root@orangepione:~/MFRC522-python# python read.py

Card read UID: 193,11,21,149,74

 

I tried to follow this tutorial but I get now just

root@orangepipc:/usr/local/MFRC522-python# python read.py 
Traceback (most recent call last):
  File "read.py", line 1, in <module>
    import MFRC522
  File "/usr/local/MFRC522-python/MFRC522.py", line 1, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named RPi.GPIO

Installing that for RPi doesn't work:

root@orangepipc:/usr/local/MFRC522-python# python read.py 
Traceback (most recent call last):
  File "read.py", line 1, in <module>
    import MFRC522
  File "/usr/local/MFRC522-python/MFRC522.py", line 1, in <module>
    import RPi.GPIO as GPIO
RuntimeError: This module can only be run on a Raspberry Pi!

What's next? :)

Link to comment
Share on other sites

OK attached is the serial console output where it hangs.

 

Thx, but unfortunately you would've to increase the loglevel before:

sed -i 's/loglevel=1/loglevel=8/' /boot/boot.cmd
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

(to be done with adjusted paths on another machine of course). I already thought about to ship with a boot.scr with high verbosity to exchange this automatically after the 1st successful boot. But this is stuff we would've to discuss internally first.

Link to comment
Share on other sites

I tried to follow this tutorial but I get now just

root@orangepipc:/usr/local/MFRC522-python# python read.py 
Traceback (most recent call last):
  File "read.py", line 1, in <module>
    import MFRC522
  File "/usr/local/MFRC522-python/MFRC522.py", line 1, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named RPi.GPIO

Installing that for RPi doesn't work:

root@orangepipc:/usr/local/MFRC522-python# python read.py 
Traceback (most recent call last):
  File "read.py", line 1, in <module>
    import MFRC522
  File "/usr/local/MFRC522-python/MFRC522.py", line 1, in <module>
    c
RuntimeError: This module can only be run on a Raspberry Pi!

What's next? :)

 

my bad ...  replace the reference  import RPi.GPIO as GPIO with   import pyA20.gpio as GPIO in MFRC522.py 

 

MFRC522-python package use RPi.GPIO and we are replacing it with orangepi_PC_gpio_pyH3 (pA20.gpio ).

Link to comment
Share on other sites

my bad ...  replace the reference  import RPi.GPIO as GPIO with   import pyA20.gpio as GPIO in MFRC522.py 

 

MFRC522-python package use RPi.GPIO and we are replacing it with orangepi_PC_gpio_pyH3 (pA20.gpio ).

you need to remove  RPi.GPIO if installed .

Link to comment
Share on other sites

Thx, but unfortunately you would've to increase the loglevel before:

sed -i 's/loglevel=1/loglevel=8/' /boot/boot.cmd
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

(to be done with adjusted paths on another machine of course). I already thought about to ship with a boot.scr with high verbosity to exchange this automatically after the 1st successful boot. But this is stuff we would've to discuss internally first.

 

Well I am up and running 4th attempt with manual resizing of the SD card and copying across of script.bin. Not sure what was going on there !

Link to comment
Share on other sites

my bad ...  replace the reference  import RPi.GPIO as GPIO with import pyA20.gpio as GPIO in MFRC522.py 

 

MFRC522-python package use RPi.GPIO and we are replacing it with orangepi_PC_gpio_pyH3 (pA20.gpio ).

 

Ok, so a fifth line has also be patched. Now it's working:

 

 

root@orangepipc:/usr/local/MFRC522-python# python read.py 
Card detected
Card read UID: 214,103,187,45,39
wrong Card
Card detected
Card read UID: 214,103,187,45,39
wrong Card
Card detected
Card read UID: 214,103,187,45,39
wrong Card
Card detected
Card read UID: 214,103,187,45,39
wrong Card
Card detected
Card read UID: 214,103,187,45,39
wrong Card
Card detected
Card read UID: 214,103,187,45,39
wrong Card
Card read UID: 214,103,187,45,39
wrong Card
Card detected
Card read UID: 214,103,187,45,39
wrong Card
^CCtrl+C captured, ending read.
Traceback (most recent call last):
  File "read.py", line 20, in <module>
    (status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)
  File "/usr/local/MFRC522-python/MFRC522.py", line 218, in MFRC522_Request
    (status,backData,backBits) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE, TagType)
  File "/usr/local/MFRC522-python/MFRC522.py", line 173, in MFRC522_ToCard
    n = self.Read_MFRC522(self.CommIrqReg)
  File "/usr/local/MFRC522-python/MFRC522.py", line 120, in Read_MFRC522
    val = spi.transfer((((addr<<1)&0x7E) | 0x80,0))
  File "read.py", line 15, in end_read
    MIFAREReader.GPIO_CLEEN()
  File "/usr/local/MFRC522-python/MFRC522.py", line 371, in GPIO_CLEEN
    GPIO.cleanup() 
AttributeError: 'module' object has no attribute 'cleanup' 

 

 

 

It would be great if you could add a tutorial in the H3 subforum! :)

 

In case you've no pictures feel free to take them from http://kaiser-edv.de/tmp/8K2oWB/ (but mention that this is the Orange Pi One where the GPIO header is rotated by 180° and please upload them to the forum since they will disappear from my server sooner or later. And please prefix the title with "[Tutorial] " and use the 'code' styling element and maybe also spoiler as above to show the patched version of MFRC522.py)

 

Now i just have to figure out how to deal with python so that it syncs writes to stdout when redirected into a file since I want to use something like this as a daemon

python /usr/local/MFRC522-python/read.py >/var/log/rfid.log 2>&1 & 

and another process that gets notified when contents of rfid.log change will then do the post-processing.

 

EDIT: Hmm CPU utilisation is rather high when using MFRC522-python/read.py? Most of this spent in %sys and generating a huge amount of IRQs:

root@orangepipc:~# grep spi0 /proc/interrupts 
 97:    3052691          0          0          0       GIC  spi0
root@orangepipc:~# uptime
 12:59:13 up 5 min,  2 users,  load average: 1.90, 1.20, 0.53

As soon as i stop read.py IRQ generation stops too. That seems wrong to me. I just tried out https://github.com/mxgxw/MFRC522-pythonand here it's even worse (more IRQs generated and more CPU load) which is a good sign on the other hand since by diffing through the code maybe we're able to find the culprit or can insert delays or something like that...

 

EDIT 2: Note to myself: If there's no easy way to fix the software, then use hardware to fix it. Only start read.py when motion is detected (using a PIR sensor)

Link to comment
Share on other sites

Not at the moment. These 'hacks' users in the OPi forums developed and adopted by loboris simply redefine one or two of the available HDMI modes to support 1024x768 or 1280x1024 in the kernel sources and then you would use 'h3disp -m2' for example to get 1280x1024.

 

A way more sane approach would be to port the tons of fixes the linux-sunxi community applied to Allwinner's kernel sources for A10/A20 already years ago (most importantly full EDID support) so this would be the way to go. Since you can easily check out the Armbian build system it's up to you to set up a virtual 64-bit Ubuntu 14.04 in Virtualbox on a PC, clone our repo, apply the patches to get 1280x1024 and then get back to us with patches and a full description so this might get included.

 

Please be aware that the majority of Armbian devs doesn't use HDMI at all since our use cases differ. And as already said: Instead of implementing a few more quick&dirty hacks it would make more sense to port the fixes from sun7i to sun8i (the 3.4.x kernel we're using on the Oranges now is literally hundreds of fixes behind the 3.4 kernel for A10/A20)

 

I'm not sure how much porting all fixes and improvements would help. Display Engine and HDMI controller HW are not the same as on A10 and A20. EDID improvements would help only with automatic selection of most appropriate mode for attached monitor and not adding special mode for it as far as I understand. Even HDMI driver for mainline kernel was not accepted because people didn't know what exactly driver is doing and problematic copyright issues. Actually, there is no documentation about HDMI controller on H3. So any modification you do to support additional mode is educated guess at best.

 

Correct me if I'm wrong, but I afraid I'm not.

 

BTW: Actually it is better to add modes, not modify them. This way we can be sure that we are at least compatible with other images.

Link to comment
Share on other sites

I don't think that you need to install SPI-Py Library, since the orangepi_PC_gpio_pyH3 Library has already a SPI interface.

i missed that ... let me try the spi library of orangepi_PC_gpio_pyH3

Link to comment
Share on other sites

I've already done some I2C tests on port TWI1, and it is working fine. I was using python library orangepi_PC_gpio_pyH3-master. I will try the same on TWI0 when I get the chance.

About SY8106, I've look at the schematic and it seems to be hook up on another port, the PL00 and PL01 pins, which seems to be defined in FEX as follow :

[s_rsb0]
s_rsb_used = 1
s_rsb_sck = port:PL00<2><1><2><default>
s_rsb_sda = port:PL01<2><1><2><default>

But I don't know how to access them. Is RSB other kind of Kernel driver ? Maybe we need to copy/paste an existing TWI and tweak it to use those 2 pins, I'm really not a FEX expert ... :(

 

SPI ? I've never tried it under Linux, but I will do, but need to learn about it first, although I know SPI under smaller MCU such STM32. I've several devices to try such SPI Flash or LCD.

 

EDIT : TWI0 is also working fine.

 

EDIT2 : doing some search about RSB, I've found that means "Reduced Serial Bus", and there are commits about it in linux-vanilla/v4.4.1/drivers/bus/sunxi-rsb.c, but nothing in legacy 3.4.

I've also seen some posts/commits in Mainline about "drivers/i2c/busses/i2c-sunxi-rsb.c"

 

I have successfully tested i2c on Armbian 5.04 with RTC 3231 module

Device used : RTC DS3231

 

Here is the quick steps.

 

1. Using out of the box OS settings. 

    Connecting RTC to OPO

            DS3231                                     OP One

             GND ——————————>    pin 06  (GND)

             Vcc ——————————>       pin 01 (3.3V)

             SDA ——————————>     pin 03 (I2C SDA)

             SCL ——————————>       pin 05 (I2C SCL)

2. List i2c adapter

 root@orangepione:/boot# i2cdetect -l

  i2c-0   i2c             twi0                                    I2C adapter

  i2c-1   i2c             twi1                                    I2C adapter

 

3. DS3231 present at address 0x68 on twi0 adapter     

                       

root@orangepione:/boot#  i2cdetect -y 0

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

 

root@orangepione:/boot# 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: -- -- -- -- -- -- -- --

 

4. OS time synchronization over NTP ( OS Default)

     root@orangepione:/boot# date

        Tue Mar  1 20:50:24 CET 2016

 

5. Add ds3231 to system.

Add "echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-0/new_device "  to /etc/rc.local before exit 0

 

6. root@orangepione:/boot# reboot

 

 

7. UU confirm RTC module is active and ready to use.

root@orangepione:~#  i2cdetect -y 0

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

 

8. Read time in RTC module

root@orangepione:~# hwclock -r

Thu 01 Jan 1970 01:32:46 AM CET  -1.181072 seconds

 

9.Date will show current time of OS which is sync over internet

root@orangepione:~# date

Tue Mar  1 20:57:48 CET 2016

 

10. Let write time to  RTC

root@orangepione:~# hwclock -w

root@orangepione:~# date

Tue Mar  1 20:58:33 CET 2016

 

11. Now read the RTC time again

root@orangepione:~# hwclock -r

Tue 01 Mar 2016 08:58:47 PM CET  -1.362583 seconds

 

 

To sync OPO time after startup add "hwclock -s " to /etc/ec.local after "echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-0/new_device "

Link to comment
Share on other sites

Good evening,

 

I am just providing some feedback about orange pi 2:

 

Used git commit: b3489368eededc025d343fd220b022ca08f52338, compiled into ubuntu desktop

orange pi 2 detection: orange pi 2 mini (on Orange pi 2 h3 hardware) - works well

no errors when reboot, boot to desktop without problems (small overscan on my TV - no problem at all). I was also able to enable audio over hdmi.

Wi-Fi works well, system seems to be stable.

 

Thank You for great work.

 

Can I help with something - send logs, make some tests before new version release etc?

 

Have a nice day.

 

JK

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines