Jump to content

olivluca

Members
  • Posts

    125
  • Joined

  • Last visited

Posts posted by olivluca


  1. In case it is useful for somebody else, I put the source and the module here: https://drive.google.com/open?id=1KM3AFoSJCpJ0RpafeKRmH8iZWr3waQlH

    There you'll find the binary module (I compiled for my current kernel which is 3.4.113-sun8i #68) and the tar.gz with the source I used to compile it.

    It's just the files from github (in the "device" directory), I added a Makefile and the files from the drivers/media/video/sunxi-vfe in the original kernel source (taken from the linux-source-default-sun8i_5.60_all.deb package...well, actually I don't remember where I took those files, but I have compared them to the one provided in the deb and they are the same).

    To compile it just cd to the device directory and issue a make (provided you have the linux-headers package installed for the current kernel, but IIRC that's installed by default in armbian).

    I don't understand why armbian supplies a worse implementation of the gc2035 module but since I can use the good (or at least not so bad) one I don't care.

  2. For me the version on github works better than the version included with armbian:

     

    On 3/29/2018 at 8:04 PM, olivluca said:

    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.

     

  3. On 9/2/2018 at 5:57 PM, jps said:

    Excuse my clumsiness, but I don't know what to do with the files in https://github.com/avafinger/gc2035

     

    To compile it as an out of tree module I had to borrow some files from the full kernel source (I don't remember the details though, it's been a while). However

     

     

    On 9/2/2018 at 5:57 PM, jps said:

    .. i can not make the camera work in last Armbian. Thanks any help...

     

    if by latest armbian you mean the one based on the 4.x kernel, I don't think it has the required csi driver.

  4. On 6/2/2018 at 3:00 AM, maxim26 said:

    I'm trying to launch a gc2035 camera on my 4.14.18-sunxi OrangePi PC, but i can't find gc2035 using modprobe

     

    It's been discussed before: mainline kernel has no support for the CSI interface that the camera uses. If you want to use the camera you have to use legacy kernel.

  5. 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).

  6. 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.

     

  7. FWIW this is my 99-gpio.rules, I use RUN instead of PROGRAM because, according to this document

    Quote

    Do not confuse this with the PROGRAM functionality described above. PROGRAM is used for running programs which produce device names (and they shouldn't do anything other than that). When those programs are being executed, the device node has not yet been created, so acting upon the device in any way is not possible.

     

    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.

  8. 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?

  9. 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()

     

     

     

     

  10. 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()

     

     

  11. 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:

     

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines