ottokiksmaler / nx500_nx1_modding

Samsung NX500 and NX1 Modding
GNU Affero General Public License v3.0
123 stars 42 forks source link

Interval capture never less than 2.3 seconds ? #77

Closed PhilZMZ closed 7 years ago

PhilZMZ commented 7 years ago

NX500 lets you set an interval capture time between 1s and 24h. But I don’t know why, interval time can never be less about 2.3 seconds - athough I set it to 1 s - even with superfast memory cards and very small photos (2Mpix) in the lighest mode (normal). You get about the same time with 28MPix raw files (about 40MB). So it is not a buffer issue... It would be very important to me if you could fix this issue, because I need a rate faster than 2.3s and I must use an external remote, which is not very convenient because the camera is used on a drone. Hope you can make something, would be glad to help you if I could, but I have no idea how I can do this…

Best regards from France, Phil

ottokiksmaler commented 7 years ago

How much faster are we talking about?

PhilZMZ commented 7 years ago

Thanks for the message, ottokiksmaler ;-) As faster as possible. Exposure time is over 1/800s. I tried with an external timer, 1s is too short to record the file, 2s enough, but I can't try between 1 and 2 seconds. I think between 1.5 and 2 seconds would be perfect. If I could know where to change a parameter, it would be great, I could try several values, like 1.6, 1.7, 1.8s...

ottokiksmaler commented 7 years ago

Is your camera hacked?

PhilZMZ commented 7 years ago

Not yet, but I can do it !

ottokiksmaler commented 7 years ago

I did some tests, fastest I can get is around 1s, but it fluctuates a lot, at 1.2s it's quite stable with a fast card (or smaller file sizes).

PhilZMZ commented 7 years ago

Great !!! How can I test, Otto ?

ottokiksmaler commented 7 years ago

Do you know you way around linux/bash/etc?

If yes: https://github.com/ottokiksmaler/nx500_nx1_modding/blob/master/Testing%20programs%20-%20HOWTO.md

ottokiksmaler commented 7 years ago

So, hack the camera, copy this file to SD card root directory as stapp (https://github.com/ottokiksmaler/nx500_nx1_modding/blob/dev/stapp?raw=true), put SD in camera, power on the camera, start telnet, telnet to camera and do:

/mnt/mmc/stapp "app nx capture single"

It should take a photo (you can also turn on silent shutter in order to preserve the shutter). If it works, try this:

/mnt/mmc/stapp "app nx capture single"; sleep 1.2;/mnt/mmc/stapp "app nx capture single"; sleep 1.2;/mnt/mmc/stapp "app nx capture single"; sleep 1.2;/mnt/mmc/stapp "app nx capture single"; sleep 1.2;/mnt/mmc/stapp "app nx capture single"; sleep 1.2;

or

for i in `seq 1 10`; do /mnt/mmc/stapp "app nx capture single"; sleep 1.2; done

This should take a sequence of images and allow you to relatively finely tune the delay between photos. For test you could take a sequence of photos of a stopwatch on you cellphone or similar.

PhilZMZ commented 7 years ago

Thanks a lot, I try this afternoon and tell you.

Do I need to be under linux environment to make this ?

My knownledge of Linux is very poor, but I will try. If I don't succeed, I call a neighbour who is much better than me :-)

Thanks for sharing your knowledge, Otto !

ottokiksmaler commented 7 years ago

No Linux needed on your PC, Linux is on the camera :)

PhilZMZ commented 7 years ago

Sorry Otto, I am afraid I need a little bit more help.... I have hacked the NX500 with last version I turn on wifi, connect to the box, launch Telnet I start Putty, enter 192.168.1.13 port 22 (default) Check "telnet" click open. After a few seconds I get the message


Then I type "/mnt/mmc/stapp "app nx capture single" I have to wait for about 20-30 seconds before I can see this text (when it is displayed...) And nothing happens, no photo is taken...

Maybe I am wrong somewhere... but where ? Any idea ?

ottokiksmaler commented 7 years ago

That's weird, you should have no issues whatsoever with accessing the camera via telnet. Could you type dmesg On the command line and post the last twenty-ish lines here? And exact network error you get.

ottokiksmaler commented 7 years ago

Also try from command line st app nx capture single

PhilZMZ commented 7 years ago

Hi Otto, Sorry for the late answer too busy these days...

I have tried with several NX500, always the same problem : the communication between the PC and the camera via wifi / Telnet always crashes, I don't know why. I never could take a picture with the command line. As you requested, you will find at the bottom of this messages all the lines after typing dmesg.

I think 1.5 s should work well, I don't know if you could add this to the hack ? Or add several values in the intervall settings under 2s, as 1.2s, 1.3s, 1.4s... until 1,9s

The error I get is : Network error : Software caused connection abort putty fatal error


drime5 login: root [root@drime5 ~]# dmesg [ 0: 0.000000] I/KERNEL (K 0): Booting Linux on physical CPU 0 [ 0: 0.000000] I/KERNEL (K 0): Initializing cgroup subsys cpu [ 0: 0.000000] I/KERNEL (K 0): Linux version 3.5.0 (hs2704.sung@SWDA7 604) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #7 PREEMPT Wed Jun 3 14 :40:29 KST 2015 [ 0: 0.000000] I/KERNEL (K 0): CPU: ARMv7 Processor [414fc091] revisi on 1 (ARMv7), cr=10c53c7d [ 0: 0.000000] I/KERNEL (K 0): CPU: PIPT / VIPT nonaliasing data cach e, VIPT aliasing instruction cache [ 0: 0.000000] I/KERNEL (K 0): Machine: Samsung-DRIMe5-ES [ 0: 0.000000] I/KERNEL (K 0): cma: CMA: reserved 288 MiB at 94000000 [ 0: 0.000000] I/KERNEL (K 0): cma: CMA: reserved 72 MiB at 8f800000 [ 0: 0.000000] I/KERNEL (K 0): Memory policy: ECC disabled, Data cach e writeback [ 0: 0.980889] I/KERNEL (K 0): On node 0 totalpages: 131072 [ 0: 0.991051] I/KERNEL (K 0): free_area_init_node: node 0, pgdat c07 26dc0, node_mem_map c075a000 [ 0: 0.991061] I/KERNEL (K 0): Normal zone: 1024 pages used for mem map [ 0: 0.991067] I/KERNEL (K 0): Normal zone: 0 pages reserved [ 0: 0.991076] I/KERNEL (K 0): Normal zone: 130048 pages, LIFO batc h:31 [ 0: 1.033760] I/KERNEL (K 0): L310 cache controller enabled [ 0: 1.033777] I/KERNEL (K 0): l2x0: 16 ways, CACHE_ID 0x4100fcc8, AU X_CTRL 0x40030001, Cache size: 262144 B [ 0: 1.033876] I/KERNEL (K 0): pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0: 1.033888] I/KERNEL (K 0): pcpu-alloc: [0] 0 [ 0: 1.033903] I/KERNEL (K 0): Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 [ 0: 1.033912] I/KERNEL (K 0): Kernel command line: console=ttyAMA0,115200n8 mem=512M hibernate=nocompress root=/dev/mmcblk0p10 rw rootfstype=ext4 rootwait noresume user_debug=255 [ 0: 1.034068] I/KERNEL (K 0): PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0: 1.034525] I/KERNEL (K 0): Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0: 1.035186] I/KERNEL (K 0): Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0: 1.059319] I/KERNEL (K 0): Memory: 512MB = 512MB total [ 0: 1.059325] I/KERNEL (K 0): Memory: 142828k/142828k available, 381460k reserved, 0K highmem [ 0: 1.059355] I/KERNEL (K 0): Virtual kernel memory layout: [ 0: 1.059355] I/KERNEL (K 0): vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0: 1.059355] I/KERNEL (K 0): fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0: 1.059355] I/KERNEL (K 0): vmalloc : 0xe0800000 - 0xff000000 ( 488 MB) [ 0: 1.059355] I/KERNEL (K 0): lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) [ 0: 1.059355] I/KERNEL (K 0): modules : 0xbf000000 - 0xc0000000 ( 16 MB) [ 0: 1.059355] I/KERNEL (K 0): .text : 0xc0008000 - 0xc06c3fb8 (6896 kB) [ 0: 1.059355] I/KERNEL (K 0): .init : 0xc06c4000 - 0xc06e0d2c ( 116 kB) [ 0: 1.059355] I/KERNEL (K 0): .data : 0xc06e2000 - 0xc0728b98 ( 283 kB) [ 0: 1.059355] I/KERNEL (K 0): .bss : 0xc0728bbc - 0xc0759850 ( 196 kB) [ 0: 1.059490] I/KERNEL (K 0): SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0: 1.059570] I/KERNEL (K 0): NR_IRQS:368 [ 0: 1.061400] I/KERNEL (K 0): sched_clock: 16 bits at 2kHz, resolution 400000ns, wraps every 26214ms [ 0: 1.061512] I/KERNEL (K 0): Console: colour dummy device 80x30 [ 0: 1.151465] I/KERNEL (K 0): Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816) [ 0: 1.151471] I/KERNEL (K 0): pid_max: default: 4096 minimum: 301 [ 0: 1.151605] I/KERNEL (K 0): Security Framework initialized [ 0: 1.151651] I/KERNEL (K 0): Mount-cache hash table entries: 512 [ 0: 1.152132] I/KERNEL (K 0): Initializing cgroup subsys cpuacct [ 0: 1.152149] I/KERNEL (K 0): Initializing cgroup subsys devices [ 0: 1.152158] I/KERNEL (K 0): Initializing cgroup subsys freezer [ 0: 1.152165] I/KERNEL (K 0): Initializing cgroup subsys blkio [ 0: 1.152235] I/KERNEL (K 0): CPU: Testing write buffer coherency: ok [ 0: 1.152403] I/KERNEL (K 1): Setting up static identity map for 0x8640a110 - 0x8640a168 [ 0: 1.153007] I/KERNEL (K 1): devtmpfs: initialized [ 0: 1.154313] I/KERNEL (K 1): dummy: [ 0: 1.176474] I/KERNEL (K 1): NET: Registered protocol family 16 [ 0: 1.178610] I/KERNEL (K 1): DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0: 1.179078] I/KERNEL (K 1): drime5_es_init() [ 0: 1.179282] I/KERNEL (K 1): DRIMeV Power Management [ 0: 1.180435] I/KERNEL (K 1): [arch/arm/mach-drime5/board-d5_nx500.c, fn:drime5_es_init, 1745] nau8822 [ 0: 1.181629] I/KERNEL (K 1): DRIME5: Adaptive Support Voltage init [ 0: 1.181655] I/KERNEL (K 1): DRIME5: IDS : 23(ISP), 35(ARM) PROMISE : 82 RESULT : 5 [ 0: 1.181662] I/KERNEL (K 1): DRIME5 ASV : 5 Group [ 0: 1.182143] I/KERNEL (K 1): Serial: AMBA PL011 UART driver [ 0: 1.182221] I/KERNEL (K 1): uart0: ttyAMA0 at MMIO 0x10038000 (irq = 97) is a PL011 rev3 [ 0: 1.187996] I/KERNEL (K 1): console [ttyAMA0] enabled [ 0: 1.188214] I/KERNEL (K 1): uart1: ttyAMA1 at MMIO 0x10039000 (irq = 98) is a PL011 rev3 [ 0: 1.188483] I/KERNEL (K 1): bio: create slab at 0 [ 0: 1.191296] I/KERNEL (K 1): input: Drime5 GPIO Keyboard as /devices/vi

PhilZMZ commented 7 years ago

I found a solution ! At first, I removed NX-KS2 and installed nx-on-wake (https://github.com/ottokiksmaler/nx500_nx1_modding/tree/master/nx-on-wake)+ nx patch 5.3 (https://github.com/ottokiksmaler/nx500_nx1_modding/tree/master/video-bitrate-mods/nx-patch). Then I put on a sd-card several files (including stapp and the following script in a file named "phserie.sh"

_#!/bin/bash while true;

for i in seq 1 10;

do /mnt/mmc/stapp "app nx capture single" sleep 1.2 done_ Thanks to Cedric for the help ! I start the sequence pressing together AEL + Exposure compensation buttons, and it works fine ! I can easily change the number of photos and the interval. Maybe you could include this feature in a next version ?

ottokiksmaler commented 7 years ago

I have made a tool mod_lapse that more or less does what you described, plus some more :)

It would be appreciated if you could test it and report back your findings

PhilZMZ commented 7 years ago

Thanks for this tool, Otto... But can you please explain in a few words how I can use it ? I copy the file on the SD Card ? Other files too ? Which mod version do I use ? 2.49 or 5.3 (Vassile Dumitrescu) ?

ottokiksmaler commented 7 years ago

What do you have currently installed? Vasile's hack?

PhilZMZ commented 7 years ago

Vasile's 5.3 on one camera, 2.49 on another one (I have 6 NX500 :-)

ottokiksmaler commented 7 years ago

Had to find an unused key combination, seems EV+OK is not used for anything in both packs (somebody correct me if I'm wrong). See here https://github.com/ottokiksmaler/nx500_nx1_modding/blob/master/tools/README.md for instructions. Should work with both mod packs.

PhilZMZ commented 7 years ago

Yes, works fine ! A question : why are there 2 mod packs ? It seems 2.49 has more features than 5 ? Right ?

ottokiksmaler commented 7 years ago

Uh, long story, TLDR version is

Vasile - faster starting (almost as soon as the camera is powered on, but needs a more aggressive hack), leaner, mostly made in C/C++

KS - slower to start from cold (after removing the battery or long inactivity, but minimal modifications to camera), tied to Bluetooth switch, based on shell scripts, contains everything and then some.

They have two different philosophies, choice is a good thing :)