Pages: 1 2 3 [4] 5 6   Go Down
Author Topic: USB Host controller  (Read 12124 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks to quick reply Felis:
Can you explain me how :"Set callback to parser function to NULL" ?
I test :Eos.EventCheck(NULL); and NAK again
I'd like to test...
Can you explain that?How in bulk mode whe can know the end of data send (not packet end):
           I used function usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, int timeout)
           size fixed to 130000 octets (very larger than the packet response data), and timeout=4000 (longer than embedded code)
           This function automatically return at the end of GetEvent READ OPERATION Data
           Even thought Last Step is a usb_bulk_read too (WRITE OPERATION CODE/READ DATA/READ RESPONSE)
           usb_bulk_read never catch the data packet and the response packet in the same time
           How usb_bulk_read done to know the send data packet is finish? Is there a USB Marker to flag end transmission?
« Last Edit: September 25, 2010, 01:41:06 pm by Camille29 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to ask how to change the apperture and speed of the camera with felis code and usb shield.
Thanks.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use this Function ;
SetProperty(uint16_t prop, uint32_t val)
this define
#define      PTP_DPC_CANON_EOS_Aperture                        0xD101
#define      PTP_DPC_CANON_EOS_ShutterSpeed                 0xD102
#define PTP_DPC_Key_CANON_EOS_Aperture_auto         0xffff
#define PTP_DPC_Key_CANON_EOS_Aperture_1            0x08
#define PTP_DPC_Key_CANON_EOS_Aperture_1_1          0x0b
#define PTP_DPC_Key_CANON_EOS_Aperture_1_2          0x0c
#define PTP_DPC_Key_CANON_EOS_Aperture_1_2_BIS      0x0d
#define PTP_DPC_Key_CANON_EOS_Aperture_1_4          0x10
#define PTP_DPC_Key_CANON_EOS_Aperture_1_6          0x13
#define PTP_DPC_Key_CANON_EOS_Aperture_1_8          0x14
#define PTP_DPC_Key_CANON_EOS_Aperture_1_8_BIS      0x15
#define PTP_DPC_Key_CANON_EOS_Aperture_2            0x18
#define PTP_DPC_Key_CANON_EOS_Aperture_2_2          0x1b
#define PTP_DPC_Key_CANON_EOS_Aperture_2_5          0x1c
#define PTP_DPC_Key_CANON_EOS_Aperture_2_5_BIS      0x1d
#define PTP_DPC_Key_CANON_EOS_Aperture_2_8          0x20
#define PTP_DPC_Key_CANON_EOS_Aperture_3_2          0x23
#define PTP_DPC_Key_CANON_EOS_Aperture_3_5          0x24
#define PTP_DPC_Key_CANON_EOS_Aperture_3_5_BIS      0x25
#define PTP_DPC_Key_CANON_EOS_Aperture_4            0x28
#define PTP_DPC_Key_CANON_EOS_Aperture_4_5          0x2b
#define PTP_DPC_Key_CANON_EOS_Aperture_4_5_BIS      0x2c
#define PTP_DPC_Key_CANON_EOS_Aperture_5            0x2d
#define PTP_DPC_Key_CANON_EOS_Aperture_5_6          0x30
#define PTP_DPC_Key_CANON_EOS_Aperture_6_3          0x33
#define PTP_DPC_Key_CANON_EOS_Aperture_6_7          0x34
#define PTP_DPC_Key_CANON_EOS_Aperture_7_1          0x35
#define PTP_DPC_Key_CANON_EOS_Aperture_8            0x38
#define PTP_DPC_Key_CANON_EOS_Aperture_9            0x3b
#define PTP_DPC_Key_CANON_EOS_Aperture_9_5          0x3c
#define PTP_DPC_Key_CANON_EOS_Aperture_10           0x3d
#define PTP_DPC_Key_CANON_EOS_Aperture_11           0x40
#define PTP_DPC_Key_CANON_EOS_Aperture_13           0x43
#define PTP_DPC_Key_CANON_EOS_Aperture_13_BIS       0x44
#define PTP_DPC_Key_CANON_EOS_Aperture_14           0x45
#define PTP_DPC_Key_CANON_EOS_Aperture_16           0x48
#define PTP_DPC_Key_CANON_EOS_Aperture_18           0x4b
#define PTP_DPC_Key_CANON_EOS_Aperture_19           0x4c
#define PTP_DPC_Key_CANON_EOS_Aperture_20           0x4d
#define PTP_DPC_Key_CANON_EOS_Aperture_22           0x50
#define PTP_DPC_Key_CANON_EOS_Aperture_25           0x53
#define PTP_DPC_Key_CANON_EOS_Aperture_27           0x54
#define PTP_DPC_Key_CANON_EOS_Aperture_29           0x55
#define PTP_DPC_Key_CANON_EOS_Aperture_32           0x58
#define PTP_DPC_Key_CANON_EOS_Aperture_36           0x5b
#define PTP_DPC_Key_CANON_EOS_Aperture_38           0x5c
#define PTP_DPC_Key_CANON_EOS_Aperture_40           0x5d
#define PTP_DPC_Key_CANON_EOS_Aperture_45           0x60
#define PTP_DPC_Key_CANON_EOS_Aperture_51           0x63
#define PTP_DPC_Key_CANON_EOS_Aperture_54           0x64
#define PTP_DPC_Key_CANON_EOS_Aperture_57           0x65
#define PTP_DPC_Key_CANON_EOS_Aperture_64           0x68
#define PTP_DPC_Key_CANON_EOS_Aperture_72           0x6b
#define PTP_DPC_Key_CANON_EOS_Aperture_76           0x6c
#define PTP_DPC_Key_CANON_EOS_Aperture_81           0x6d
#define PTP_DPC_Key_CANON_EOS_Aperture_91           0x70

ex:Aperture 9.5
SetProperty(
PTP_DPC_CANON_EOS_Aperture,
PTP_DPC_Key_CANON_EOS_Aperture_9_5
);
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much!
Anyone knows why digital zoom doesn't work on the new library?
I tried to remove the commented lines from the cpp file but still i get errors.
I would also be grateful if you could tell me where did you find these define statements.
Thanks
« Last Edit: September 26, 2010, 06:34:29 am by nkostop » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you can find the DPC_Key in the lib Gphoto2:
libgphoto2-2.4.9\camlibs\ptp2\ptp.c
and DPC in
libgphoto2-2.4.9\camlibs\ptp2\ptp.h
and with the getevent function but for me it's bugging and you?
I don't test all the ElectronicViewFinder EVF function don't know for Zoom
« Last Edit: September 26, 2010, 08:29:06 am by Camille29 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't try getevent. I can't find the define statements at the file you told me. Please check if this is the correct file.
Thanks.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes you must make yourself your define DPC_Key with the
libgphoto2-2.4.9\camlibs\ptp2\ptp.c
{PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x00,  N_("Auto")},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x28,  "6"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x30,  "12"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x38,  "25"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x40,  "50"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x43,  "64"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x48,  "100"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x50,  "200"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x58,  "400"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x60,  "800"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x68,  "1600"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x70,  "3200"},
            {PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, 0x78,  "6400"},

and there is else typedef enum ( there
libgphoto2-2.4.9\camlibs\canon\canon.h
ex:
typedef enum {
      SHUTTER_SPEED_BULB = 0x04,
      SHUTTER_SPEED_30_SEC = 0x10,
      SHUTTER_SPEED_25_SEC = 0x13,
      SHUTTER_SPEED_20_SEC = 0x15,
      SHUTTER_SPEED_15_SEC = 0x18,
.............
please try getevent smiley-wink
« Last Edit: September 26, 2010, 09:21:01 am by Camille29 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK i want to try getevent but i do not know the exact way.If you have an idea please help.
Sorry but i am new to all this.
thanks again!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello, you have just to tested this project:
http://github.com/felis/Arduino_Camera_Control/tree/master/examples/EOSEventLab/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK it works for me...That is great news!
« Last Edit: September 29, 2010, 07:07:25 pm by nkostop » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You haven't got any NAK??Lucky man! smiley-wink
Logged

Louisville, CO
Offline Offline
Full Member
***
Karma: 2
Posts: 174
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Bluetooth communication over HCI -> http://www.circuitsathome.com/mcu/bluetooth-code-for-arduino-usb-host
Logged

/felis

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

felis,

great work on the digital camera interface.

are you thinking about porting this to arduino uno?
Logged

Louisville, CO
Offline Offline
Full Member
***
Karma: 2
Posts: 174
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It should work almost as-is with UNO - you will need to replace stock SPI library to one from 0018 or the playground.
Logged

/felis

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just bought the USB host shield. I am hoping i will be able to use a 3dconnexion 6DOF Input device with it.

Is there a way to look at the input data from unknown devices?
Logged

Pages: 1 2 3 [4] 5 6   Go Up
Jump to: