supplierdeeply

Cant get shutter work via USB port / gentWIRE2

  • 17 Replies
  • 2503 Views
*

Offline srsa_4c

  • ******
  • 3784
Re: Cant get shutter work via USB port / gentWIRE2
« Reply #10 on: 17 / May / 2012, 12:31:18 »
Advertisements
Several features are not working in this port. USB is not handled, its current address / mask is wrong (as the source says). There are also issues with the framebuffer addresses, so for example motion detection doesn't seem to work for me. Will try to do something about these in a few days. Hopefully.

Re: Cant get shutter work via USB port / gentWIRE2
« Reply #11 on: 17 / May / 2012, 13:25:10 »
USB is not handled, its current address / mask is wrong (as the source says).
Where did you see that ?   The source looks pretty typical of many cameras from that time - it uses the platform/generic/kbd.c code.   It is possible that this is wrong however :

Code: [Select]
#if defined(CAMERA_a630) || defined(CAMERA_a640) || defined(CAMERA_a610) || defined(CAMERA_a620) || defined(CAMERA_ixus800_sd700) || defined(CAMERA_ixus65_sd630) || defined(CAMERA_ixus850_sd800) || defined(CAMERA_ixus900_sd900) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_ixus950_sd850) || defined(CAMERA_a410)
#define USB_MASK 0x8000000
#define USB_REG 1
#endif

Update :   okay - I see it now in the unstable trunk :
Code: [Select]
#define USB_MASK 0x40   // ?? incomplete port - probably wrong
#define USB_IDX  2               // ?? incomplete port - probably wrong
I believe that those are my comments there.  Not sure why it does not match the code in the stable branch - possibly miuxed up when the the mass migration to USB remote V2 was done.  There seems to be at least one other camera with the same issue.


Regardless, the code I pasted first in this post is from the release-1_0 stable branch and should work in asmus's camera as that is what he is using.
« Last Edit: 17 / May / 2012, 13:44:18 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 3784
Re: Cant get shutter work via USB port / gentWIRE2
« Reply #12 on: 17 / May / 2012, 14:26:26 »
I'm sorry if I wasn't clear, I do have this camera, so I wrote about my experiences.
One thing that bothers me, why is this
kbd.o: kbd.c ../generic/kbd.c
in platform/ixus65_sd630/Makefile ?
It builds and works without the red part. The port's kbd.c does not #include the generic one.

Re: Cant get shutter work via USB port / gentWIRE2
« Reply #13 on: 17 / May / 2012, 15:05:31 »
I'm sorry if I wasn't clear, I do have this camera, so I wrote about my experiences.
One thing that bothers me, why is this
kbd.o: kbd.c ../generic/kbd.c
in platform/ixus65_sd630/Makefile ?
It builds and works without the red part. The port's kbd.c does not #include the generic one.
I guess that depends on whether you are talking about the release-1_0 branch ( i.e. CHDK Stable) or the main dev trunk ( unstable ) ?

In the stable version,  platform/generic/kbd.c is used by several different (older) cameras.   If its not included then you need a version of wait_until_remote_button_is_released() in your local kbd.c file.   As the source for the sd630 does not seem to have such routine,  that suggests to me that it is being included or you should have ended up with an undefined symbol.

In the dev version,  most of the kbd.c code was removed / rewritten / relocated to the individual camera builds. So platform/generic/kbd.c it probably does not need to be included in those builds.  At a minumum,  we probably need to change the usb keyboard mask in the dev version to match what's in the stable version - the comments you originally noticed are most likely correct but confused .

UPDATE : I confirmed that both stable and unstable versions compile the platform/generic/kbd.c file but do not link in the result.  This works because the  wait_until_remote_button_is_released() call from sub/capt_seq.c is commented out, meaning the camera will not "sync" in USB remote modes.  And also meaning that the stable version has no USB remote code and the dev version has code that is commented out.  @srca_4c : as you have the camera,  can you fix this ? I can provide some code for both trunk versions if that will help get things started.
« Last Edit: 17 / May / 2012, 17:58:16 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline srsa_4c

  • ******
  • 3784
Re: Cant get shutter work via USB port / gentWIRE2
« Reply #14 on: 17 / May / 2012, 19:55:53 »
I guess that depends on whether you are talking about the release-1_0 branch ( i.e. CHDK Stable) or the main dev trunk ( unstable ) ?
Well, both :)
Quote
UPDATE : I confirmed that both stable and unstable versions compile the platform/generic/kbd.c file but do not link in the result.
This is not entirely clear to me. The line of the makefile I posted above specifies two kbd.c files as the source of kbd.o (?), the two kbd.c files have many conflicting definitions (functions, variables). How can this not cause any build issues? (I would also like to note that there is a number of ports whose makefiles unnecessarily specify that generic kbd.c)
Quote
can you fix this ?
I will definitely try.
Quote
I can provide some code for both trunk versions if that will help get things started.
That would help, as you surely know how the remote related code works.
I will take care of the firmware specific code, the usb definitions for this model in the generic kbd code are correct.

Re: Cant get shutter work via USB port / gentWIRE2
« Reply #15 on: 17 / May / 2012, 20:49:35 »
This is not entirely clear to me. The line of the makefile I posted above specifies two kbd.c files as the source of kbd.o (?), the two kbd.c files have many conflicting definitions (functions, variables). How can this not cause any build issues? (I would also like to note that there is a number of ports whose makefiles unnecessarily specify that generic kbd.c)
There is a lot of "magic" in the makefiles that (based on recent IRC conversations) even philmoz and reyalp have not waded through or attempted to understand.  The first time I came across the use of the "weak" modifier I was stunned.   I'm in the "if its not badly broken, don't fix it" camp on this one these days.

Quote
Quote
can you fix this ?
I will definitely try.
:)

Quote
Quote
I can provide some code for both trunk versions if that will help get things started.
That would help, as you surely know how the remote related code works. I will take care of the firmware specific code, the usb definitions for this model in the generic kbd code are correct.
We can probably most quickly start there with the dev trunk.   Unfortunatly I'll be travelling starting tomorrow and not have access to my dev machine.  I thought I had a small patch that would fix this but once I looked closer at ths ixus65 kbd.c code vs the ixus70 I realized it would be a somewhat larger job.  If you have time to compare the two that would be great.  Otherwise I will get back to it in a week or so.

@asmus : sorry for not spotting this sooner but there are many old CHDK ports and not all were "complete" - it just took me too long to spot this one.  With srsa_4c's help we should be able to get there in the next couple of weeks
« Last Edit: 17 / May / 2012, 21:18:04 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 3784
Re: Cant get shutter work via USB port / gentWIRE2
« Reply #16 on: 18 / May / 2012, 14:25:32 »
get there in the next couple of weeks
8)

@asmus
I have attached a diskboot.bin for the development version of chdk. Download the current autobuild pack from http://mighty-hoernsche.de/trunk/ and overwrite diskboot.bin with this version. The changes will sooner or later appear in the official code. The remote will only be implemented in the chdk 1.1 codebase.
Also see http://chdk.setepontos.com/index.php?topic=650.msg85584#new

*

Offline asmus

  • *
  • 10
Re: Cant get shutter work via USB port / gentWIRE2
« Reply #17 on: 21 / May / 2012, 09:11:19 »
SRSA_4C, Waterwingz,

it works! Thx a lot for your effort. I've made my first pictures with Fotokite 250 and U guys.

Best regards

Tomas


 

Related Topics