camerahacking Forum Index  
 FAQ  •  Search  •  Memberlist  •  Usergroups   •   fChat   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 USB Commands View next topic
View previous topic
Post new topicReply to topic
Author Message
zapped



Joined: 08 Jul 2005
Posts: 785
Location: 4 8 15 16 23 42

PostPosted: Wed Aug 10, 2005 5:51 pm Reply with quoteBack to top

Here is what I found regarding I43_QueryStatus
1st byte seems to stay at 13. It may change for webcam mode or something. Removing batteries has no effect on the status.
4th byte changes to 80 during motion while recording or preview
4th byte stays at current value (00 or 80) during playback

**recording**
13 40 00 00 ready
13 40 04 00 record button pressed
13 B0 00 00 repeats while recording
13 B0 04 00 any button pressed to stop recording
13 30 00 00
13 40 04 00
13 40 00 00 ready

**delete times out**
13 40 00 00 ready
13 40 04 00 delete button pressed
13 90 00 00
13 90 00 00
13 C0 10 00
13 C0 00 00 repeats while waiting for delete confirm
13 40 00 00 ready

**delete with video deleted**
13 40 00 00 ready
13 40 04 00 (delete button pressed)
13 90 00 00
13 90 00 00
13 C0 10 00
13 C0 00 00 repeats while waiting for delete confirm
13 30 00 00 delete button pressed again
13 30 00 00
13 30 04 00
13 30 00 00 repeats while displaying "Video Deleted"
13 40 00 00 ready

**playback**
13 40 00 00 ready
13 90 04 00 playback button pressed
13 90 00 00
13 C0 00 00 repeats while playing clip
13 C0 04 00 playback ends
13 40 00 00 ready

**playback with button interrupt**
13 40 00 00 ready
13 90 04 00 playback button pressed
13 90 00 00
13 C0 00 00 repeats while playing clip
13 30 00 00 button pressed to stop playback
13 30 04 00 playback ends
13 40 00 00 ready

**powerdown**
13 40 00 00 ready
13 00 00 00 power button pressed
13 00 00 00
13 00 00 00
13 00 00 00
13 00 04 00 powering down
13 00 00 00 powered off
13 00 00 00
13 00 00 00


**pinch screen**
13 00 00 00 pinch screen
13 00 04 00 power button pressed
13 00 00 00
13 30 00 00 off
View user's profileSend private message
zapped



Joined: 08 Jul 2005
Posts: 785
Location: 4 8 15 16 23 42

PostPosted: Wed Aug 10, 2005 7:03 pm Reply with quoteBack to top

according to my disassembly of UI43Api.dll, I43_SetFreeParams seems to be command 0x0B, not 0x0A as on the camcorder usb command page
View user's profileSend private message
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Wed Aug 10, 2005 7:17 pm Reply with quoteBack to top

Ok, some *very* encouraging news for those of you that want to also use this thing as a movie player - you can inject movies into it, and it will play them back. So far I've only done this with movies generated from the camcorder.

Currently the only thing holding back a new Ops with this feature is the "long filename" problem I'm running into (mentioned in previous post). So it only works with the first file deposited onto the camera. But I'll work through it. 8)

I believe the long filename problem is also causing problems with arbitrary downloads - I tried to get my STATFILE.TXT, but it always returns a zero-byte file.
View user's profileSend private messageVisit poster's website
twist



Joined: 08 Aug 2005
Posts: 45

PostPosted: Wed Aug 10, 2005 7:33 pm Reply with quoteBack to top

There is no easy way to do a file rename after naming or uploading the file?

Also -- does uploading over the .wav files (the annoying beeps) work?
View user's profileSend private message
hal0gen



Joined: 09 Aug 2005
Posts: 63
Location: Cartersville, Ga

PostPosted: Wed Aug 10, 2005 7:48 pm Reply with quoteBack to top

Woohoo! You guys are truly amazing. Should be getting paid for this! Smile
View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Wed Aug 10, 2005 8:02 pm Reply with quoteBack to top

No, no easy way to rename yet, but the command set still needs to be explored greatly.

I can upload things to that WAV partition, but this long-name thing gets in the way of an overwrite, if that's possible. Eg. if I try to overwrite PICT0001.AVI with a file of the same name, I get a new file called PICT00~3.AVI.

Sad news - I tried to upload a few different downloaded divx and xvid files without any success. The camera purged them on startup. It appears to look for something special in it's own files on boot. It may just be a resolution check, but it may be something else too.
View user's profileSend private messageVisit poster's website
twist



Joined: 08 Aug 2005
Posts: 45

PostPosted: Wed Aug 10, 2005 8:06 pm Reply with quoteBack to top

Have you tried giving the files shorter names? (8 characters or less)

Also, maybe I43_FileOperation will allow you to rename files? (Unless that is for operations on the file data only)

I43_PlaybackZoom seems like an interesting function as well -- not related to uploading, but something someone should definetly look at.
View user's profileSend private message
carpespasm



Joined: 05 Aug 2005
Posts: 1541
Location: jacksonville, fl

PostPosted: Wed Aug 10, 2005 8:14 pm Reply with quoteBack to top

i would imagine any video you upload into it would have to be converted to a 320x240 xvid first. also i'd just go ahead and give the files a 8.3 filename just to make the camcorder not complain. try naming your files like PICT0004.AVI if you already have 3 videos on

_________________
rat shack, you've got questions, we've got blank stares.... and cell phones.
View user's profileSend private messageAIM Address
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Wed Aug 10, 2005 8:41 pm Reply with quoteBack to top

carpespasm, I've been giving it 8.3 names all along, but it's converting them into ~ long names anyway, wether or not the file is new. I tried the "next in sequence", but can only get that to work after a fresh format and capture of 1 video, with resettting of the camera inbetween each new step. That's how I know I can inject video.

twist - good call. filenames <=11 chars long are appearing as short names... still a bunch of stuff to test out before I try to whack the .wav files though.
View user's profileSend private messageVisit poster's website
Maxwell Smart



Joined: 07 Aug 2005
Posts: 278

PostPosted: Wed Aug 10, 2005 9:11 pm Reply with quoteBack to top

WOW, you guys are really making some development. That would kick ass If I was able to to take a Family Guy ep with me on the road.
View user's profileSend private message
ZeroGwafa



Joined: 29 Apr 2005
Posts: 68

PostPosted: Wed Aug 10, 2005 9:23 pm Reply with quoteBack to top

radarman wrote:
BillW wrote:
No joy to report yet with the movie upload, but an interesting tidbit I ran across... If you decrement the "movie download index" and then do an operation on the camera itself (like hitting the playback button) the movie count does decrease and the last movie disaapears. If you later increase it again, the disappearing movie reappears.


I suspect that, like the PV2, the movies never really get erased - they just get delisted. Although I haven't been able to get a recycled camcorder, I would suspect that you could strip the video from them just like you can get the original pictures from a recycled PV2.


After curiousity bit me in the rear, i took my trusty laptop to work, and the recycled camcorders keep the videos after being processed. They can also be formatted! But not reused as of yet...
View user's profileSend private message
Corscaria



Joined: 08 Jul 2005
Posts: 441

PostPosted: Wed Aug 10, 2005 11:10 pm Reply with quoteBack to top

BillW, short file names are stored in the FAT without the period, so instead of PICT0002.AVI try PICT0002AVI <shrugs> might work. but since i've been too lazy to get uploading working myself, i can't try it, heh.

_________________
how does a hatrack cope with suddenly becoming human?
View user's profileSend private message
Justin



Joined: 04 Aug 2005
Posts: 52

PostPosted: Wed Aug 10, 2005 11:47 pm Reply with quoteBack to top

radarman wrote:

I suspect that, like the PV2, the movies never really get erased - they just get delisted. Although I haven't been able to get a recycled camcorder, I would suspect that you could strip the video from them just like you can get the original pictures from a recycled PV2.


I'm not familiar with what the PV2 does, but this general idea is how the FAT filesystem works. Unless you do extra work yourself, deleting a file simply marks the file's name/space as deleted (ie, it's still there until something else overwrites it).

Obviously it would be disappointing if the refurm process didn't explicitly wipe/rewrite the flash contents. You'd think a company would want to make sure about that -- if it became widely known that your movies could be seen by whoever gets the camera next, people would be less likely to pay for the camera/services.

Then again, companies are often dumb when it comes to security issues, and I can easily imagine a bunch of suits at a table either (1) clueless nodding and insisting the tech guys must have implemented that or (2) laughing while saying "who will ever notice?! have a cigar!" Smile
View user's profileSend private messageVisit poster's website
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Thu Aug 11, 2005 12:05 am Reply with quoteBack to top

Corscaria, I tried that too with no joy... it just made an extensionless longname.

The weird thing, is I can get it to flip into 8.3 mode by formattting, resetting, recording a movie, resetting, uploading. Any other variation creates longnames.
View user's profileSend private messageVisit poster's website
twist



Joined: 08 Aug 2005
Posts: 45

PostPosted: Thu Aug 11, 2005 12:34 am Reply with quoteBack to top

Is there any way to make a file "active" or "loaded" then use the SetFileName command? (maybe that will rename it)

Or, upload the file in 8.3 format (PICT0001AVI), set the file type (SetFileType), and reboot the camcorder?

Of course, I'm not speaking with too much knowledge of this, just some semi-educated guesses here.
View user's profileSend private message
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Thu Aug 11, 2005 12:46 am Reply with quoteBack to top

twist wrote:
Is there any way to make a file "active" or "loaded" then use the SetFileName command? (maybe that will rename it)

Not to my knowledge. The functions (the upload one at least) works just with filenames, as upposed to file handles or a current file notion. I believe there's a way of doing it right (without longnames) without resorting to renaming.

Quote:
Or, upload the file in 8.3 format (PICT0001AVI), set the file type (SetFileType), and reboot the camcorder?

It seems like you do the Set functions before the upload. I think either through SetFileType or another call you set the extension for the current file, but that's just a guess. I tried it out a little today with no luck.

I'll be back at it tomorrow... if any of the devs want pseudocode, let me know. I think I've shared enough details for you to recreate my work without it, but I'm too tired to backtrack right now and make sure.
View user's profileSend private messageVisit poster's website
OldProfessorBear



Joined: 12 Jun 2005
Posts: 215
Location: Cambridge, MA

PostPosted: Thu Aug 11, 2005 12:48 am Reply with quoteBack to top

BillW wrote:
The weird thing, is I can get it to flip into 8.3 mode by formattting, resetting, recording a movie, resetting, uploading. Any other variation creates longnames.

This reminds me oddly of a strange and little-known bug I discovered in Windows years back.

Heck, it may still be there for all I know ...

As I recall it, if you created a filename with exactly 8.3, it insisted on also (and needlessly) generating a "~1"-type DOS filename.

I wonder if you're seeing something analogous ...

_________________
OldProfessorBear
Sexagenarian Boy Genius
Shameless Self-Promotion:
***** http://wefixpix.US *****
Geeks do it with a soldering iron. Twisted Evil
View user's profileSend private message
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Thu Aug 11, 2005 3:38 pm Reply with quoteBack to top

Ok, todays a better day - I got file upload to work consistantly with filenames whose length=12. It now always creates short names if it's in the 8+3 format.

The bug was my own... amidst all of the things I was tweaking with the code I neglected to send strlen+1 bytes instead of strlen. The file/path name functions definitely need to hear that /0 terminator!

Still no joy with downloads. All of the download code is analagous to the upload code, but I always get a zero length file. Mad

I'll be working on incorporating this into Ops soon, so you guys can have at it with the movie upload testing. Hopefully one of the other devs will incorporate "other file transfers" too, so someone can join me in my misery.
View user's profileSend private messageVisit poster's website
carpespasm



Joined: 05 Aug 2005
Posts: 1541
Location: jacksonville, fl

PostPosted: Thu Aug 11, 2005 4:43 pm Reply with quoteBack to top

good job BillW! glad to hear you got it going. do the videos have to be in 320x240 or can it play any reasonably sized xvid?

_________________
rat shack, you've got questions, we've got blank stares.... and cell phones.
View user's profileSend private messageAIM Address
BillW



Joined: 14 Apr 2005
Posts: 2507
Location: in a tightly curled dimension

PostPosted: Thu Aug 11, 2005 4:55 pm Reply with quoteBack to top

I don't know what the limitation on playback is at this point, since I've only had limited time for testing. Previously downloaded files injected and played back just fine. The two Internet xvid files I tried (neither at the correct resolution) were purged on camera boot.

I figure I'll put out an Ops release and you guys can do the detective work on what can be played, and how it needs to be prepped. Deal? ;)
View user's profileSend private messageVisit poster's website
Maxwell Smart



Joined: 07 Aug 2005
Posts: 278

PostPosted: Thu Aug 11, 2005 4:56 pm Reply with quoteBack to top

I have another question, for you people who have been testing with 640x480, does the video always play flawlessly in playback? If so then I think its just a matter of finding the way that it 'marks' the videos and then figuring out how to apply that 'mark' to our own xvid clips (family guy anyone?)

Also Bill, Id be more then happy to test the upload code if you could put out a new version of OPS.
View user's profileSend private message
hal0gen



Joined: 09 Aug 2005
Posts: 63
Location: Cartersville, Ga

PostPosted: Thu Aug 11, 2005 5:02 pm Reply with quoteBack to top

im putting together video samples with different codec settings and resolutions. eagerly awaiting code...

great work
View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
Minion



Joined: 09 Aug 2005
Posts: 8

PostPosted: Fri Aug 12, 2005 2:40 am Reply with quoteBack to top

I've been putzing around with the camera tonight, poking at a few of the USB commands - I'm guessing I43_GetStorageMediaStatus returns the amount of of memory remaining - its returning with a sequence that decreases while the camera is recording .... a snippet of the integer values I'm getting back follows:

Code:

    0 128582748 2244608 4199947 4199732 4 55 23 0 2293120
    0 128582748 2244608 4199947 4199732 4 55 0  0 4207680
    0 128582748 2244608 4199947 4199732 4 55 0  0 4207680
(start recording video and remonitor)
65536 128582748 2228224 4199947 4199732 4 55 35 0 2293120
65536 128582748 2228224 4199947 4199732 4 55 0  0 4207680
65536 128451675 2228224 4199947 4199732 4 55 0  0 4207680
65536 128320602 2228224 4199947 4199732 4 55 0  0 4207680
65536 128189529 2228224 4199947 4199732 4 55 0  0 4207680
65536 128058456 2228224 4199947 4199732 4 55 0  0 4207680
65536 127927382 2228224 4199947 4199732 4 55 0  0 4207680
65536 127927382 2228224 4199947 4199732 4 55 0  0 4207680
65536 127796309 2228224 4199947 4199732 4 55 0  0 4207680
65536 127665236 2228224 4199947 4199732 4 55 0  0 4207680


The second value appears to be the amount of video memory left - while recording the value steadily decreases as long as there is movement with the camera and the scene is changing. Anyone have any other guesses? I'm not entirely sure if I'm getting data in the right format - I'm still messing around with learning some of the USB calls, and I cant explain why the first call after unlocking is different from subsequent either, but it appears as if we'll be able to get the amount of free memory on the unit by this command.
View user's profileSend private message
Minion



Joined: 09 Aug 2005
Posts: 8

PostPosted: Fri Aug 12, 2005 3:12 am Reply with quoteBack to top

Also, it appears that the time might be embedded in the status too - when my camcorder shows the time (using zappeds method), the 6th, 7th and 8th values appear to line up perfectly with the the time - in the above, it was reading 4:55:35 as the time.
View user's profileSend private message
Maxwell Smart



Joined: 07 Aug 2005
Posts: 278

PostPosted: Fri Aug 12, 2005 3:41 am Reply with quoteBack to top

BillW, are you gonna release that new OPS?
View user's profileSend private message
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum