Here is what I discover from the log file below, based upon a comparison
with what is known about the JL2005C:
The camera seems certainly similar to the JL2005C, but there are
differences.
Similarities are that there is an initialization sequence, and then a PAT
is downloaded. It appears that the same init sequence works, at least to
the point that the PAT is obtained. In case anyone is curious, here are
some notes I made about the Argus DC-1512E (JL2005C) init sequence, with
interpolated comments giving similarities and differences. Each
command is 2 bytes, here, and the first byte is 0x95.
60-64 -- do not change and may be some kind of reference number.
(different number between the two cameras, so it may be easily some kind
of ID number for the version, or the chip)
65 -- number of pix, in hex.
(same, apparently, assuming the photos have been correctly counted in the
log below.
66-67 -- (0x100*Byte66 + Byte67)*0x200 = remaining space.
(sumably the same information reported)
68-6b -- invariant, sumably placeholders.
(same here, it seems, but the actual entries are different)
Could 68-69 give total available space? Seems so.
(probably the same here)
6c-6d -- (0x100*Byte 6c + Byte6d)*0x200 = used space; to be downloaded.
(the Argus requires one to download this all, in one gulp)
6e-6f -- size of PAT, divided by 2.
6f -- invariant, always 00.
(Notice that this new camera seems to have been OK here; the reason
that the PAT can vary in size is that it needs to be long enough to
accommodate one line for each photo in the camera)
> I managed to get the latest svn trunk, and added a camlibs
> for the jl2005b based on the jl2005c who almost work.
I should mention, incidentally, that the reason the jl2005c camlib is not
included by default is that the cameras do not (yet?) work, and we did not
want to mislead anyone.
>
> Adjusted my local tree, and compiled succesfully my local 2.4.1 version.
>
> now i have a jl2005b to work with, if I could know where I should check.
>
> it is based on the trunk copy of the 2007-11-29/09:00
>
> I am willing to accept your tips, if you have some, and try to make it work.
>
> I can auto-detect my cam, list the files in the cam, see their names, ...
Actually, you cannot "see" their names. You can only see the names which
the support library has assigned to them. The jl2005c cameras certainly do
not provide names for the photos.
>
> But I cant download any of this.
This might be a question of the endpoint being shifted, but no, it was
after all shifted and you _did_ get the PAT data, so, no, it probably is
not a problem now of the wrong endpoint. But one is not certain what the
problem is, without a log file obtained by sniffing the USB traffic while
the OEM driver is doing its thing. That would be very handy in a situation
like this.
>
> Here are the debugging information to help illustrate the situation.
OK, let's look at it.
[...]
> 0.549671 gphoto2-port-usb(1): Looking for USB device (vendor 0x979, product 0x227)... found.
> 0.549688 gphoto2-port-usb(2): inep to look for is 82
> 0.549703 gphoto2-port-usb(1): Detected defaults: config 1, interface 0, altsetting 0, inep 82, outep 01, intep ffffffff, class 00, subclass 00
> 0.549721 gphoto2-camera(2): Loading '/usr/lib/libgphoto2/2.4.0.4/jl2005b'...
> 0.549877 gphoto2-port(2): Opening USB port...
> 0.549895 libusb(2): gp_port_usb_open()
> 0.549937 libusb(2): claiming interface 0
> 0.549971 jl2005b/jl2005b/library.c(2): Initializing the camera
>
> 0.550013 gphoto2-port(2): Setting settings...
> 0.550029 libusb(2): gp_port_usb_update(old int=0, conf=1, alt=0), (new int=0, conf=1, alt=0)
> 0.550049 jl2005b/jl2005b/library.c(2): interface = 0
>
> 0.550064 jl2005b/jl2005b/library.c(2): inep = 84
OK, so your camera starts with 0x84, too.
>
> 0.550079 jl2005b/jl2005b/library.c(2): outep = 3
>
> 0.550196 jl2005b/jl2005b/jl2005b.c(2): Running jl2005b_init
>
> 0.550230 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.550251 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 08 00 - ..
>
> 0.564594 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.564642 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 60 - .`
>
(See discussion, above, about the sequence which begins here)
> 0.580505 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.581633 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 00 - .
>
> 0.596481 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.596503 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 61 - .a
>
> 0.612492 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.613620 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 50 - P
>
> 0.628485 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.628507 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 62 - .b
>
> 0.644479 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.645609 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 01 - .
>
> 0.660477 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.660498 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 63 - .c
>
> 0.676481 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.677601 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 38 - 8
>
> 0.692477 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.692503 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 64 - .d
>
> 0.708476 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.709595 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 00 - .
>
> 0.724472 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.724493 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 65 - .e
>
> 0.740472 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.741592 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 0b - .
>
> 0.741610 jl2005b/jl2005b/jl2005b.c(2): 11 entries in the camera
>
> 0.741626 jl2005b/jl2005b/jl2005b.c(2): 11 entries in the camera
>
> 0.756472 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.756493 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 66 - .f
>
> 0.772472 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.773575 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 33 - 3
>
> 0.788471 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.788501 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 67 - .g
>
> 0.804477 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.805567 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 1f - .
>
> 0.820466 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.820486 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 68 - .h
>
> 0.836467 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.837558 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 3b - ;
>
> 0.852465 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.852486 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 69 - .i
>
> 0.868466 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.869552 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 10 - .
>
> 0.884465 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.884489 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 6a - .j
>
> 0.900462 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.901546 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 01 - .
>
> 0.916463 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.916494 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 6b - .k
>
> 0.932459 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.933531 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 10 - .
>
> 0.948458 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.948478 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 6c - .l
>
> 0.964459 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.965524 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 01 - .
>
> 0.965545 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.965564 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 6d - .m
> 0.980458 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 0.981524 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 fe - .
>
> 0.996451 jl2005b/jl2005b/jl2005b.c(2): data_to_read = 0x3fc00 = 261120
>
> 0.996468 jl2005b/jl2005b/jl2005b.c(2): total_data_in_camera = 0x3fc00 = 261120
>
> 0.996488 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 0.996507 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 6e - .n
>
> 1.012460 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 1.013510 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 01 - .
>
> 1.028453 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 1.028473 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 95 6f - .o
>
> 1.044455 gphoto2-port(2): Reading 1=0x1 bytes from port...
> 1.045503 gphoto2-port(3): Hexdump of 1 = 0x1 bytes follows:
> 0000 00 - .
>
> 1.060456 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 1.060476 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 0a 00 - ..
>
> 1.076448 jl2005b/jl2005b/jl2005b.c(2): inep reset to 82
>
> 1.076478 gphoto2-port(2): Setting settings...
> 1.076493 libusb(2): gp_port_usb_update(old int=0, conf=1, alt=0), (new int=0, conf=1, alt=0)
> 1.092454 gphoto2-port(2): Reading 512=0x200 bytes from port...
> 1.093499 gphoto2-port(3): Hexdump of 512 = 0x200 bytes follows:
> 0000 4a 4c 32 30 30 35 42 02-04 e0 0c d1 00 0b 33 1f JL2005B.......3.
> 0010 07 8f 00 b6 01 02 c0 41-01 10 fc fe 38 2c f0 f2 .......A....8,..
on careful examination, some things are repeated in these first 2 lines
which were obtained during the config commands-responses, apparently for
confirmation. Note for example the last 3 bytes of line 0000 which give
the number of photos, again, and the remaining space.
> 0020 ef b5 5f d7 f7 ff 77 f7-bf df ef f5 79 e7 cf f7 .._...w.....y...
The entries for each photo start with line 0030. Byte 5 gives
finished height/8 and byte 6 gives finished width/8, so, here, the
measurements would be that width is 120(that is, 288) and height is 160
(i.e. 352). byte size start
---- ----
> 0030 00 23 00 64 24 2c 01 a1-36 63 43 00 04 e0 f5 9c .#.d$,..6cC.....
start of next photo, equal to sum of
vious start plus vious size
----
> 0040 00 23 00 64 24 2c 01 42-36 65 43 00 06 81 90 29 .#.d$,.B6eC....)
> 0050 00 23 00 64 24 2c 01 77-27 5b 43 00 07 c3 a2 09 .#.d$,.w'[C.....
> 0060 00 23 00 64 24 2c 01 8e-34 4d 43 00 09 3a e0 53 .#.d$,..4MC..:.S
Now you switched the resolution setting to 176x144.
> 0070 00 23 11 5e 12 16 00 24-36 62 43 00 0a c8 7f 69 .#.^...$6bC....i
> 0080 00 23 11 5e 12 16 00 38-34 52 43 00 0a ec 99 c1 .#.^...84RC.....
> 0090 00 23 11 5e 12 16 00 25-32 54 43 00 0b 24 da 15 .#.^...%2TC..$..
> 00a0 00 23 11 5e 12 16 00 26-36 55 43 00 0b 49 16 31 .#.^...&6UC..I.1
> 00b0 00 23 01 64 12 16 00 77-33 4d 43 00 0b 6f 5b de .#.d...w3MC..o[.
> 00c0 00 23 01 64 12 16 00 70-36 47 43 00 0b e6 14 11 .#.d...p6GC.....
> 00d0 00 23 01 64 12 16 00 7b-27 5b 43 00 0c 56 5a be .#.d...{'[C..VZ.
No more photos after this.
> 00e0 ff d7 dd c5 a6 f9 bd fd-f5 f3 f5 f3 dd af ff fd ................
> 00f0 6d 8f db ff f5 bd fe 5d-fd 9d c3 72 cb fd ff fd m......]...r....
> 0100 ed cf e7 7f 3f f9 fe f4-f3 f8 5f 07 fb d3 f7 ff ....?....._.....
> 0110 f7 3f cf db f1 7a fb 93-a6 67 eb e7 5d fd ff f7 .?...z...g..]...
> 0120 ff ff 7d be a7 37 c2 cb-76 e9 f5 dd e7 e5 fb ef ..}..7..v.......
> 0130 56 d7 fe f7 fe d7 f2 fa-dd f1 f5 79 f9 f5 2c cd V..........y..,.
> 0140 ff fa 7e df ff 75 ba fd-fd ce ef d7 bb df e4 e7 ..~..u..........
> 0150 fb 7e 5f f6 ed fd ff ee-cf c8 f1 fa 36 ed 3e fe .~_.........6.>.
> 0160 df 2f cf cf 6f e7 fd e9-5d ff f7 e3 9f 7b f7 dc ./..o...]....{..
> 0170 5f ae f8 f7 b7 4d bf ff-3f bf ff ff 9d c7 fd cd _....M..?.......
> 0180 75 df f7 ff f7 ff 6b bc-cb bd df 2f 2b 8f 33 ff u.....k..../+.3.
> 0190 1a af 63 b9 4b b9 bf ff-f9 e7 f7 fe ef df ff dd ..c.K...........
> 01a0 3e cf eb ff be 6b af fb-fb de a3 ef f7 f1 f5 f1 >....k..........
> 01b0 ef ed 5f cf bd 7f ef 6e-96 f3 fe 1a 7a bf 9f fd .._....n....z...
> 01c0 76 ff db f5 bd ff ad df-5d ee fd df ef e7 eb 09 v.......].......
> 01d0 9d fc fd ff e9 fc ff ff-ff b9 fd f7 fb 78 77 4f .............xwO
> 01e0 f9 fb bd ff fd eb fd f3-7e be fe 6f bf f9 fd 9f ........~..o....
> 01f0 ff ff 7d ec f7 df d1 dd-11 af cc be bb 6f d5 f5 ..}..........o..
>
> 1.108450 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 1.108473 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 0b 00 - ..
>
> 1.124480 jl2005b/jl2005b/jl2005b.c(2): Leaving jl2005b_init
>
> 1.124517 gphoto2-filesystem(2): Listing files in '/'...
> 1.124543 gphoto2-filesystem(2): Querying folder /...
> 1.124574 gphoto2-filesystem(2): Added 'jl_001.ppm'
> 1.124592 gphoto2-filesystem(2): Added 'jl_002.ppm'
> 1.124608 gphoto2-filesystem(2): Added 'jl_003.ppm'
> 1.124624 gphoto2-filesystem(2): Added 'jl_004.ppm'
> 1.124640 gphoto2-filesystem(2): Added 'jl_005.ppm'
> 1.124655 gphoto2-filesystem(2): Added 'jl_006.ppm'
> 1.124670 gphoto2-filesystem(2): Added 'jl_007.ppm'
> 1.124686 gphoto2-filesystem(2): Added 'jl_008.ppm'
> 1.124705 gphoto2-filesystem(2): Added 'jl_009.ppm'
> 1.124721 gphoto2-filesystem(2): Added 'jl_010.ppm'
> 1.124736 gphoto2-filesystem(2): Added 'jl_011.ppm'
> 1.124752 filesys(2): Listed 'jl_001.ppm'
> 1.124767 filesys(2): Listed 'jl_002.ppm'
> 1.124782 filesys(2): Listed 'jl_003.ppm'
> 1.124797 filesys(2): Listed 'jl_004.ppm'
> 1.124811 filesys(2): Listed 'jl_005.ppm'
> 1.124826 filesys(2): Listed 'jl_006.ppm'
> 1.124840 filesys(2): Listed 'jl_007.ppm'
> 1.124855 filesys(2): Listed 'jl_008.ppm'
> 1.124869 filesys(2): Listed 'jl_009.ppm'
> 1.124884 filesys(2): Listed 'jl_010.ppm'
> 1.124899 filesys(2): Listed 'jl_011.ppm'
> 1.124996 gphoto2-camera(2): Getting file 'jl_001.ppm' in folder '/'...
> 1.125019 libgphoto2/gphoto2-filesys.c(2): Getting file 'jl_001.ppm' from folder '/' (type 1)...
> 1.125059 context(2): Downloading 'jl_001.ppm' from folder '/'...
> Downloading 'jl_001.ppm' from folder '/'...
> 1.125088 jl2005b/jl2005b/library.c(2): Downloading pictures!
>
> 1.125106 jl2005b/jl2005b/library.c(2): height is 480
Well, no it isn't, I bet. So some changes are needed here.
>
> 1.125121 jl2005b/jl2005b/jl2005b.c(2): info[48+16*n+7] = A1
In the vious code no doubt it says to do this, but with the jl2005c
camera, with its comssion, the photos were all of such small data size
that the byte with the 01 in it did not get used. So how did I know it is
needed? It could have been a column filler, but for this camera at least
we see it is not a column filler. The 352x288 photos make this to be a 1,
and for the 176x144 photos it is 0, unsurprisingly. So the download size
for photo 0 is not yet correctly given. BTW, the actual size of an
uncomssed 352x288 should be the product of the two numbers, which in
hex is 0x18C00. That would tally with 0x1A100 if we multiplied those two
bytes by 0x100. But look at the next photo. It is the same output size but
the input size there, 0x14200, following the same logic, is then too small
:(
So it seems there is some kind of funny business going on with these
cameras, too. All I can say is, try these suggestions for the download
size and see if they work. Or, if you want to be absolutely certain then
see what the OEM driver is doing in order to get the actual download size.
>
> 1.125137 jl2005b/jl2005b/jl2005b.c(2): size = 0x14200 = 82432
>
> 1.125152 jl2005b/jl2005b/library.c(2): b = 82432 = 0x14200 bytes
>
> 1.125168 jl2005b/jl2005b/library.c(2): start_of_photo number 0 = 0x1c000
>
> 1.125249 jl2005b/jl2005b/library.c(2): buffersize b = 82433 = 0x14201 bytes
>
> 1.125266 jl2005b/jl2005b/library.c(2): photo_code = 00 and pic_data[b+1] = 00
>
> 1.125295 jl2005b/jl2005b/library.c(2): photo number 0 starts in a funny place!
>
> 1.125319 libgphoto2/gphoto2-filesys.c(2): Download of 'jl_001.ppm' from '/' (type 1) failed. Reason: 'Unspecified error'
> 1.125336 gphoto2-camera(2): Operation failed!
> *** Error (-1: 'Unspecified error') ***
If this camera is similar to the JL2005C cameras, then if you get the
sizes wrong the camera will simply choke, so this is not an entirely
surprising outcome.
>
> For debugging messages, please use the --debug option.
> Debugging messages may help finding a solution to your problem.
> If you intend to send any error or debug messages to the gphoto
> developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
> gphoto2 as follows:
>
> env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --debug -P
>
> Please make sure there is sufficient quoting around the arguments.
>
> 1.125717 gp-camera(2): Freeing camera...
> 1.125734 gphoto2-camera(2): Exiting camera ('Kidz Cam MLS.')...
> 1.125750 jl2005b/jl2005b/library.c(2): jl2005b camera_exit
> 1.125769 gphoto2-port(2): Writing 2=0x2 byte(s) to port...
> 1.125789 gphoto2-port(3): Hexdump of 2 = 0x2 bytes follows:
> 0000 07 00 - ..
>
> 1.127485 gphoto2-port(2): Closing port...
> 1.129809 gphoto2-port(2): Closing port...
> 1.129885 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...
> 1.129910 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty
> 1.129931 gphoto2-filesystem(2): Internally deleting all folders from '/'...
> 1.129967 gphoto2-port(2): Freeing port...
> 1.129993 gphoto2-port(2): Closing port...
> 1.130047 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...
> 1.130076 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty
> 1.130109 gphoto2-filesystem(2): Internally deleting all folders from '/'...
>
Hope this helps, and I will be very interested in your results.
Theodore Kilgore
|