Go Down

Topic: USB Host controller (Read 16942 times) previous topic - next topic


Sep 25, 2010, 08:26 pm Last Edit: Sep 25, 2010, 08:41 pm by Camille29 Reason: 1
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?


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


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


Sep 26, 2010, 01:17 pm Last Edit: Sep 26, 2010, 01:34 pm by nkostop Reason: 1
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.


Sep 26, 2010, 03:24 pm Last Edit: Sep 26, 2010, 03:29 pm by Camille29 Reason: 1
you can find the DPC_Key in the lib Gphoto2:
and DPC in
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


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.


Sep 26, 2010, 04:05 pm Last Edit: Sep 26, 2010, 04:21 pm by Camille29 Reason: 1
Yes you must make yourself your define DPC_Key with the
{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
typedef enum {
     SHUTTER_SPEED_30_SEC = 0x10,
     SHUTTER_SPEED_25_SEC = 0x13,
     SHUTTER_SPEED_20_SEC = 0x15,
     SHUTTER_SPEED_15_SEC = 0x18,
please try getevent ;)


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!


Sep 30, 2010, 02:03 am Last Edit: Sep 30, 2010, 02:07 am by nkostop Reason: 1
OK it works for me...That is great news!


You haven't got any NAK??Lucky man! ;)


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

ewan colsell


great work on the digital camera interface.

are you thinking about porting this to arduino uno?


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


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?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131