SaturnNights:
how's it going? Well, I've got some news: I have a version now that will unlock and download every time it is run. Yep, every time.
I looked at the logs for when it failed versus when it succeeded (the usb snoop info in syslog). Everything stayed at actual lengths of zero during the failed run, at the end of which there was only a release of the interface. The next run, which would be successful, basically re-initialized and re-opened the interface, so I just changed the code to do it instead in 1 execution as follows:
In the unlock routine, I check for a failed status on the request for/read of the challenge key. If either has failed, I close the device, re-init and re-open it, then do the endpoint resets and bulk only mass storage reset, then rerun the request for/read of the challenge key. I did this because the logs would indicate it would not communicate until the device was released and then all initialization and open done again. I suspect this may actually be a bug in libusb, but since I don't feel like digging into the usbfs_ioctl code right now, I just did it this way.
So far, this has worked everytime - no need to rerun.
So........can I get any takers to run their own -*test*-('")s with this and report back if it works for them or not?
:)
SaturnNiGHTS- 11-26-2007
genius! that's a great success! send me yet another codebase, and i'll run it against my pv2 cam laying here. beat out both me and enigma.
anewguy- 11-26-2007
Well, I just emailed it to you again. I'm not expecting miracles, but it would be nice if it works for someone other than just me. My model 410 is permanently unlocked, but it still retrieves the challenge, gets the response from the file, and then sends it back to unlock, so I would hope it works for others. Time will tell!
Thanks for being the first -*test*-('")er of this - I know it's not pretty but at least it worked for me. I'm almost tempted to get another camera and leave it locked just to see if it works, but it's 2:45 in the morning here in Illinois so I can't do that for a few hours if I decide to.
Sure hope it works for you. As mentioned in the email, any error trapping is not -*test*-('")ed, so I hope that won't cause problems during your -*test*-('")!
Let me know how it turns out. I fully expect I'll need to change something yet but it would be nice if it worked for you, too! :D
anewguy- 11-26-2007
Just tried it by doing "su" first so that I was running as root. The .saturnkeys file must be in the /root folder if you run as root, and in addition, no matter how you run it, you must create a "pv2_pics" folder in the users home folder (forgot to mention that, but the principle is the same as creating "saturn_vids" before you can download from the camcorder).
Sorry about that, and hopefully this will help. :)
anewguy- 11-27-2007
Hope you got the email and the attached tar with the source and executable. I decided not to get another camera today, so I'm relying on others to let me know if it works with their cameras.
Have a good one! :)
anewguy- 11-28-2007
Forgot to mention WHY I didn't get another camera: our local CVS store now only has these new ones that do red eye reduction, etc.. They are a model 510, and I didn't know if they would unlock the same or not as the previous models, and I really didn't want to be a ginea pig with it. If someone knows if these work fine to, please let me know. :)
anewguy- 11-28-2007
SaturnNights: Any luck yet? :)
anewguy- 11-29-2007
Just got one of the video cameras back, found a small boo-boo with their processing: I apparently pasted a "if (!camera_Unlock(*CAM_TYPE) onto the end of the camcorder routine to display the keys - end result was a hang. I removed that little boo-boo and improved some of the error handling.
Though I should let you know if you decide to -*test*-('") with a camcorder as well.
Sorry about that - I had problems with my mouse one day and thought I had caught all of those but I guess one was still left there.
anewguy- 12-01-2007
SaturnNights or Enigma:
Have either of you had a chance to -*test*-('") this with your cameras yet? What was the result?
Thanks!
anewguy
anewguy- 12-03-2007
Enigma:
Waiting on -*test*-('") results from an update I had to make. Seems I goofed up if the camera was permanently unlocked. Not sure if I fixed that correctly or not, but I forwarded a copy to SaturnNights and will wait for the -*test*-('") results from him.
Everything still works for me, so I'm sure I can work this little boo-boo out.
When I'm done I'll let SaturnNights do what he wants with it, as I have no need for it beyond just using it. :)
anewguy- 12-07-2007
SaturnNights:
I had to make a small update (an if without braces was causing a problem). Sent Enigma the changed code and he says it works for his locked camera using .saturnkeys , so......would you be interested in yet another update to -*test*-('") with both locked and unlocked cameras?
Thanks! :)
SaturnNiGHTS- 12-08-2007
sure, i'll take another one. i tried the one i got la-*test*-('") on my other cam, didn't work. reflashed it with fresh firmware, still no love. so maybe this fix will work?
sorry i haven't been able to update.
enigma-- 12-08-2007
sure, i'll take another one. i tried the one i got la-*test*-('") on my other cam, didn't work. reflashed it with fresh firmware, still no love. so maybe this fix will work?
sorry i haven't been able to update.
if anyone is interested, I modified the program so that this causes .jpg output it requires that you have imagemagick installed (in particular the program "convert"
http://www.imagemagick.org/script/index.php
compiled with gcc using the command
gcc *.c -lusb -lm -llcms -ljpeg -o this-one-does-jpgs
http://jeff.crowell.googlepages.com/avidownload.tar.gz
we really have to rename this one mediadownload or something.
anewguy- 12-10-2007
SaturnNights: lost your email, could you pm it to me or another way to send you the file? BTW - when Enigma runs it as sudo, the .saturnkeys files must be in the users' home folder, not /root. Also, if it doesn't work for some reason, could you post back the terminal window output?
Everybody:
There is a simple way to avoid having your USB stuff wide open and yet get access to these cameras without needing to be root or su:
In Ubuntu at least, the file is called:
/etc/udev/rules.d/40-permissions.rules
edit this file (as su) and find the following:
# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device", MODE="0664"
Now, ADD the following 2 lines after the 'SUBSYSTEM" line:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0dca", SYSFS{idProduct}=="0027", MODE="0666"
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="167b", SYSFS{idProduct}=="0101", MODE="0666"
The first line is for the digital camera and makes it world accessable.
The second line is for the camcorder and makes it world accessable.
Easy way to protect your USB stuff but still be able to access the cameras!
anewguy- 12-18-2007
SaturnNights: Did you get a chance to -*test*-('") the copy that Enigma mailed you? If it didn't work, do you have the terminal log so I can see what it's saying? If it did work, great!, and you and Enigma and whoever else can do what you want with it - I just wanted something to do both and work for me, so since I've gotten there, I'll leave it to you guys to do what you want with it. Thanks for all the great work that you, BillW, etc., have all done to make it possible for me.
To everyone: there is now a program (runs in terminal mode but you can launch it from the desktop) that will download your movies from the CVS on-time-use camcorders and download the pictures from your CVS one-time-use digital cameras. I haven't done anything like try to put it on SourceForge, etc., so if you need a copy leave a note here. This has worked for myself and for user Enigma, with completely different cameras, etc..
Again, thanks to all!
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.