Re: [libdc] Flea3 on OSX 10.9 failing at dc1394_capture_setup()
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Damien D. <dd...@do...> - 2014-03-06 03:40:11
|
Jim, Benedict, Thanks a lot for your debugging work on USB3. I don't have the hardware to help but I'm definitely following this closely. I've already pushed the two new USB IDs in the repo. Damien On Wed, 2014-03-05 at 09:27 -0500, Benedict Brown wrote: > This is very helpful Jim. Thank you. I will test these things out, > hopefully next week, and see what happens. My Flea3 is 3MP, and I need to > drive it at full resolution, so I'm curious if that will work on USB 2 > (which would be just fine--frame rate is not a concern). I think we're > seeing the same problem of maximum buffer size in the mac USB 3 driver that > exists in the Linux one. If we can figure out how to make those buffers > larger, higher resolutions should work on USB 3 as well. > > > On Tue, Mar 4, 2014 at 12:28 PM, jcassidy <jca...@no...>wrote: > > > > > Here is an update on what I have found regarding the Flea3 USB camera on > > OSX in case it saves > > others some time. > > > > 1) Got it working at both 1280x960 (the default value) and 1280x1024 > > (requires cmd seq & usb2 hub) > > 2) There are two firmwares for this camera: 1.32.3.2 and 2.7.3.0 and they > > behave differently > > and have different USB Interface numbers and USB product numbers! > > Here is my usb_products > > table: > > > > { 0x1e10, 0x2000 }, // Point Grey Firefly MV Color > > { 0x1e10, 0x2001 }, // Point Grey Firefly MV Mono > > { 0x1e10, 0x2002 }, // Point Grey High Res Firefly MV Color > > { 0x1e10, 0x2003 }, // Point Grey High Res Firefly MV Mono > > { 0x1e10, 0x2004 }, // Point Grey Chameleon Color > > { 0x1e10, 0x2005 }, // Point Grey Chameleon Mono > > { 0x1e10, 0x3000 }, // Point Grey Flea 3 > > { 0x1e10, 0x3005 }, // Point Grey Flea 3 (FL3-U3-13Y3M) > > { 0x1e10, 0x3006 }, // Point Grey Flea 3 (FL3-U3-13S2C) > > { 0x1e10, 0x3008 }, // Point Grey Flea 3 (FL3-U3-88S2C) > > { 0x1e10, 0x300a }, // Point Grey Flea 3 (FL3-U3-13E4C) > > { 0x1e10, 0x300b }, // Point Grey Flea 3 (FL3-U3-13E4M with 1.43.3.2 > > FW) > > { 0x1e10, 0x3300 }, // Point Grey Flea 3 (FL3-U3-13E4M with 2.7.3.0 > > FW) > > { 0, 0 } > > > > Firmware 2.7.x puts the 0x81 endpoint in interface 2, which breaks usb > > capture.c. Firmware > > 1.32.x puts the 0x81 endpoint in the normal interface 0 position and > > requires no changes > > to capture.c. My camera came with 2.7.x, so I did a firmware switch. > > Both are on the PtGray > > support site. > > > > 3) When the camera is initialized and frames grabbed, they are only > > 1280x960. To get 1280x1024, > > the camera will need to be switched to Format7 mode 0 and the offset > > and frame size and > > packet params set. I have the code to perform these steps in > > ObjectiveC if anyone is interested. > > > > Note: This switch to 1280x1024 will not work with USB 3. The bulk > > transfers will receive > > no data. HOWEVER, putting a USB2 hub between the camera and mac makes > > everything work. > > I.e. initializing the camera and performing the switch to Format7 mode > > 0 will produce proper > > 1280x1024 frames. I am using libdc1394 2.2.2 and libusb 1.0.18 under > > mavericks on a new > > mac mini. > > > > Turning on the libdc debug messages, this is what I see for USB 3 > > connection after applying the > > switch for Format 7: > > > > libdc1394 debug: Mode 88, 1280x1024, packet size 10004, packets per > > frame 132 > > libdc1394 debug: usb: Frame size is 1320528 > > libdc1394 debug: usb: Helper thread starting > > libdc1394 debug: usb: Bulk transfer 0 complete, 0 of 1320528 bytes > > libdc1394 debug: usb: Bulk transfer 1 complete, 0 of 1320528 bytes > > > > But, just drop a USB 2 hub between the camera and the mac and the same > > code produces: > > > > libdc1394 debug: Mode 88, 1280x1024, packet size 6560, packets per > > frame 200 > > libdc1394 debug: usb: Frame size is 1312000 > > libdc1394 debug: usb: Helper thread starting > > libdc1394 debug: usb: Bulk transfer 0 complete, 1312000 of 1312000 > > bytes > > libdc1394 debug: usb: Bulk transfer 1 complete, 1312000 of 1312000 > > bytes > > libdc1394 debug: usb: Bulk transfer 2 complete, 1312000 of 1312000 > > bytes > > libdc1394 debug: usb: Bulk transfer 3 complete, 1312000 of 1312000 > > bytes > > > > And we have video frames. So I now have 1280x1024 as long as I use the > > USB2 hub > > to downgrade the connection. Looking at the usb prober output there is a > > slight > > different between how the camera is viewed based on its connection, but I > > am not a USB guru. > > > > USB 2: > > Interface #0 - Vendor-specific > > Alternate Setting 0 > > Number of Endpoints 1 > > Interface Class: 255 (Vendor-specific) > > Interface Subclass; 0 (Vendor-specific) > > Interface Protocol: 0 > > Endpoint 0x81 - Bulk Input > > Address: 0x81 (IN) > > Attributes: 0x02 (Bulk) > > Max Packet Size: 512 > > Polling Interval: 0 ( Endpoint never NAKs) > > > > USB 3 > > Interface #0 - Vendor-specific > > Alternate Setting 0 > > Number of Endpoints 2 > > Interface Class: 255 (Vendor-specific) > > Interface Subclass; 0 (Vendor-specific) > > Interface Protocol: 0 > > Endpoint 0x81 - Bulk Input > > Address: 0x81 (IN) > > Attributes: 0x02 (Bulk) > > Max Packet Size: 1024 > > SuperSpeed Endpoint Companion > > Endpoint 0x82 - Interrupt Input > > > > Regards, > > Jim. > > > > > > > > > > > > On 3/1/2014, 11:37 PM, Benedict Brown wrote: > > > > I recently had some success with the flea3 on linux (not yet on mac). > > It turns out you have to add a kernel boot option to increase a maximum > > buffer size in the USB driver. The info is buried in a PtGrey document > > here: > > http://www.ptgrey.com/support/downloads/documents/TAN2012007_UsingLinuxUSB3.pdf > > . > > > > Once I added the necessary boot parameter, I could get full resolution > > and frame rate in coriander. I'm using libdc 2.2.1 with the Flea3 USB ID > > added, and the stock libusb and coriander packages from Min 16/Ubuntu 13.10. > > > > It's entirely possible there is a similar issue underlying the problems > > on the mac, although I don't have any sort of solution or workaround to > > suggest. I have yet to get the flea3 working on the mac myself. Still, > > progress is progress. > > > > > > On Mon, Feb 10, 2014 at 10:49 AM, Benedict Brown <bj...@gm...>wrote: > > > >> I've been working on and off on getting a flea3 to work as well. I get > >> the same error as you, I think. The latest versions of libusb do support > >> USB3, but I'm not sure the problem lies there. I run into the same > >> problems with FlyCapture on linux, so I think the problem is at the driver > >> level. > >> > >> I can get the flea3 to work in linux as long as the over all packet size > >> is below some threshold, but that limits me to roughly 1.5Mpixels in RGB8. > >> Again, I hit the same wall with both FlyCapture and libdc1394. I can also > >> replicate it on linux distros, multiple USB chipsets and both USB 2 and USB > >> 3 ports. On the other hand, FlyCapture on Windows will give me data at > >> full resolution even over a USB port. > >> > >> > >> On Mon, Feb 10, 2014 at 10:35 AM, Rodolphe Pineau <pi...@rt...>wrote: > >> > >>> I don't think libusb supports usb3 yet. > >>> I don't have a usb3 camera so I can't really look into this. > >>> You might want to ask in the libusb-dev list. > >>> > >>> Rodolphe > >>> > >>> > >>> On Sun 2/9/14, at 11:42, jcassidy <jca...@ga...> wrote: > >>> > >>> > > >>> > Hello All, > >>> > > >>> > I was wondering if anyone has had success getting a Flea camera > >>> working on 10.9.1 > >>> > with a usb3 port? > >>> > > >>> > The camera is a: PtGrey Flea FL3-U3-13E4M, vendor: 0x1e10, prod: > >>> 0x3300. It is recognized and > >>> > responds to initial function calls in the helloword.c example program > >>> but fails at: > >>> > > >>> > err = dc1394_capture_setup( camera, 4, > >>> DC1394_CAPTURE_FLAGS_DEFAULT ); > >>> > > >>> > with the message: > >>> > > >>> > libdc1394 error: usb: Failed to submit initial transfer 0 > >>> > > >>> > I am using the latest dc1394 source via a git clone and libusb-1.0.18 > >>> on a recent mac > >>> > mini with usb3 ports. > >>> > > >>> > Any insights/help would be greatly appreciated! > >>> > > >>> > Regards, > >>> > Jim. > >>> > > >>> > > >>> > > >>> > > >>> ------------------------------------------------------------------------------ > >>> > Managing the Performance of Cloud-Based Applications > >>> > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > >>> > Read the Whitepaper. > >>> > > >>> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk_______________________________________________ > >>> > Mailing list for libdc1394-devel > >>> > lib...@li... > >>> > https://lists.sourceforge.net/lists/listinfo/libdc1394-devel > >>> > >>> -- > >>> | Rodolphe Pineau RTI-Zone | > >>> | http://www.rti-zone.org/ | > >>> | Robotics / Unix / Mac OS X / Astronomy | > >>> > >>> > >>> > >>> ------------------------------------------------------------------------------ > >>> Managing the Performance of Cloud-Based Applications > >>> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > >>> Read the Whitepaper. > >>> > >>> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > >>> _______________________________________________ > >>> Mailing list for libdc1394-devel > >>> lib...@li... > >>> https://lists.sourceforge.net/lists/listinfo/libdc1394-devel > >>> > >> > >> > > > > > > ------------------------------------------------------------------------------ > > Flow-based real-time traffic analytics software. Cisco certified tool. > > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > > Customize your own dashboards, set traffic alerts and generate reports. > > Network behavioral analysis & security monitoring. All-in-one tool.http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > > > > > > > > _______________________________________________ > > Mailing list for lib...@li...https://lists.sourceforge.net/lists/listinfo/libdc1394-devel > > > > > > > > > > ------------------------------------------------------------------------------ > > Subversion Kills Productivity. Get off Subversion & Make the Move to > > Perforce. > > With Perforce, you get hassle-free workflows. Merge that actually works. > > Faster operations. Version large binaries. Built-in WAN optimization and > > the > > freedom to use Git, Perforce or both. Make the move to Perforce. > > > > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > > _______________________________________________ > > Mailing list for libdc1394-devel > > lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libdc1394-devel > > > > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Mailing list for libdc1394-devel > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdc1394-devel -- Damien 高原 Douxchamps http://damien.douxchamps.net/ |