xboxscene.org forums

Pages: [1] 2

Author Topic: Official Webcam Project  (Read 97 times)

sibrdav

  • Archived User
  • Newbie
  • *
  • Posts: 24
Official Webcam Project
« on: July 23, 2006, 07:26:00 PM »

Well, thanks everyone for your input.  Apparently no one is interested in voting anymore after the bush election.  I've gone ahead and selected a webcam to use without any suggestions, however I am still interested in comments about the webcam I've selected.  It is a logitech messenger.  I don't know the model number or retail price yet - I got it used from ebay for $15 including shipping.  It has 640x480 resolution, pushbutton photo, and a built in microphone.  I don't know if I'll be programming use for the microphone because I don't think most people will be sitting close enough to their webcam for the mic to pick up properly.  Instead I think I will support the xbox communicator for microphone and speaker use.  I will also option the audio through the tv.  For those of you who don't have a communicator and want to use the webcam, I would suggest cue cards  tongue.gif   Now we wait for my webcam to arrive!
Logged

sibrdav

  • Archived User
  • Newbie
  • *
  • Posts: 24
Official Webcam Project
« Reply #1 on: July 27, 2006, 09:02:00 PM »

I received my webcam in the mail today - YAY! laugh.gif The first thing I did was test it on my pc, it works great, has a nice picture, and looks like brand new.  I got a good deal on this one.  Next I made an xbox->usb cord adapter so I could plug my webcam into my xbox without cutting the cord.  Easy enough with a leftover controller plug, a usb extension cable (cut to use the female side) my professional soldering skills and some shrink tubing.  I won't cover how to make it, there are enough tutorials for that.  And away we go to programming!  I am currently working on enumerating the device.  I have successfully enumerated most of the descriptors and determined the following important info.

1) this is a full-speed device
2) usb1.1 compliant
3) isochronous data transfer protocol

This may take a little time for me to get data back because I've never used isochronous before, but here I go!
Logged

sibrdav

  • Archived User
  • Newbie
  • *
  • Posts: 24
Official Webcam Project
« Reply #2 on: July 28, 2006, 10:30:00 AM »

Alright, here are the descriptors enumerated from the webcam just in case anyone wants to know.

device descriptor:
x12 length (18)
x01 descriptor type (device)
(2)x0200 bcd usb (2.0)
xff class code (vendor defined)
xff subclass code (vendor defined)
xff protocol code (vendor defined)
x08 mps (8)
(2)x046d vendor id (logitech)
(2)x08f0 product id (camera?)
(2)x0100 bcd device release # (1.0)
x00 mfr string index (n/a)
x01 product string index (1)
x00 serial # index (n/a)
x01 number of configs (1)

config descriptor:
x09 length (9)
x02 descriptor type (config)
(2)x00ad total length (173)
x03 number of interfaces (3)
x01 config value (1)
x00 config string index (n/a)
xa0 power attributes (bus powered, remote wakeup)
x32 max power consumption (100ma)

interface descriptor:
x09 length (9)
x04 descriptor type (interface)
x00 interface number (0)
x00 alternate setting (0)
x02 number of endpoints (2)
xff interface class (vendor defined)
xff interface subclass (vendor defined)
xff interface protocol (vendor defined)
x00 interface string index (n/a)

endpoint descriptor:
x07 length (7)
x05 descriptor type (endpoint)
x81 endpoint address (EP1, input)
x01 endpoint attributes (isochronous, no sync, data endpoint)
(2)x0000 max packet size (0)
x01 interval (1ms)

endpoint descriptor:
x07 length (7)
x05 descriptor type (endpoint)
x82 endpoint address (EP2, input)
x03 endpoint attributes (interrupt)
(2)x0001 max packet size (1)
x10 interval (16ms)

interface alt descriptor:
x09 length (9)
x04 descriptor type (interface)
x00 interface number (0)
x01 alternate setting (1)
x02 number of endpoints (2)
xff interface class (vendor defined)
xff interface subclass (vendor defined)
xff interface protocol (vendor defined)
x00 interface string index (n/a)

endpoint descriptor:
x07 length (7)
x05 descriptor type (endpoint)
x81 endpoint address (EP1, input)
x01 endpoint attributes (isochronous, no sync, data endpoint)
(2)x03ff max packet size (1023 = 1Kb)
x01 interval (1ms)

endpoint descriptor:
x07 length (7)
x05 descriptor type (endpoint)
x82 endpoint address (EP2, input)
x03 endpoint attributes (interrupt)
(2)x0001 max packet size (1)
x10 interval (16ms)

audio class interface descriptor:
x09 length (9)
x04 descriptor type (interface)
x01 interface number (1)
x00 alternate setting (0)
x00 number of endpoints (0)
x01 interface class (audio)
x01 interface subclass (audio control)
x00 interface protocol (0)
x00 interface string index (n/a)

class specific (audio) interface descriptor:
x09 length (9)
x24 descriptor type (class specific interface)
x01 descriptor subtype (header)
(2)x0200 bcd audio device class spec release (2.0)
(2)x0027 total length (39)
x01 number of streaming interfaces (1)
x02 interface number of streaming interface (2)

class specific (audio) interface descriptor:
x0c length (12)
x24 descriptor type (class specific interface)
x02 descriptor subtype (input terminal)
x01 terminal id (1)
(2)x0201 terminal type (microphone)
x00 associated terminal (0)
x01 number of channels (1)
(2)x0000 channel config (none for mono)
x00 index channel names (n/a)
x00 index terminal (n/a)

class specific (audio) interface descriptor:
x09 length (9)
x24 descriptor type (class specific interface)
x06 descriptor subtype (feature unit)
x02 unit id (2)
x01 source id (1)
x02 control size (2 bytes)
(2)x0043 bitmap of controls (mute, volume, auto gain)
x00 string index (n/a)

class specific (audio) interface descriptor:
x09 length (9)
x24 descriptor type (class specific interface)
x03 descriptor subtype (output terminal)
x03 terminal id (3)
(2)x0101 terminal type (usb streaming)
x00 associated terminal (0)
x02 source id (2)
x00 string index (n/a)

interface2 descriptor:
x09 length (9)
x04 descriptor type (interface)
x02 interface number (2)
x00 alternate setting (0)
x01 number of endpoints (1)
x01 interface class (audio)
x02 interface subclass (audio streaming)
x00 interface protocol (n/a)
x00 interface string index

endpoint descriptor:
x09 length
x05 descriptor type
x83 endpoint address (EP3, input)
x01 endpoint attributes (isochronous, no sync, data endpoint)
(2)x0000 max packet size
x01 interval (1ms)
x00
x00

interface2 alt descriptor:
x09 length
x04 descriptor type
x02 interface number
x01 alternate setting
x01 number of endpoints
x01 interface class (audio)
x02 interface subclass (audio streaming)
x00 interface protocol
x00 interface string index


class specific (audio) interface descriptor:
x07 length (7)
x24 descriptor type (class specific interface)
x01 descriptor subtype (header)
x03
x01
x01
x01
x01 BLAH
x00 BLAH

class specific (audio) interface descriptor:
x14 length (20)
x24 descriptor type (class specific interface)
x02 descriptor subtype (input terminal)
x01 terminal id (1)
(2)x0201 terminal type (microphone)
x10
x04
x40
x1f
x00
x11
x2b
x00
x80
x3e BLAH
x00 BLAH
x22 BLAH
x56 Im tired of referencing all these descriptors
x00 I wont be using these audio interfaces anyways

endpoint descriptor:
x09 length
x05 descriptor type
x83 endpoint address (EP3, input)
x01 endpoint attributes (isochronous, no sync, data endpoint)
(2)x0034 max packet size (52)
x01 interval (1ms)
x00
x00

class specific (audio) endpoint descriptor:
x07 length
x25 descriptor type
x01 endpoint address (EP3, input)
x01 endpoint attributes (isochronous, no sync, data endpoint)
(2)x0000 max packet size
x00 interval (1ms)

Way too many descriptors for me. wacko.gif   I may have left out a string descriptor or two, but no matter.  They won't help me right now.
Logged

blaize

  • Archived User
  • Newbie
  • *
  • Posts: 47
Official Webcam Project
« Reply #3 on: August 01, 2006, 05:31:00 PM »

man, if you could get this working... god will have some competition tongue.gif
i had this idea quite some time ago, but my lack (.. yeah, none) of programming experience kinda kicked the idea away again.

hope you'll make it possible smile.gif
Logged

The Zep Man

  • Archived User
  • Hero Member
  • *
  • Posts: 888
Official Webcam Project
« Reply #4 on: August 02, 2006, 02:25:00 AM »

You DO know that there is already a webcam available for the Xbox?

From Wikipedia:

QUOTE
Мicrosoft has also revealed an Xbox Live webcam, for video chat. The webcam has been exclusively released in Japan, due to high Internet speeds and it carries a price tag of 6800 yen (roughly $60). (Official Xbox Magazine — March 2005 — Pg. 26)


I hope you have experience with programming drivers, especially since the XDK does not have much support for (development of) third-party hardware drivers.
Logged

sibrdav

  • Archived User
  • Newbie
  • *
  • Posts: 24
Official Webcam Project
« Reply #5 on: August 02, 2006, 05:02:00 PM »

blaize & The Zep Man - I have replied to your posts here:
Webcam Server On Xbox?
I'd like to keep this topic clear for development discussion only.  Thanks
Logged

kornkob

  • Archived User
  • Newbie
  • *
  • Posts: 2
Official Webcam Project
« Reply #6 on: August 12, 2006, 11:41:00 PM »

i was working on webcam drivers and am about half done but i stopped because i had a bug i didnt have time to fix in the low level send/receive, if you have that much working, i could help ya.

tonight i got my gps code on pc working, will also be porting that over.
Logged

fghjj

  • Archived User
  • Sr. Member
  • *
  • Posts: 288
Official Webcam Project
« Reply #7 on: August 13, 2006, 07:05:00 AM »

I wonder how this works alongside the XDK. Can two USB stacks make use of the same host controller at the same time, without messing up internal state of the controller of something like that?

Does it waste lots of RAM / CPU time to handle all USB stuff twice?

Is it possible to make the XDK never touch anything USB at all, by for example not calling XInitDevices()?

An "XDK USB driver replacement" could be very useful for the Xbox homebrew software, given that:
- it has some advantage (webcam / USB mass storage support)
- it supports normal and 3rd party Xbox controllers, and the IR module
- it's stable and efficient
- it emulates the current XDK API
Logged

sibrdav

  • Archived User
  • Newbie
  • *
  • Posts: 24
Official Webcam Project
« Reply #8 on: August 13, 2006, 02:52:00 PM »

QUOTE
Does it waste lots of RAM / CPU time to handle all USB stuff twice?

the host controller handles all of the usb stuff - no programming required - the drivers basically just point the host controller to where the data is.  So , no, it doesn't WASTE any more ram/cpu time than would normally be required.
QUOTE
Is it possible to make the XDK never touch anything USB at all, by for example not calling XInitDevices()?

The usb stack isnt created until xinitdevices() is called, so to answer your question...yes.  The drivers i've written never call xinitdevices(), i just create my own stack similar to how xinitdevices() would.
QUOTE
An "XDK USB driver replacement" could be very useful for the Xbox homebrew software...

This indeed would be useful.  I think the best way for this to work is to just allow the usb driver to load external drivers, then you can just write drivers for your individual program needs.  You wouldn't want to create the usb driver with a limited number of included drivers, because then it would be the same as it is now - not fulfilling everyone's needs.  I will look into this subject in the near future.
Logged

Tp21

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Official Webcam Project
« Reply #9 on: August 16, 2006, 03:16:00 PM »

is this project still alive?
are there any updates on getting drivers on the xbox?
Logged

Tp21

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Official Webcam Project
« Reply #10 on: August 17, 2006, 05:02:00 AM »

will it be an complete driver system or only for that webcam (and hardcoded, so no extra drivers?)
or will it be more like an 'normal' driver system where you can use your own drivers as modules?
Logged

sibrdav

  • Archived User
  • Newbie
  • *
  • Posts: 24
Official Webcam Project
« Reply #11 on: August 20, 2006, 05:34:00 PM »

Just a quick update for those of you watching this topic.  I figured out what commands (and how to implement them in my code) to get the webcam to start sending an isochronous data stream.  Now I need to figure out how to code the transfer descriptor to receive the data stream.  Then I will need to interpret the data and put it on the screen.  When I get that far I will release a version with source.  Until then, keep watching and feel free to offer any advice/comments.
Logged

Tp21

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Official Webcam Project
« Reply #12 on: August 21, 2006, 03:59:00 AM »

that's very nice! i'm really eager to see the source. how long do you think it takes to do all that stuff you have to do, or don't you have an timeframe?
Logged

jeffroiscool

  • Archived User
  • Newbie
  • *
  • Posts: 26
Official Webcam Project
« Reply #13 on: October 08, 2006, 12:28:00 PM »

any news on this, this will be very interesting,
We can begin making xbmc a OS ohmy.gif
That would be so cool!
Logged

gottastopdrinkin

  • Archived User
  • Full Member
  • *
  • Posts: 175
Official Webcam Project
« Reply #14 on: October 29, 2006, 09:06:00 PM »

Hmmm, no way this is still an ongoing project.
What a shame. sleep.gif
Logged
Pages: [1] 2