olivluca

Members
  • Content Count

    118
  • Joined

  • Last visited

 Content Type 

Forums

Member Map

Store

Crowdfunding

Raffles

Applications

Calendar

Everything posted by olivluca

  1. I don't know if the CSI connector on the pi zero plus 2 is the same as the pi pc, it seems so but one never knows. OTOH the gc2035 driver in armbian has several issues (search the forum for gc2035). I'm using an older version of the driver (which has a different set of issues but it works better here).
  2. FWIW I had the same kind of error after my RCCB tripped 5 times in a row in a few minutes. The strange thing is, the error didn't happen until the next day when I restarted a daemon, and cutting power again has apparently fixed it
  3. Try this instead: SUBSYSTEM=="gpio", ACTION=="add", RUN="/bin/sh -c '\ chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ chown -R root:gpio /sys$DEVPATH && chmod -R 770 /sys$DEVPATH\ '"
  4. I compiled the module from here https://github.com/avafinger/gc2035 (gc2035.c, without trying to apply the patch in the same repository) and it works much better than the one included in armbian (though it has other quirks, see below). I tried many of the advertised resolutions and they all work: 640 x 480 (flipped horizontally) 800x600 (ok) 1280x720 (slightly washed up) 1600x1200 (too much for motion) Let's see if it lasts or if it causes more problems, but if nobody is going to fix the current driver I propose to revert to the older one.
  5. Any news/hint on this issue? (fswebcam-gc2035 does the same)
  6. FWIW this is my 99-gpio.rules, I use RUN instead of PROGRAM because, according to this document I'm using it on an OPi PC with legacy kernel, you can omit the echo line, it's there just for debugging purposes SUBSYSTEM=="gpio", ACTION=="add", RUN="/bin/sh -c '\ echo $DEVPATH >> /tmp/pippo;\ chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ chown -R root:gpio /sys$DEVPATH && chmod -R 770 /sys$DEVPATH\ '" As I mentioned elsewhere,I had to patch the python library I use because the change of ownership is asynchronous.
  7. AFAIK drive level refers to the current that a gpio configured as output can supply, unfortunately I don't remember where I read it and cannot find the documentation right now.
  8. You can buy from aliexpress, shipments to Spain lately are reasonably fast (2/3 weeks)
  9. It turns out that after a few hours of running motion the captured image have a green tint (not like the above sample at 1600x1200, just a normal image with almost no red-blue components). Since I'm using the beta repository I though it was a problem of the kernel of the day, in fact updating and rebooting solved the issue. It turns out that's enough to stop and start motion to get a normally coloured image. Do you think it's an hardware or driver issue?
  10. You could resize the partition with gparted, but I don't know if is there an equivalent that runs under windows.
  11. I made my previous tests using an headphone, now, connected to an amplifier and speakers, the effect is much less pronounced. One channel still bleeds into the other but I think it is usable for my purpose.
  12. Strangely enough the IOCTL interface works (strange because, looking at the source of sunxi_wdt in theory either writing to the device or using the ioctl should trigger the same function watchdog_kick) import time import fcntl f=open('/dev/watchdog','w') try: while True: time.sleep(1) print '.' fcntl.ioctl(f,0x80045705) #WDIOC_KEEPALIVE except KeyboardInterrupt: print 'end' f.write('V') f.close()
  13. I have a different problem: I'm trying to ping /dev/watchdog directly, without using the watchdog package. The problem is that the watchdog resets the board (opi pc, legacy kernel) even if I keep writing to /dev/watchdog. If I write the magic char 'V' to /dev/watchdog before the timeout expires then it doesn't reset (and that's ok). This is the test python script I'm using, I'm using chr(0) because that's what the sample program does, but anything (except 'V' for obvious reasons) should work: import time f=open('/dev/watchdog','w') try: while True: time.sleep(1) print '.' f.write(chr(0)) except KeyboardInterrupt: print 'end' f.write('V') f.close()
  14. Found it, the csi interface isn't supported in mainline kernel
  15. Today I tried mainline kernel but there's no gc2035 module there. Is it so or did I miss something?
  16. This patch solves it for me (Edit but I think there should be a better way) diff --git a/OPi/GPIO.py b/OPi/GPIO.py index 775134e..aa8e77b 100644 --- a/OPi/GPIO.py +++ b/OPi/GPIO.py @@ -239,6 +239,7 @@ Methods """ import warnings +import time from OPi.constants import IN, OUT from OPi.constants import LOW, HIGH # noqa: F401 @@ -358,6 +359,7 @@ def setup(channel, direction, initial=None, pull_up_down=None): else: raise e + time.sleep(0.1) sysfs.direction(pin, direction) _exports[channel] = direction if direction == OUT and initial is not None:
  17. On my orangepi pc (legacy kernel) I'm trying to using separately the left and right channel as two separate sound cards (to be used by two different programs). I have a working asoundrc for that, but the problem is that the left channel leaks into the right one and viceversa. They also do the same on my laptop, but there it's hardly noticeable. It's not a matter of my asounrc, I confirmed it also with speaker-test. I suppose it's a hardware issue, right? BTW the right and left channel are inverted (and that could be a driver issue). This is the my asoundrc, the !default line is because one of the two programs is linphone and I couldn't find a way to make it use a named, virtual, soundcard. pcm.my_card { type hw card 0 } pcm.my_card_dmix { type dmix ipc_key 1024 ipc_key_add_uid 1 ipc_perm 0666 slave { pcm "my_card" channels 2 } bindings { 0 0 1 1 } } pcm.mono_zone1 { type plug slave { pcm "my_card_dmix" channels 2 } ttable.0.0 1 } pcm.!default { type plug slave { pcm "my_card_dmix" channels 2 } ttable.0.1 1 }
  18. And file ownership should also be fixed # dpkg -L linux-xenial-root-orangepipc | xargs ls -n | grep '1001 1001' ls: cannot access '/etc/update-motd.d/99-point-to-faq': No such file or directory ls: cannot access 'package': No such file or directory ls: cannot access 'diverts': No such file or directory ls: cannot access 'others': No such file or directory ls: cannot access 'to:': No such file or directory ls: cannot access '/etc/mpv/mpv-dist.conf': No such file or directory -rw-r--r-- 1 1001 1001 56 Aug 1 15:17 /etc/apt/apt.conf.d/71-no-recommends -rwxr-xr-x 1 1001 1001 36 Aug 1 15:17 /etc/cron.daily/log2ram -rw-r--r-- 1 1001 1001 83 Aug 1 15:17 /etc/cron.d/armbian-updates -rw-r--r-- 1 1001 1001 156 Aug 1 15:17 /etc/default/armbian-motd.dpkg-dist -rw-r--r-- 1 1001 1001 280 Aug 1 15:17 /etc/default/log2ram.dpkg-dist -rwxr-xr-x 1 1001 1001 308 Aug 1 15:17 /etc/initramfs/post-update.d/99-uboot -rwxr-xr-x 1 1001 1001 1022 Aug 1 15:17 /etc/kernel/preinst.d/initramfs-cleanup -rw-r--r-- 1 1001 1001 525 Aug 1 15:17 /etc/network/interfaces.bonding -rw-r--r-- 1 1001 1001 1028 Sep 10 12:16 /etc/network/interfaces.default -rw-r--r-- 1 1001 1001 280 Aug 1 15:17 /etc/network/interfaces.espressobin -rw-r--r-- 1 1001 1001 197 Aug 1 15:17 /etc/network/interfaces.hostapd -rw-r--r-- 1 1001 1001 218 Aug 1 15:17 /etc/network/interfaces.network-manager -rw-r--r-- 1 1001 1001 495 Aug 1 15:17 /etc/network/interfaces.r1 -rw-r--r-- 1 1001 1001 610 Aug 1 15:17 /etc/network/interfaces.r1router -rw-r--r-- 1 1001 1001 359 Aug 1 15:17 /etc/network/interfaces.r1switch -rw-r--r-- 1 1001 1001 212 Aug 1 15:17 /etc/profile.d/check_first_login_reboot.sh -rw-r--r-- 1 1001 1001 174 Aug 1 15:17 /etc/profile.d/ssh-title.sh -rw-r--r-- 1 1001 1001 217 Aug 1 15:17 /etc/X11/xorg.conf.d/01-armbian-defaults.conf -rw-r--r-- 1 1001 1001 384 Aug 1 15:17 /lib/systemd/system/firstrun.service -rw-r--r-- 1 1001 1001 30 Aug 1 15:17 /lib/systemd/system/getty@tty1.service.d/10-noclear.conf -rw-r--r-- 1 1001 1001 448 Aug 1 15:17 /lib/systemd/system/log2ram.service -rw-r--r-- 1 1001 1001 426 Aug 1 15:17 /lib/systemd/system/resize2fs.service -rw-r--r-- 1 1001 1001 33 Aug 1 15:17 /lib/systemd/system/serial-getty@.service.d/10-term.conf -rw-r--r-- 1 1001 1001 28 Aug 1 15:17 /lib/systemd/system/systemd-modules-load.service.d/10-timeout.conf -rw-r--r-- 1 1001 1001 287 Aug 1 15:17 /lib/udev/rules.d/71-axp-power-button.rules -rwxr-xr-x 1 1001 1001 3783 Aug 1 15:17 /usr/lib/armbian/apt-updates -rw-r--r-- 1 1001 1001 84132 Aug 1 15:17 /usr/lib/nand-sata-install/a10/bootloader/boot.axf -rw-r--r-- 1 1001 1001 126 Aug 1 15:17 /usr/lib/nand-sata-install/a10/bootloader/boot.ini -rw-r--r-- 1 1001 1001 146 Aug 1 15:17 /usr/lib/nand-sata-install/a10/bootloader/linux/linux.ini -rw-r--r-- 1 1001 1001 321016 Aug 1 15:17 /usr/lib/nand-sata-install/a10/bootloader/u-boot.bin -rw-r--r-- 1 1001 1001 118912 Aug 1 15:17 /usr/lib/nand-sata-install/a20/bootloader/boot.axf -rw-r--r-- 1 1001 1001 91 Aug 1 15:17 /usr/lib/nand-sata-install/a20/bootloader/boot.ini -rw-r--r-- 1 1001 1001 152 Aug 1 15:17 /usr/lib/nand-sata-install/a20/bootloader/linux/linux.ini -rw-r--r-- 1 1001 1001 309228 Aug 1 15:17 /usr/lib/nand-sata-install/a20/bootloader/linux/u-boot.bin -rw-r--r-- 1 1001 1001 60 Aug 1 15:17 /usr/lib/nand-sata-install/exclude.txt -rwxr-xr-x 1 1001 1001 1458 Aug 1 15:17 /usr/sbin/log2ram -rw-r--r-- 1 1001 1001 1067 Aug 1 15:17 /usr/share/log2ram/LICENSE -rw-r--r-- 1 1001 1001 56 Aug 1 15:17 71-no-recommends -rw-r--r-- 1 1001 1001 83 Aug 1 15:17 armbian-updates -rwxr-xr-x 1 1001 1001 36 Aug 1 15:17 log2ram -rw-r--r-- 1 1001 1001 156 Aug 1 15:17 armbian-motd.dpkg-dist -rw-r--r-- 1 1001 1001 280 Aug 1 15:17 log2ram.dpkg-dist -rwxr-xr-x 1 1001 1001 308 Aug 1 15:17 99-uboot -rwxr-xr-x 1 1001 1001 1022 Aug 1 15:17 initramfs-cleanup -rw-r--r-- 1 1001 1001 525 Aug 1 15:17 interfaces.bonding -rw-r--r-- 1 1001 1001 1028 Sep 10 12:16 interfaces.default -rw-r--r-- 1 1001 1001 280 Aug 1 15:17 interfaces.espressobin -rw-r--r-- 1 1001 1001 197 Aug 1 15:17 interfaces.hostapd -rw-r--r-- 1 1001 1001 218 Aug 1 15:17 interfaces.network-manager -rw-r--r-- 1 1001 1001 495 Aug 1 15:17 interfaces.r1 -rw-r--r-- 1 1001 1001 610 Aug 1 15:17 interfaces.r1router -rw-r--r-- 1 1001 1001 359 Aug 1 15:17 interfaces.r1switch -rw-r--r-- 1 1001 1001 212 Aug 1 15:17 check_first_login_reboot.sh -rw-r--r-- 1 1001 1001 174 Aug 1 15:17 ssh-title.sh -rw-r--r-- 1 1001 1001 217 Aug 1 15:17 01-armbian-defaults.conf -rw-r--r-- 1 1001 1001 384 Aug 1 15:17 firstrun.service drwxr-xr-x 2 1001 1001 4096 Sep 11 12:49 getty@tty1.service.d -rw-r--r-- 1 1001 1001 448 Aug 1 15:17 log2ram.service -rw-r--r-- 1 1001 1001 426 Aug 1 15:17 resize2fs.service drwxr-xr-x 2 1001 1001 4096 Sep 11 12:49 serial-getty@.service.d drwxr-xr-x 2 1001 1001 4096 Sep 11 12:49 systemd-modules-load.service.d -rw-r--r-- 1 1001 1001 30 Aug 1 15:17 10-noclear.conf -rw-r--r-- 1 1001 1001 33 Aug 1 15:17 10-term.conf -rw-r--r-- 1 1001 1001 28 Aug 1 15:17 10-timeout.conf -rw-r--r-- 1 1001 1001 287 Aug 1 15:17 71-axp-power-button.rules -rwxr-xr-x 1 1001 1001 3783 Aug 1 15:17 apt-updates -rw-r--r-- 1 1001 1001 60 Aug 1 15:17 exclude.txt -rw-r--r-- 1 1001 1001 84132 Aug 1 15:17 boot.axf -rw-r--r-- 1 1001 1001 126 Aug 1 15:17 boot.ini -rw-r--r-- 1 1001 1001 321016 Aug 1 15:17 u-boot.bin -rw-r--r-- 1 1001 1001 146 Aug 1 15:17 linux.ini -rw-r--r-- 1 1001 1001 118912 Aug 1 15:17 boot.axf -rw-r--r-- 1 1001 1001 91 Aug 1 15:17 boot.ini -rw-r--r-- 1 1001 1001 152 Aug 1 15:17 linux.ini -rw-r--r-- 1 1001 1001 309228 Aug 1 15:17 u-boot.bin -rwxr-xr-x 1 1001 1001 1458 Aug 1 15:17 log2ram -rw-r--r-- 1 1001 1001 1067 Aug 1 15:17 LICENSE
  19. I'm not too familiar with deb packaging, but maybe just using the same condition as the line above it would be enough: [ remove = "$1" ] || [ abort-install = "$1" ] &&
  20. There's this line in the postrm of linux-xenial-root-orangepipc systemctl disable log2ram.service armhwinfo.service >/dev/null 2>&1 but I don't think the postrm is called on upgrade, is it? Edit: yes it does
  21. I just ran apt-upgrade Start-Date: 2017-09-11 12:44:53 Commandline: apt upgrade Requested-By: luca (1000) Upgrade: linux-image-sun8i:armhf (5.32.170901, 5.32.170911), linux-headers-sun8i:armhf (5.32.170901, 5.32.170911), linux-u-boot-orangepipc-default:armhf (5.32.170901, 5.32.170911), sunxi-tools:armhf (1.4.2-1~armbian5.32.170901+1, 1.4.2-1~armbian5.32.170911+1), hostapd:armhf (1:2.5~armbian5.32.170901+1, 1:2.5~armbian5.32.170911+1), linux-xenial-root-orangepipc:armhf (5.32.170901, 5.32.170911), linux-firmware:armhf (1.157.11, 1.157.12) End-Date: 2017-09-11 12:52:25 and it disabled the log2ram service (I'll investigate which package did it). BTW, I found out why I enabled the beta repository
  22. I'm getting weird results with motion: If I set 800x600 the image is OK but flipped horizontally If I set 640x480 the image is OK if I set 1600x1200 this is what I get:
  23. Thank you. Oh, well, the damage is done already.