Last week my friend Hans and I spent some time in my lab exploring which features of his Nikon D300 are available via PTP protocol. Hans is working on extended range HDR-capable intervalometer and he needed to find out a way to switch his camera into bulb mode using Arduino board and USB Host shield. After we finished I realized that while bulb mode is not tricky to activate, it is not obvious either and no hints exist in the code and examples showing how to do this. This short article is intended to fill the void.
In PTP, shooting parameters, such as shutter speed, aperture, ISO, etc. are changed by setting certain device property. For each parameter there exists a list of allowed values of this property, each property value corresponding to a parameter value. For some parameters, property and parameter value lists are dynamic. For example, starting and ending aperture values are different for different lenses; additionally, the aperture step can be changed in camera settings. Stepping can also be changed for shutter speed and exposure compensation and this can also happen during PTP session if a photographer decides to switch modes – in this case a property may become unavailable, like shutter speed in aperture priority mode. Therefore, before changing a property value for one of these parameters it is necessary to somehow retrieve a list of available property values.
The property value list retrieval mechanism is slightly different for different cameras. On Canon DSLRs, a special event is generated by the camera and sent back to PTP host at the beginning of the session and also each time camera mode was changed, lens were swapped and so on. The application needs to track those events and constantly maintain current value list for each property. On Nikon DSLR, it is possible to simply get value list for a property any time it is needed. To save memory, the list is not stored but simply requested from the camera each time a property needs changing. It is combined with actual property change in two templates – StepUp
and StepDown
. If you need to increase, for example, shutter speed – call StepUp
. If you need to decrease it, call StepDown
.
If you “step up” shutter speed on Nikon DSLR manually, the last 2 values will be 30 seconds and bulb. If you step up shutter speed using StepUp
method using Nkremote sketch it will stop at 30 seconds. This happens because bulb mode is not included in the list of available property values for shutter speed but simply defined as 0xffffffff
. As a result, StepUp
doesn’t know that another value is available. It is still possible, however, to set the property directly and I will show you how to do it.
For the demonstration, I will be modifying Nkremote
sketch itself. The psconsole.cpp
file contains the menu tree. The “Change Settings” menu contains transitions to menus which change a particular parameter of the camera. The last one, i.e., number nine or “FocusPoint” is not very useful for remote control so I’m going to modify this menu to activate bulb mode instead. The code of ChangeFocusAreaMenu()
is as follows:
QState PSConsole::ChangeFocusAreaMenu(PSConsole *me, QEvent const *e) { switch (e->sig) { case Q_ENTRY_SIG: PrintMenuTitles(UPDWN_MENU_COUNT, menuUpDown); PrintFocusArea(); return Q_HANDLED(); case MENU_SELECT_SIG: { switch (((MenuSelectEvt*)e)->item_index) { case 0: return Q_TRAN(&PSConsole::ChangeSettingsMenu); case 2: StepUp<VT_FOCUSAREA>((PTP*)&Nk, NK_DPC_AutofocusArea); PrintFocusArea(); return Q_HANDLED(); case 1: StepDown<VT_FOCUSAREA>((PTP*)&Nk, NK_DPC_AutofocusArea); PrintFocusArea(); return Q_HANDLED(); } // switch (((MenuSelectEvt*)e)->item_index) } // case MENU_SELECT_SIG: } return Q_SUPER(&PSConsole::Active); } |
Cases 1 and 2 originally change the focus area. I’m commenting down StepUp()
and StepDown()
and inserting property change operation (lines 3 and 8). The new code will activate bulb mode if you press ‘1’ or ‘2’ in the terminal.
1 2 3 4 5 6 7 8 9 10 | case 2: //StepUp<VT_FOCUSAREA>((PTP*)&Nk, NK_DPC_AutofocusArea); Nk.SetDevicePropValue(0xd100, (uint32_t)0xffffffff); PrintFocusArea(); return Q_HANDLED(); case 1: //StepDown<VT_FOCUSAREA>((PTP*)&Nk, NK_DPC_AutofocusArea); Nk.SetDevicePropValue(0xd100, (uint32_t)0xffffffff); PrintFocusArea(); return Q_HANDLED(); |
After you change Nkremote, compile it and load into Arduino board. In a terminal window, choose “Change Settings”, then “FocusPoint”. On the next screen press ‘1’ or ‘2’, then ‘0’ to return to the previous level. Now go to “View Settings”, you should see T:Bulb
near the end of the output. To change it back to normal shutter mode go to “Change Settings”, then to the “Shutter Speed”.
Now let’s talk briefly about limitations. First, the bulb mode is only available in “Manual” and “Shutter Priority” modes. In all other modes an attempt to set shutter speed to bulb will be rejected. Another rather annoying limitation is capture command, which doesn’t function in bulb mode ( most Canon DSLRs continue to execute capture when switched to bulb, manually or otherwise). Cable release will work as usual so it is still possible to make a HDR intervalometer which can switch between ‘normal’ and bulb modes – all that is necessary is a digital pin on Arduino, a transistor and a couple of resistors.
This is it for the PTP, bulb mode and Nikons. I hope the information in this article was helpful for you. Enjoy!
Oleg.
Hi,
Can use USB Focus Controler control NIKON camera,such as change ISO,Aperture,etc?
If of course,Why are there not such product in the market?
Thank you!
Hi,
I’m trying to keep up with you guys, some time ago (ehh… almost 2 years now) I was trying to control my EOS 20D camera via USB.
Now I bought myself a other more up to date EOS camera and tried to pick up on things again to control this new one but so far no luck.
I am running Arduino IDE 1.02 with libraries ‘PTP_2.0’ and ‘USB_Host_Shield_2.0’ installed on my iMac Mountain Lion.
I’ve also installed QP for Arduino v4.5.02.
Should the examples compile without any other library or settings?
I feel somehow silly that after a day of trying, going backwards and forwards, I can’t get most of the examples to compile, what am I missing?
cheers,
John
What kind of errors are you getting? Have you been able to compile/run something simple, like PTPDevInfo? -> https://github.com/felis/PTP_2.0/tree/master/examples/ptpsketches/PTPDevInfo
Hi Oleg,
I am able to compile PTPDevInfo and this works beautifully with my USB shield and my EOS/Powershot camera’s.
(your original shield ‘v1’ that I modified it and after I ordered a new one yesterday in your shop).
I also tried a fresh installation of the Arduino IDE on a clean/virgin OSX computer with only the libraries installed that where necessary like PTP_2.0, USB_Host_v2.0, QP for Arduino (this one installed in the Arduino.app library) and some other basic libraries.
But the more advanced programs like EOS camera remote it struggles and doesn’t want to compile.
Can there be things left that I’m missing?
Cheers,
John
BTW; Am I correct that the biggest change from V1 to v2 hardware is cutting GPX connection and tying MRST to the USB controller from the reset of the Arduino. By doing this the hardware seems to be working and also the one that I have from Sparkfun works with this mod.
This is the first error message during compilation;
EOSCamController.pde: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
EOSCamController:536: error: cannot declare variable ‘hnd’ to be of abstract type ‘EosEventHandlers’
eoseventhandler.h:13: note: because the following virtual functions are pure within ‘EosEventHandlers’:
/Users/John/Documents/Arduino/libraries/ptp/eoseventparser.h:37: note: virtual void EOSEventHandlers::OnObjectCreated(const EOSEvent*)
-John
I believe it has something to do with IDE version. I’m using 1.0 – try with this version ans see if it makes any difference.
Similar error in the same area;
EOSCamController.cpp: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
EOSCamController.pde:-1: error: cannot declare variable ‘hnd’ to be of abstract type ‘EosEventHandlers’
eoseventhandler.h:13: note: because the following virtual functions are pure within ‘EosEventHandlers’:
/Users/John/Documents/Arduino/libraries/ptp/eoseventparser.h:37: note: virtual void EOSEventHandlers::OnObjectCreated(const EOSEvent*)
This is strange; I need to take a look into this, give me couple of days.
The problem is that there is one more event handler was added to EOSEventHandler class in the PTP library, but the EOSCamController sample sketch has not been changed since. It is going to be fixed in the next release of the library. Add line:
virtual void OnObjectCreated(const EOSEvent *evt) {};
to eoseventhandler.h file found in EOSCamController folder to make it running.
Hi Oleg en Alex,
Getting there…
I’ve edited the extra line in and now it compiles a lot further then before but it ends with this error;
core.a(new.cpp.o): In function `operator delete(void*)’:
X:\arduino-1.0.2\hardware\arduino\cores\arduino/new.cpp:10: multiple definition of `operator delete(void*)’
QP\qp_port.cpp.o:\\Neelix2\Users\john\My Documents\Arduino\libraries\QP/qp_port.cpp:49: first defined here
I’ve tried Arduino v1.0 / v1.0.2 and QP v4.3.00 / v4.5.02 and combinations of both.
Which version of QP should I stick with anyway?
QP v4.3.00 gave me the result above in both Arduino versions.
Cheers!
Hello,Oleg
If I want to do some experiments of USB control NIKON camera D90,I should use what library?
In my opinion should use “felis-USB_Host_Shield_2.0-2be3f61″and”PTP_2.0-master”.Is right
or wrong?Is there any other library I must want to have?
Thanks!
Can you help me,Thanks!
Bingo!
I’ve added the extra line as Alex suggested and I had commented out some extra lines in the qp_port.cpp
Now it compiles and runs with Arduino v1.0.2 and QP for Arduino v4.3.00
——
// void operator delete(void *) {
// Q_ERROR(); // this operator should never be actually called
// }
——
Thanks both for your help!
John, I would really appreciate you help here since at the moment I recieve no reply from Oleg.
I’ve followed your progress and have made these changes:
1. Replaced qp_ccp
2. Commented out these lines in the qp_port.cpp:
// void operator delete(void *) {
// Q_ERROR(); // this operator should never be actually called
// }
3. Added the following line to eoseventhandler.h file found in EOSCamController folder:
virtual void OnObjectCreated(const EOSEvent *evt) {};
Now I’m able to compile all examples except EOSRemote which spits out this error log:
EOSRemote.cpp: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
EOSRemote.pde:-1: error: cannot declare variable ‘hnd’ to be of abstract type ‘EosEventHandlers’
/eoseventhandlers.h:12: note: because the following virtual functions are pure within ‘EosEventHandlers’:
C:\Program Files (x86)\arduino-1.0.1\libraries\ptp/eoseventparser.h:37: note: virtual void EOSEventHandlers::OnObjectCreated(const EOSEvent*)
Can you help me out with this?
Hi,
I want to do some experiments of USB control NIKON camera D90.
I added librarys “felis-USB_Host_Shield_2.0-2be3f61″and”PTP_2.0-master”base in Arduino v1.0.1.
When I compile NKEventLab.pde and NKEventMonitor.pde and NKLiveView.pde are successful.
But when I compile NKRemote.pde is unsuccessful.Because lose files such as qp_port.h,
Is any librarys I donot add?
Thanks!
Why nobody answer?
waiting…
why?
hello,all
Let nikon camera into LiveView, What command can do it?
Thanks!
Hi!
I’m also struggling with this library for 2 days now.
I’m trying to compile eosHdrCapture and tried as suggested several different verions of the arduino-ide and of the qp-library in all kinds of variants:
Arduino-ide 1.0.1/1.0.2/1.0.3
qp-lib: qp_arduino_4.3.00/ 4.5.02/ 4.5.03
The best solution yet is ArduinoIDE 1.0.1 and qp 4.3.00 with qp_ports.cpp you provided at your site.
But when I try to compile, I’m still getting errors:
core.a(new.cpp.o): In function `operator delete(void*)’:
[…]arduino\cores\arduino/new.cpp:10: multiple definition of `operator delete(void*)’
[…]arduino-1.0.1\libraries\qp/qp_port.cpp:49: first defined here
I googled around but couldn’t find a solution…
Has anybody suggestions for what I could do?
thanks in advance!
You may try to comment it out in qp_port.cpp.
Thank you very much!
That did the trick…
Hi there,
could you please share the modified code?
this would be great!
vincent.langer@filmakademie.de
thanks,
Vincent
What do you mean by “share”? It’s right here in the article.
yes and i did everything alex and hannes mentioned – but with no success!
and i thought someone who had success on windows could send me his whole arduino folder with all libraries.
Oleg,
On the basis of you librarys I succeed in making the D90 camera into the liveview mode and also MoveFocus.
Now I have a question want to your help.When let D90 into liveview mode ,D90 display screen into a blank screen
and D90 control panel display on “PC”. My question is D90 into liveview mode Can make display screen not into a blank screen?
Waiting for your help,You only need to answer” Can or NO”.Thank you very much!
I don’t think it’s possible. I experimented with several Nikon cameras, they all turn off LCD as well as video out when switched to LiveView from a PC. So basically on Nikons you can move focus but you can’t see it.
I see ,thank you!
Hi Oleg,
thank you for documenting all of the PTP commands for the Canon and Nikon cameras.
Have you had any success switching the Canon 5D MkII or 7D into BULB mode while leaving the Mode dial in MANUAL mode. Typically this is for extended HDR work to avoid touching the camera to switch from Manual to Bulb mode when exposures over 30 seconds are required as part of the exposure range.
I know it can be done as I use a programme called GBTimelapse which controls my 5D MkII via a usb tether and I can pretty much ignore what the mode dial is physically set to and use the software to switch modes.
best regards and happy new year
Kev Lewis
The GBTimelapse looks interesting and it has trial version too. Let me see if I can figure out how to implement the functionality.
Thank you for the hint!
Thank you Oleg, your background knowledge would be appreciated
Kev
hi oleg,
some time ago i baught the usb-host shield from solarbotics, it says rev 1.21.
i’m trying to get it to run on a freeduino, mega328, externally powered, with the usbhostlib 2 (from github)
when running the test-script, i get:
Press RESET to restart test
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K
Test failed. Value written: 01 read: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
can i get the shield running?
best regards,
ralf.
I added a paragraph to the hardware manual describing how to mod the old board -> http://www.circuitsathome.com/usb-host-shield-hardware-manual , near the end of the page.
Rehi,
Works like a charm now, thanks for your great work!
Best,
Ralf
I having some trouble getting the EosCamcontroller to compile.
Arduino version 1.0.3 and using arduino qp 4.3.
I added the line virtual void OnObjectCreated(const EOSEvent *evt) {};
to eoseventhandler.h file found in EOSCamController as described above.
I commented out// void operator delete(void *) {
// Q_ERROR(); // this operator should never be actually called
// } in qp_port.cpp as noted above.
than commented out void operator delete(void *) {
Q_ERROR();
now I am left with the following error messages:
qp/qp.cpp.o: In function `QHsm::dispatch(QEvent const*)’:
/Users/fsb/Documents/Arduino/libraries/qp/qp.cpp:235: undefined reference to `Q_onAssert’
/Users/fsb/Documents/Arduino/libraries/qp/qp.cpp:246: undefined reference to `Q_onAssert’
/Users/fsb/Documents/Arduino/libraries/qp/qp.cpp:330: undefined reference to `Q_onAssert’
qp/qp.cpp.o: In function `QHsm::init(QEvent const*)’:
/Users/fsb/Documents/Arduino/libraries/qp/qp.cpp:111: undefined reference to `Q_onAssert’
/Users/fsb/Documents/Arduino/libraries/qp/qp.cpp:134: undefined reference to `Q_onAssert’
Obviously I am doing something stupid, any suggestions for help?
fsb
cleaned up libraries
Everything now compiles with IDE 1.01 and 1.03
Only cannot load Eoscamcontroller (get avrdude stk500 error)
so still working on my canon. However, NKremote works great with my
Nikon D300.
This is great Oleg, Nice work.
fsb
Hi,
To all of you that have problem compiling the library. Here is a short guide I wrote on how to do so:
These are the steps you need to do in order to compile the library:
Download the PTP library: https://github.com/felis/PTP_2.0
Extract and rename the folder to: PTP_20
Download the QP library version 4.3.00: http://sourceforge.net/projects/qpc/files/QP_Arduino/4.3.00/
Extract the QP library and navigate to the libraries/qp folder.
Now replace the qp_port.cpp with the file found here: http://www.circuitsathome.com/chome_downloads/qp_port.cpp
Now comment out the following function:
void operator delete(void *) {
Q_ERROR(); // this operator should never be actually called
}
Now put the files inside the “libraries/qp” folder in the root of the PTP_20 folder.
Now open eoseventhandler.h in PTP_20/examples/Canon_EOS/EOSCamController and eoseventhandlers.h in PTP_20/examples/Canon_EOS/EOSRemote and then add the following function:
virtual void OnObjectCreated(const EOSEvent *evt) {};
So the class end up looking like this:
class EosEventHandlers : public EOSEventHandlers
{
public:
virtual void OnPropertyChanged(const EOSEvent *evt);
virtual void OnAcceptedListSize(const EOSEvent *evt, const uint16_t size);
virtual void OnPropertyValuesAccepted(const EOSEvent *evt, const uint16_t index, const uint32_t &val);
virtual void OnObjectCreated(const EOSEvent *evt) {};
};
Now finally put the PTP_20 directory inside the Arduino libraries folder.
Now you should be able to compile the library.
Thank you, Lauszus! A GODSEND. I am grateful to Oleg for the thousands of hours he has put into this project, but the lack of documentation is a serious obstacle. I keep thinking I will see even a single line comment, or a sentence somewhere. Thank you for writing this down, Lauszus.
Did not work. Was not able to compile. Errors:
controls.h:42: error: ISO C++ forbids declaration of ‘USB’ with no type
controls.h:42: error: expected ‘;’ before ‘*’ token
controls.h:46: error: expected `)’ before ‘*’ token
controls.cpp:4: error: ‘NULL’ was not declared in this scope
controls.cpp: In member function ‘void GPInRegister::CheckControls()’:
controls.cpp:10: error: ‘pUsb’ was not declared in this scope
Also, the instructions are ambiguous in places. “Now put these files inside the PTP_20 directory.” Which files? The instructions seem to put the QP folder in the PTP folder. Surely that’s not right.
I am super grateful that someone took the time to make this great hardware and software available. But without basic installation instructions, part of that excellent effort was wasted.
No they are not “ambiguous” or whatever you want to call them. I just tried following the steps I had written down and it worked perfectly.
You should put the files inside the “libraries/qp” folder in the root of the PTP_20 folder – I have updated my comment, so it should be easier to understand.
If you still can figure it out, I have made the folder available at the following link: http://blog.tkjelectronics.dk/wp-content/uploads/PTP_20.zip.
Congratulations Oleg for your works !!
I have a question :
It is possible to get speed, aperture, White balance settings, and set it,
from the DSLR Nikon camera ?
Have you an PDE sketch exemple ?
I work on a project “Photographer Tools”, that is a color meter, exposure meter,
flash meter, and I search a solution (Actually I create a computer Program with the SDK Nikon)
to get and set directly the parameters mesured by my “Photographer Tools” on the DSLR.
This is the link of my project :
The good way for me,
is to use a remote module (with arduino Nano for example and bluetooth or wifi connection)
to get and set DSLR exposure values from my “Photographer Tools”.
If you have any arduino solution ?
Thanks for your reading.
Regards.
The example which does this is called NKRemote. Look in examples dir under Nikon.
Thanks oleg,
I look this.
That a good news for me (set the exposure from arduino).
Regards.
Hi all,
I have two little questions.
The usb host shield V20 is compatible with the “USB Host Shield for Arduino Pro Mini” ?
The arduino sketch “NKRemote” work with this shield and arduino pro mini ?
It is for create a very smaller transceiver with NRF24L01 Wifi module.
Yes it is compatible, but you might have to solder 5V to the VBUS line.
Thanks for info.
It is not a good news for me if I am forced to use a 3.3V to 5V boost for the VBUS. Thanks, I test all when I receive my mini shield and Arduino pro mini 3.3V.
Hi,
I’m having a bunch of trouble with PTPCapture with the new Nikon J3 (And probably other V*/J* series). Have had no problems with the software in the past and have gotten it working on other nikons ranging from Coolpix to DSLR’s.
When hooked up, it gets to the “Camera Connected” mark, then gets stuck- no image is taken. Identical un-altered sketch runs fine on others. PTP DevInfo works fine too (attached below) and it looks to me that it should support capture image.
Moreover, the “Image Capture” application on Mac OS is able to remotely trigger the camera without issues!
Any ideas? Thanks!
PTPDevInfo:
Start
Camera connected
Std.Ver.: 0x100
Vendor Ext. ID: 0x6(Microsoft)
Vend.Ext.Ver.: 0x64
microsoft.com: 1.0
Func.Mode: 0x21E0
Operations supported:
1001 GetDeviceInfo
1002 OpenSession
1003 CloseSession
1004 GetStorageIDs
1005 GetStorageInfo
1006 GetNumObjects
1007 GetObjectHandles
1008 GetObjectInfo
1009 GetObject
100A GetThumb
100B DeleteObject
100C SendObjectInfo
100D SendObject
100E InitiateCapture
100F FormatStore
1014 GetDevicePropDesc
1015 GetDevicePropValue
1016 SetDevicePropValue
101B GetPartialObject
90C0 Vendor defined
90C1 Vendor defined
90C2 Vendor defined
90C3 Vendor defined
90C4 Vendor defined
90C7 Vendor defined
90C8 Vendor defined
9201 Vendor defined
9202 Vendor defined
9203 Vendor defined
9207 Vendor defined
9801 GetObjectPropsSupported
9802 GetObjectPropDesc
9803 GetObjectPropValue
9805 GetObjectPropList
Events supported:
4001 CancelTransaction
4002 ObjectAdded
4004 StoreAdded
4005 StoreRemoved
4006 DevicePropChanged
4008 DeviceInfoChanged
4009 RequestObjectTransfer
400A StoreFull
400C StorageInfoChanged
400D CaptureComplete
Device properties supported:
5001 BatteryLevel
5004 CompressionSetting
5007 FNumber
500E ExposureProgramMode
5011 DateTime
D303 Vendor defined
D406 Session_Initiator_Version_Info
D407 Perceived_Device_Type
Capture formats:
3801 EXIF_JPEG
3000 Undefined
Image Formats:
3000 Undefined
3001 Association
3002 Script
3006 DPOF
300D QT
3801 EXIF_JPEG
380D TIFF
Manufacturer: Nikon Corporation
Model: J3
Device ver.: Ver.1.0001
I’m having problems getting the more complex PTP examples to compile under PTP2.0. The simple PTP example sketches like PTPCapture and PTPDevInfo are working but I cant get the Nikon or EOS sketches to work.
For NKRemote I get the following errors:
NKRemote.pde: In member function ‘virtual void NKEventDump::OnEvent(const NKEvent*)’:
NKRemote:38: error: no matching function for call to ‘PrintHex(const uint16_t&)’
NKRemote.pde: In member function ‘virtual void CamStateHandlers::OnDeviceDisconnectedState(PTP*)’:
NKRemote:80: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
NKRemote.pde: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
NKRemote:92: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
Any ideas?
Lyndon
There was a bug. Please pull the latest USB Host 2.0 and PTP 2.0 libraries, the NKRemote should now compile. Let me know if you get any other errors in the examples.
Still have problems I’m afraid. Now I’m getting
NKRemote.pde: In function ‘void Q_onAssert(const char*, int)’:
NKRemote:78: error: ‘QF_INT_DISABLE’ was not declared in this scope
I’m not seeing this function declared in qp_port.h
I am using QP for Arduino 4.3.00 with qp_port.cpp replaced by the one from
http://www.circuitsathome.com/chome_downloads/qp_port.cpp
try to comment out Q_onAssert in NKRemote.pde since you already have it in qp_port.cpp
Commenting out Q_onAssert fixed it. It compiles and I see the menu on my terminal. I can do capture and print values (though these are 4 digit numbers not something immediately man readable. Anyway I will play with it and let you know if it works as expected but at least it compiles and talks to the camera.
I tested the other 3 examples for Nikon and they all gave the same notify issue that I was seeing in nkremote so they probably need the same fix.
NKLiveView.pde: In member function ‘virtual void CamStateHandlers::OnDeviceDisconnectedState(PTP*)’:
NKLiveView:81: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
NKLiveView.pde: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
NKLiveView:90: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
NKEventMonitor.pde: In member function ‘virtual void CamStateHandlers::OnDeviceDisconnectedState(PTP*)’:
NKEventMonitor:82: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
NKEventMonitor.pde: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
NKEventMonitor:91: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
NKEventLab.pde: In function ‘void PrintPropValues(PTP*)’:
NKEventLab:31: error: no matching function for call to ‘PrintHex(uint16_t&)’
NKEventLab.pde: In member function ‘virtual void CamStateHandlers::OnDeviceDisconnectedState(PTP*)’:
NKEventLab:123: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
NKEventLab.pde: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
NKEventLab:132: error: no matching function for call to ‘Notify(char*)’
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:27: note: candidates are: void Notify(uint8_t, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:28: note: void Notify(double, int)
C:\Documents and Settings\User\My Documents\Arduino\libraries\USBHostShield/message.h:29: note: void Notify(const char*, int)
Thank you for letting me know – I’ll fix them ASAP.
Ignore my comment about Print Settings, the camera was on auto and that seems to prevent it answering. With the camera in a none auto mode print settings does give man readable information about the camera state.
The 4 digit numbers I am seeing are steadily scrolling up the screen and seem to start with a D like “D510.” These change depending on the mode of the camera so I’m thinking it’s a debugging string..
The sketch seems to be working as it should and will make a good starting point for my project.
Thanks for taking time out on a holiday to debug this.
Lyndon
Oleg,
How did your friend’s Nikon HDR experiments go.? I’ve been looking at the EosHDRCapture example sketch. To what degree are the EOS and Nikon PTP functions equivalent? Could the EoSHDR sketch be used as a basis for a Nikon equivalent just by transcribing the EOS references for their Nikon equivalents or is there some complication?
Nikon cameras are close to Powershots; you can use the same principles but you won’t be able to directly substitute EOS commands with their Nikon equivalents.
Hi Oleg,
I have a question.
It is possible to know if the DSLR is under exposed or over exposed ?
I use Nikon DSLR.
Hi Oleg
Thank you very much for this great project. I have a little Problem. Hope you can help me. I use USB Host Shield with USB and PTP2 library, connected to a CanonEOS 1100D.
Sample code works fine with Terminal output(connected, disconnected).
But i would not use the EOS.Capture() Function in CamState Handler (void CamStateHandlers::OnDeviceInitializedState(PTP *ptp)).
I would use the function in the main program loop.
How can i check in main loop if the camera is connected, disconnected or has a error?
Does a command exist, like status=Eos.State?
This would not work: if (Eos.StateConnected()=true){}
Thanks for helping
OnDeviceInitializedState() gets called when camera is ready. If for some reason you can’t call your application directly from it allocate a global variable to signal a camera state, change it in OnDeviceInitializedState() and check it from the main loop. You’d have to do the same from other CamStateHandlers:: methods so calling the app from OnDeviceInitializedState() is preferred still.
Hello Oleg ,
thank you so much for such a great Library ,even through im trying to follow up with you bu i have no luck , i have used the USB library before and it works perfectly , but when i try to use the the PTP library i cane seem to be able to compile some sketches.
i tried to use the PTPDevinfo seketch but when ever i try to compile it this is the error im im getting i have no idea how to fix it :
devinfoparser.h:149: error: msgPlayback_Rate causes a section type conflict
devinfoparser.h:150: error: msgPlayback_Object causes a section type conflict
devinfoparser.h:151: error: msgPlayback_Container causes a section type conflict
devinfoparser.h:10: error: msgCRLF causes a section type conflict
devinfoparser.cpp:715: error: __c causes a section type conflict
devinfoparser.cpp:710: error: __c causes a section type conflict
devinfoparser.cpp:702: error: __c causes a section type conflict
devinfoparser.cpp:694: error: __c causes a section type conflict
devinfoparser.cpp:686: error: __c causes a section type conflict
devinfoparser.cpp:678: error: __c causes a section type conflict
devinfoparser.cpp:670: error: __c causes a section type conflict
devinfoparser.cpp:662: error: __c causes a section type conflict
devinfoparser.cpp:654: error: __c causes a section type conflict
devinfoparser.cpp:646: error: __c causes a section type conflict
devinfoparser.cpp:624: error: __c causes a section type conflict
devinfoparser.cpp:618: error: __c causes a section type conflict
devinfoparser.cpp:534: error: __c causes a section type conflict
devinfoparser.cpp:531: error: __c causes a section type conflict
devinfoparser.cpp:528: error: __c causes a section type conflict
devinfoparser.cpp:525: error: __c causes a section type conflict
devinfoparser.cpp:522: error: __c causes a section type conflict
devinfoparser.cpp:519: error: __c causes a section type conflict
devinfoparser.cpp:516: error: __c causes a section type conflict
devinfoparser.cpp:513: error: __c causes a section type conflict
devinfoparser.cpp:510: error: __c causes a section type conflict
devinfoparser.cpp:507: error: __c causes a section type conflict
devinfoparser.cpp:504: error: __c causes a section type conflict
devinfoparser.cpp:501: error: __c causes a section type conflict
devinfoparser.cpp:498: error: __c causes a section type conflict
devinfoparser.cpp:495: error: __c causes a section type conflict
devinfoparser.cpp:492: error: __c causes a section type conflict
devinfoparser.cpp:486: error: __c causes a section type conflict
devinfoparser.h:9: error: msgTab causes a section type conflict
devinfoparser.h:187: error: msgUndefined_Firmware causes a section type conflict
devinfoparser.h:188: error: msgWindows_Image_Format causes a section type conflict
devinfoparser.h:189: error: msgUndefined_Audio causes a section type conflict
devinfoparser.h:190: error: msgWMA causes a section type conflict
devinfoparser.h:191: error: msgOGG causes a section type conflict
devinfoparser.h:192: error: msgAAC causes a section type conflict
devinfoparser.h:193: error: msgAudible causes a section type conflict
devinfoparser.h:194: error: msgFLAC causes a section type conflict
devinfoparser.h:195: error: msgUndefined_Video causes a section type conflict
devinfoparser.h:196: error: msgWMV causes a section type conflict
devinfoparser.h:197: error: msgMP4_Container causes a section type conflict
devinfoparser.h:198: error: msgMP2 causes a section type conflict
devinfoparser.h:199: error: msg3GP_Container causes a section type conflict
devinfoparser.h:8: error: msgVendorDefined causes a section type conflict
devinfoparser.h:57: error: msgEOS_GetStorageIDs causes a section type conflict
devinfoparser.h:58: error: msgEOS_GetStorageInfo causes a section type conflict
devinfoparser.h:59: error: msgEOS_GetObject causes a section type conflict
devinfoparser.h:60: error: msgEOS_GetDeviceInfo causes a section type conflict
devinfoparser.h:61: error: msgEOS_GetObjectIDs causes a section type conflict
devinfoparser.h:62: error: msgEOS_Capture causes a section type conflict
devinfoparser.h:63: error: msgEOS_SetDevicePropValue causes a section type conflict
devinfoparser.h:64: error: msgEOS_SetPCConnectMode causes a section type conflict
devinfoparser.h:65: error: msgEOS_SetExtendedEventInfo causes a section type conflict
devinfoparser.h:66: error: msgEOS_GetEvent causes a section type conflict
devinfoparser.h:67: error: msgEOS_GetLiveViewPicture causes a section type conflict
devinfoparser.h:68: error: msgEOS_MoveFocus causes a section type conflict
devinfoparser.h:71: error: msgPS_GetObjectSize causes a section type conflict
devinfoparser.h:72: error: msgPS_StartShootingMode causes a section type conflict
devinfoparser.h:73: error: msgPS_EndShootingMode causes a section type conflict
devinfoparser.h:74: error: msgPS_ViewfinderOn causes a section type conflict
devinfoparser.h:75: error: msgPS_ViewfinderOff causes a section type conflict
devinfoparser.h:76: error: msgPS_ReflectChanges causes a section type conflict
devinfoparser.h:77: error: msgPS_CheckEvent causes a section type conflict
devinfoparser.h:78: error: msgPS_FocusLock causes a section type conflict
devinfoparser.h:79: error: msgPS_FocusUnlock causes a section type conflict
devinfoparser.h:80: error: msgPS_InitiateCaptureInMemory causes a section type conflict
devinfoparser.h:81: error: msgPS_GetPartialObject causes a section type conflict
devinfoparser.h:82: error: msgPS_GetViewfinderImage causes a section type conflict
devinfoparser.h:83: error: msgPS_GetChanges causes a section type conflict
devinfoparser.h:84: error: msgPS_GetFolderEntries causes a section type conflict
devinfoparser.h:52: error: msgGetObjectReferences causes a section type conflict
devinfoparser.h:53: error: msgSetObjectReferences causes a section type conflict
devinfoparser.h:54: error: msgSkip causes a section type conflict
devinfoparser.cpp:195: error: __c causes a section type conflict
devinfoparser.h:13: error: msgUndefined causes a section type conflict
devinfoparser.h:14: error: msgGetDeviceInfo causes a section type conflict
devinfoparser.h:15: error: msgOpenSession causes a section type conflict
devinfoparser.h:16: error: msgCloseSession causes a section type conflict
devinfoparser.h:17: error: msgGetStorageIDs causes a section type conflict
devinfoparser.h:18: error: msgGetStorageInfo causes a section type conflict
devinfoparser.h:19: error: msgGetNumObjects causes a section type conflict
devinfoparser.h:20: error: msgGetObjectHandles causes a section type conflict
devinfoparser.h:21: error: msgGetObjectInfo causes a section type conflict
devinfoparser.h:22: error: msgGetObject causes a section type conflict
devinfoparser.h:23: error: msgGetThumb causes a section type conflict
devinfoparser.h:24: error: msgDeleteObject causes a section type conflict
devinfoparser.h:25: error: msgSendObjectInfo causes a section type conflict
devinfoparser.h:26: error: msgSendObject causes a section type conflict
devinfoparser.h:27: error: msgInitiateCapture causes a section type conflict
devinfoparser.h:28: error: msgFormatStore causes a section type conflict
devinfoparser.h:29: error: msgResetDevice causes a section type conflict
devinfoparser.h:30: error: msgSelfTest causes a section type conflict
devinfoparser.h:31: error: msgSetObjectProtection causes a section type conflict
devinfoparser.h:32: error: msgPowerDown causes a section type conflict
devinfoparser.h:33: error: msgGetDevicePropDesc causes a section type conflict
devinfoparser.h:34: error: msgGetDevicePropValue causes a section type conflict
devinfoparser.h:35: error: msgSetDevicePropValue causes a section type conflict
devinfoparser.h:36: error: msgResetDevicePropValue causes a section type conflict
devinfoparser.h:37: error: msgTerminateOpenCapture causes a section type conflict
devinfoparser.h:38: error: msgMoveObject causes a section type conflict
devinfoparser.h:39: error: msgCopyObject causes a section type conflict
devinfoparser.h:40: error: msgGetPartialObject causes a section type conflict
devinfoparser.h:41: error: msgInitiateOpenCapture causes a section type conflict
devinfoparser.h:44: error: msgGetObjectPropsSupported causes a section type conflict
devinfoparser.h:45: error: msgGetObjectPropDesc causes a section type conflict
devinfoparser.h:46: error: msgGetObjectPropValue causes a section type conflict
devinfoparser.h:47: error: msgSetObjectPropValue causes a section type conflict
devinfoparser.h:48: error: msgGetObjectPropList causes a section type conflict
devinfoparser.h:49: error: msgSetObjectPropList causes a section type conflict
devinfoparser.h:50: error: msgGetInterdependentPropDesc causes a section type conflict
devinfoparser.h:51: error: msgSendObjectPropList causes a section type conflict
devinfoparser.h:88: error: msgCancelTransaction causes a section type conflict
devinfoparser.h:89: error: msgObjectAdded causes a section type conflict
devinfoparser.h:90: error: msgObjectRemoved causes a section type conflict
devinfoparser.h:91: error: msgStoreAdded causes a section type conflict
devinfoparser.h:92: error: msgStoreRemoved causes a section type conflict
devinfoparser.h:93: error: msgDevicePropChanged causes a section type conflict
devinfoparser.h:94: error: msgObjectInfoChanged causes a section type conflict
devinfoparser.h:95: error: msgDeviceInfoChanged causes a section type conflict
devinfoparser.h:96: error: msgRequestObjectTransfer causes a section type conflict
devinfoparser.h:97: error: msgStoreFull causes a section type conflict
devinfoparser.h:98: error: msgDeviceReset causes a section type conflict
devinfoparser.h:99: error: msgStorageInfoChanged causes a section type conflict
devinfoparser.h:100: error: msgCaptureComplete causes a section type conflict
devinfoparser.h:101: error: msgUnreportedStatus causes a section type conflict
devinfoparser.h:104: error: msgObjectPropChanged causes a section type conflict
devinfoparser.h:105: error: msgObjectPropDescChanged causes a section type conflict
devinfoparser.h:106: error: msgObjectReferencesChanged causes a section type conflict
devinfoparser.h:109: error: msgBatteryLevel causes a section type conflict
devinfoparser.h:110: error: msgFunctionalMode causes a section type conflict
devinfoparser.h:111: error: msgImageSize causes a section type conflict
devinfoparser.h:112: error: msgCompressionSetting causes a section type conflict
devinfoparser.h:113: error: msgWhiteBalance causes a section type conflict
devinfoparser.h:114: error: msgRGBGain causes a section type conflict
devinfoparser.h:115: error: msgFNumber causes a section type conflict
devinfoparser.h:116: error: msgFocalLength causes a section type conflict
devinfoparser.h:117: error: msgFocusDistance causes a section type conflict
devinfoparser.h:118: error: msgFocusMode causes a section type conflict
devinfoparser.h:119: error: msgExposureMeteringMode causes a section type conflict
devinfoparser.h:120: error: msgFlashMode causes a section type conflict
devinfoparser.h:121: error: msgExposureTime causes a section type conflict
devinfoparser.h:122: error: msgExposureProgramMode causes a section type conflict
devinfoparser.h:123: error: msgExposureIndex causes a section type conflict
devinfoparser.h:124: error: msgExposureBiasCompensation causes a section type conflict
devinfoparser.h:125: error: msgDateTime causes a section type conflict
devinfoparser.h:126: error: msgCaptureDelay causes a section type conflict
devinfoparser.h:127: error: msgStillCaptureMode causes a section type conflict
devinfoparser.h:128: error: msgContrast causes a section type conflict
devinfoparser.h:129: error: msgSharpness causes a section type conflict
devinfoparser.h:130: error: msgDigitalZoom causes a section type conflict
devinfoparser.h:131: error: msgEffectMode causes a section type conflict
devinfoparser.h:132: error: msgBurstNumber causes a section type conflict
devinfoparser.h:133: error: msgBurstInterval causes a section type conflict
devinfoparser.h:134: error: msgTimelapseNumber causes a section type conflict
devinfoparser.h:135: error: msgTimelapseInterval causes a section type conflict
devinfoparser.h:136: error: msgFocusMeteringMode causes a section type conflict
devinfoparser.h:137: error: msgUploadURL causes a section type conflict
devinfoparser.h:138: error: msgArtist causes a section type conflict
devinfoparser.h:139: error: msgCopyrightInfo causes a section type conflict
devinfoparser.h:142: error: msgSynchronization_Partner causes a section type conflict
devinfoparser.h:143: error: msgDevice_Friendly_Name causes a section type conflict
devinfoparser.h:144: error: msgVolume causes a section type conflict
devinfoparser.h:145: error: msgSupportedFormatsOrdered causes a section type conflict
devinfoparser.h:146: error: msgDeviceIcon causes a section type conflict
devinfoparser.h:147: error: msgSession_Initiator_Version_Info causes a section type conflict
devinfoparser.h:148: error: msgPerceived_Device_Type causes a section type conflict
devinfoparser.h:154: error: msgAssociation causes a section type conflict
devinfoparser.h:155: error: msgScript causes a section type conflict
devinfoparser.h:156: error: msgExecutable causes a section type conflict
devinfoparser.h:157: error: msgText causes a section type conflict
devinfoparser.h:158: error: msgHTML causes a section type conflict
devinfoparser.h:159: error: msgDPOF causes a section type conflict
devinfoparser.h:160: error: msgAIFF causes a section type conflict
devinfoparser.h:161: error: msgWAV causes a section type conflict
devinfoparser.h:162: error: msgMP3 causes a section type conflict
devinfoparser.h:163: error: msgAVI causes a section type conflict
devinfoparser.h:164: error: msgMPEG causes a section type conflict
devinfoparser.h:165: error: msgASF causes a section type conflict
devinfoparser.h:166: error: msgQT causes a section type conflict
devinfoparser.h:169: error: msgEXIF_JPEG causes a section type conflict
devinfoparser.h:170: error: msgTIFF_EP causes a section type conflict
devinfoparser.h:171: error: msgFlashPix causes a section type conflict
devinfoparser.h:172: error: msgBMP causes a section type conflict
devinfoparser.h:173: error: msgCIFF causes a section type conflict
devinfoparser.h:174: error: msgUndefined_0x3806 causes a section type conflict
devinfoparser.h:175: error: msgGIF causes a section type conflict
devinfoparser.h:176: error: msgJFIF causes a section type conflict
devinfoparser.h:177: error: msgPCD causes a section type conflict
devinfoparser.h:178: error: msgPICT causes a section type conflict
devinfoparser.h:179: error: msgPNG causes a section type conflict
devinfoparser.h:180: error: msgUndefined_0x380C causes a section type conflict
devinfoparser.h:181: error: msgTIFF causes a section type conflict
devinfoparser.h:182: error: msgTIFF_IT causes a section type conflict
devinfoparser.h:183: error: msgJP2 causes a section type conflict
devinfoparser.h:184: error: msgJPX causes a section type conflict
i’d really appreciate it if you can guide me how to fix it ,
also one more question am i able to change the EXIF description tag or any other tags using your library for each picture i shot.
thank you
Which Arduino IDE version are you using?
i tried arduino IDE 1.0 and 1.0.5 and im still getting the same message.
im confused and i cant get it right
Hey, i just saw that you have the same problem that the one i have.. did you find any solution for the Problem?
Thanks,
Pcace
Hi Oleg,
I am attempting to compile the NKRemote example but I keep getting these errors:
——————————————————————————————————————-
In file included from NKRemote.pde:6:
arduino-1.5.2-windows\arduino-1.5.2\libraries\QP/qp_port.h:3657: error: section attribute not allowed for ‘file’
In file included from NKRemote.pde:12:
psconsole.h:20: error: ‘Q_USER_SIG’ was not declared in this scope
psconsole.h:25: error: expected class-name before ‘{‘ token
psconsole.h:30: error: expected class-name before ‘{‘ token
psconsole.h:35: error: expected class-name before ‘{‘ token
psconsole.h:46: error: ‘QState’ does not name a type
psconsole.h:47: error: ‘QState’ does not name a type
psconsole.h:48: error: ‘QState’ does not name a type
psconsole.h:49: error: ‘QState’ does not name a type
psconsole.h:50: error: ‘QState’ does not name a type
psconsole.h:51: error: ‘QState’ does not name a type
psconsole.h:52: error: ‘QState’ does not name a type
psconsole.h:53: error: ‘QState’ does not name a type
psconsole.h:54: error: ‘QState’ does not name a type
psconsole.h:55: error: ‘QState’ does not name a type
psconsole.h:56: error: ‘QState’ does not name a type
psconsole.h:57: error: ‘QState’ does not name a type
psconsole.h:58: error: ‘QState’ does not name a type
psconsole.h:59: error: ‘QState’ does not name a type
psconsole.h:60: error: ‘QState’ does not name a type
psconsole.h:61: error: ‘QState’ does not name a type
/psconsole.h: In constructor ‘PSConsole::PSConsole()’:
psconsole.h:41: error: class ‘PSConsole’ does not have any field named ‘QHsm’
psconsole.h:41: error: ‘QStateHandler’ was not declared in this scope
psconsole.h:41: error: ‘Initial’ is not a member of ‘PSConsole’
NKRemote.pde: At global scope:
NKRemote:15: error: section attribute not allowed for ‘file’
NKRemote:60: error: ‘QEvt’ does not name a type
NKRemote:63: error: section attribute not allowed for ‘file’
NKRemote.pde: In member function ‘virtual void CamStateHandlers::OnDeviceDisconnectedState(PTP*)’:
NKRemote:79: error: ‘class PSConsole’ has no member named ‘dispatch’
NKRemote:79: error: ‘evtTick’ was not declared in this scope
NKRemote.pde: In member function ‘virtual void CamStateHandlers::OnDeviceInitializedState(PTP*)’:
NKRemote:89: error: ‘class PSConsole’ has no member named ‘dispatch’
NKRemote:89: error: ‘evtTick’ was not declared in this scope
NKRemote:97: error: ‘struct MenuSelectEvt’ has no member named ‘sig’
NKRemote:99: error: ‘class PSConsole’ has no member named ‘dispatch’
NKRemote.pde: In function ‘void setup()’:
NKRemote:121: error: ‘evtTick’ was not declared in this scope
NKRemote:123: error: ‘class PSConsole’ has no member named ‘init’
——————————————————————————————————————-
By adding the line using namespace QP; to psconsole.h the errors reduce to only three:
——————————————————————————————————————-
In file included from NKRemote.pde:6:
arduino-1.5.2-windows\arduino-1.5.2\libraries\QP/qp_port.h:3657: error: section attribute not allowed for ‘file’
NKRemote:15: error: section attribute not allowed for ‘file’
NKRemote:63: error: section attribute not allowed for ‘file’
——————————————————————————————————————-
Despite my efforts I am unable to resolve those errors. I am using Arduino IDE version 1.5.2, QP version 1.5.x for arduino 1.5.x and USB Host Shield 2.0.
Sorry about the long error list. Any help would be greatly appreciated.
Thank you,
Joshua
Looks like the issue with QP. Can you compile and run QP examples?
I can compile two of the three QP examples. The one that I can’t compile is dpp_qk.ino. I get the following errors when trying to compile that one:
bsp.cpp: In function ‘void __vector_7()’:
bsp.cpp:53: error: ‘QK_ISR_ENTRY’ was not declared in this scope
bsp.cpp:66: error: ‘QK_ISR_EXIT’ was not declared in this scope
bsp.cpp: At global scope:
bsp.cpp:83: error: ‘QK’ has not been declared
Am I missing a file?
Thank you,
Joshua
Make sure the examples work too. QP has wonderful documentation, take a look at the installation section to double-check.
Hi,
I also have this problem, after looking up various AVR threads on PROGMEM, and trying Arduino versions 1.0, 1.0.1, 1.0.5, 1.5 & 1.5.6-r2 (under Mac OS X) I still have the exact same errors as posted.
The use of “const” or alternate compiler versions have been said to address this problem, but I have not luck….
Could someone please point me in the right direction.
ERRORS:
Arduino: 1.5.5 (Mac OS X), Board: “Arduino Leonardo”
devinfoparser.h:150: error: msgPlayback_Rate causes a section type conflict
devinfoparser.h:151: error: msgPlayback_Object causes a section type conflict
devinfoparser.h:152: error: msgPlayback_Container causes a section type conflict
devinfoparser.h:11: error: msgCRLF causes a section type conflict
devinfoparser.cpp:715: error: __c causes a section type conflict
devinfoparser.cpp:710: error: __c causes a section type conflict
devinfoparser.cpp:702: error: __c causes a section type conflict
devinfoparser.cpp:694: error: __c causes a section type conflict
devinfoparser.cpp:686: error: __c causes a section type conflict
devinfoparser.cpp:678: error: __c causes a section type conflict
devinfoparser.cpp:670: error: __c causes a section type conflict
devinfoparser.cpp:662: error: __c causes a section type conflict
devinfoparser.cpp:654: error: __c causes a section type conflict
devinfoparser.cpp:646: error: __c causes a section type conflict
devinfoparser.cpp:624: error: __c causes a section type conflict
devinfoparser.cpp:618: error: __c causes a section type conflict
devinfoparser.cpp:534: error: __c causes a section type conflict
devinfoparser.cpp:531: error: __c causes a section type conflict
devinfoparser.cpp:528: error: __c causes a section type conflict
devinfoparser.cpp:525: error: __c causes a section type conflict
devinfoparser.cpp:522: error: __c causes a section type conflict
devinfoparser.cpp:519: error: __c causes a section type conflict
devinfoparser.cpp:516: error: __c causes a section type conflict
devinfoparser.cpp:513: error: __c causes a section type conflict
devinfoparser.cpp:510: error: __c causes a section type conflict
devinfoparser.cpp:507: error: __c causes a section type conflict
devinfoparser.cpp:504: error: __c causes a section type conflict
devinfoparser.cpp:501: error: __c causes a section type conflict
devinfoparser.cpp:498: error: __c causes a section type conflict
devinfoparser.cpp:495: error: __c causes a section type conflict
devinfoparser.cpp:492: error: __c causes a section type conflict
devinfoparser.cpp:486: error: __c causes a section type conflict
devinfoparser.h:10: error: msgTab causes a section type conflict
devinfoparser.h:188: error: msgUndefined_Firmware causes a section type conflict
devinfoparser.h:189: error: msgWindows_Image_Format causes a section type conflict
devinfoparser.h:190: error: msgUndefined_Audio causes a section type conflict
devinfoparser.h:191: error: msgWMA causes a section type conflict
devinfoparser.h:192: error: msgOGG causes a section type conflict
devinfoparser.h:193: error: msgAAC causes a section type conflict
devinfoparser.h:194: error: msgAudible causes a section type conflict
devinfoparser.h:195: error: msgFLAC causes a section type conflict
devinfoparser.h:196: error: msgUndefined_Video causes a section type conflict
devinfoparser.h:197: error: msgWMV causes a section type conflict
devinfoparser.h:198: error: msgMP4_Container causes a section type conflict
devinfoparser.h:199: error: msgMP2 causes a section type conflict
devinfoparser.h:200: error: msg3GP_Container causes a section type conflict
devinfoparser.h:9: error: msgVendorDefined causes a section type conflict
devinfoparser.h:58: error: msgEOS_GetStorageIDs causes a section type conflict
devinfoparser.h:59: error: msgEOS_GetStorageInfo causes a section type conflict
devinfoparser.h:60: error: msgEOS_GetObject causes a section type conflict
devinfoparser.h:61: error: msgEOS_GetDeviceInfo causes a section type conflict
devinfoparser.h:62: error: msgEOS_GetObjectIDs causes a section type conflict
devinfoparser.h:63: error: msgEOS_Capture causes a section type conflict
devinfoparser.h:64: error: msgEOS_SetDevicePropValue causes a section type conflict
devinfoparser.h:65: error: msgEOS_SetPCConnectMode causes a section type conflict
devinfoparser.h:66: error: msgEOS_SetExtendedEventInfo causes a section type conflict
devinfoparser.h:67: error: msgEOS_GetEvent causes a section type conflict
devinfoparser.h:68: error: msgEOS_GetLiveViewPicture causes a section type conflict
devinfoparser.h:69: error: msgEOS_MoveFocus causes a section type conflict
devinfoparser.h:72: error: msgPS_GetObjectSize causes a section type conflict
devinfoparser.h:73: error: msgPS_StartShootingMode causes a section type conflict
devinfoparser.h:74: error: msgPS_EndShootingMode causes a section type conflict
devinfoparser.h:75: error: msgPS_ViewfinderOn causes a section type conflict
devinfoparser.h:76: error: msgPS_ViewfinderOff causes a section type conflict
devinfoparser.h:77: error: msgPS_ReflectChanges causes a section type conflict
devinfoparser.h:78: error: msgPS_CheckEvent causes a section type conflict
devinfoparser.h:79: error: msgPS_FocusLock causes a section type conflict
devinfoparser.h:80: error: msgPS_FocusUnlock causes a section type conflict
devinfoparser.h:81: error: msgPS_InitiateCaptureInMemory causes a section type conflict
devinfoparser.h:82: error: msgPS_GetPartialObject causes a section type conflict
devinfoparser.h:83: error: msgPS_GetViewfinderImage causes a section type conflict
devinfoparser.h:84: error: msgPS_GetChanges causes a section type conflict
devinfoparser.h:85: error: msgPS_GetFolderEntries causes a section type conflict
devinfoparser.h:53: error: msgGetObjectReferences causes a section type conflict
devinfoparser.h:54: error: msgSetObjectReferences causes a section type conflict
devinfoparser.h:55: error: msgSkip causes a section type conflict
devinfoparser.cpp:195: error: __c causes a section type conflict
devinfoparser.h:14: error: msgUndefined causes a section type conflict
devinfoparser.h:15: error: msgGetDeviceInfo causes a section type conflict
devinfoparser.h:16: error: msgOpenSession causes a section type conflict
devinfoparser.h:17: error: msgCloseSession causes a section type conflict
devinfoparser.h:18: error: msgGetStorageIDs causes a section type conflict
devinfoparser.h:19: error: msgGetStorageInfo causes a section type conflict
devinfoparser.h:20: error: msgGetNumObjects causes a section type conflict
devinfoparser.h:21: error: msgGetObjectHandles causes a section type conflict
devinfoparser.h:22: error: msgGetObjectInfo causes a section type conflict
devinfoparser.h:23: error: msgGetObject causes a section type conflict
devinfoparser.h:24: error: msgGetThumb causes a section type conflict
devinfoparser.h:25: error: msgDeleteObject causes a section type conflict
devinfoparser.h:26: error: msgSendObjectInfo causes a section type conflict
devinfoparser.h:27: error: msgSendObject causes a section type conflict
devinfoparser.h:28: error: msgInitiateCapture causes a section type conflict
devinfoparser.h:29: error: msgFormatStore causes a section type conflict
devinfoparser.h:30: error: msgResetDevice causes a section type conflict
devinfoparser.h:31: error: msgSelfTest causes a section type conflict
devinfoparser.h:32: error: msgSetObjectProtection causes a section type conflict
devinfoparser.h:33: error: msgPowerDown causes a section type conflict
devinfoparser.h:34: error: msgGetDevicePropDesc causes a section type conflict
devinfoparser.h:35: error: msgGetDevicePropValue causes a section type conflict
devinfoparser.h:36: error: msgSetDevicePropValue causes a section type conflict
devinfoparser.h:37: error: msgResetDevicePropValue causes a section type conflict
devinfoparser.h:38: error: msgTerminateOpenCapture causes a section type conflict
devinfoparser.h:39: error: msgMoveObject causes a section type conflict
devinfoparser.h:40: error: msgCopyObject causes a section type conflict
devinfoparser.h:41: error: msgGetPartialObject causes a section type conflict
devinfoparser.h:42: error: msgInitiateOpenCapture causes a section type conflict
devinfoparser.h:45: error: msgGetObjectPropsSupported causes a section type conflict
devinfoparser.h:46: error: msgGetObjectPropDesc causes a section type conflict
devinfoparser.h:47: error: msgGetObjectPropValue causes a section type conflict
devinfoparser.h:48: error: msgSetObjectPropValue causes a section type conflict
devinfoparser.h:49: error: msgGetObjectPropList causes a section type conflict
devinfoparser.h:50: error: msgSetObjectPropList causes a section type conflict
devinfoparser.h:51: error: msgGetInterdependentPropDesc causes a section type conflict
devinfoparser.h:52: error: msgSendObjectPropList causes a section type conflict
devinfoparser.h:89: error: msgCancelTransaction causes a section type conflict
devinfoparser.h:90: error: msgObjectAdded causes a section type conflict
devinfoparser.h:91: error: msgObjectRemoved causes a section type conflict
devinfoparser.h:92: error: msgStoreAdded causes a section type conflict
devinfoparser.h:93: error: msgStoreRemoved causes a section type conflict
devinfoparser.h:94: error: msgDevicePropChanged causes a section type conflict
devinfoparser.h:95: error: msgObjectInfoChanged causes a section type conflict
devinfoparser.h:96: error: msgDeviceInfoChanged causes a section type conflict
devinfoparser.h:97: error: msgRequestObjectTransfer causes a section type conflict
devinfoparser.h:98: error: msgStoreFull causes a section type conflict
devinfoparser.h:99: error: msgDeviceReset causes a section type conflict
devinfoparser.h:100: error: msgStorageInfoChanged causes a section type conflict
devinfoparser.h:101: error: msgCaptureComplete causes a section type conflict
devinfoparser.h:102: error: msgUnreportedStatus causes a section type conflict
devinfoparser.h:105: error: msgObjectPropChanged causes a section type conflict
devinfoparser.h:106: error: msgObjectPropDescChanged causes a section type conflict
devinfoparser.h:107: error: msgObjectReferencesChanged causes a section type conflict
devinfoparser.h:110: error: msgBatteryLevel causes a section type conflict
devinfoparser.h:111: error: msgFunctionalMode causes a section type conflict
devinfoparser.h:112: error: msgImageSize causes a section type conflict
devinfoparser.h:113: error: msgCompressionSetting causes a section type conflict
devinfoparser.h:114: error: msgWhiteBalance causes a section type conflict
devinfoparser.h:115: error: msgRGBGain causes a section type conflict
devinfoparser.h:116: error: msgFNumber causes a section type conflict
devinfoparser.h:117: error: msgFocalLength causes a section type conflict
devinfoparser.h:118: error: msgFocusDistance causes a section type conflict
devinfoparser.h:119: error: msgFocusMode causes a section type conflict
devinfoparser.h:120: error: msgExposureMeteringMode causes a section type conflict
devinfoparser.h:121: error: msgFlashMode causes a section type conflict
devinfoparser.h:122: error: msgExposureTime causes a section type conflict
devinfoparser.h:123: error: msgExposureProgramMode causes a section type conflict
devinfoparser.h:124: error: msgExposureIndex causes a section type conflict
devinfoparser.h:125: error: msgExposureBiasCompensation causes a section type conflict
devinfoparser.h:126: error: msgDateTime causes a section type conflict
devinfoparser.h:127: error: msgCaptureDelay causes a section type conflict
devinfoparser.h:128: error: msgStillCaptureMode causes a section type conflict
devinfoparser.h:129: error: msgContrast causes a section type conflict
devinfoparser.h:130: error: msgSharpness causes a section type conflict
devinfoparser.h:131: error: msgDigitalZoom causes a section type conflict
devinfoparser.h:132: error: msgEffectMode causes a section type conflict
devinfoparser.h:133: error: msgBurstNumber causes a section type conflict
devinfoparser.h:134: error: msgBurstInterval causes a section type conflict
devinfoparser.h:135: error: msgTimelapseNumber causes a section type conflict
devinfoparser.h:136: error: msgTimelapseInterval causes a section type conflict
devinfoparser.h:137: error: msgFocusMeteringMode causes a section type conflict
devinfoparser.h:138: error: msgUploadURL causes a section type conflict
devinfoparser.h:139: error: msgArtist causes a section type conflict
devinfoparser.h:140: error: msgCopyrightInfo causes a section type conflict
devinfoparser.h:143: error: msgSynchronization_Partner causes a section type conflict
devinfoparser.h:144: error: msgDevice_Friendly_Name causes a section type conflict
devinfoparser.h:145: error: msgVolume causes a section type conflict
devinfoparser.h:146: error: msgSupportedFormatsOrdered causes a section type conflict
devinfoparser.h:147: error: msgDeviceIcon causes a section type conflict
devinfoparser.h:148: error: msgSession_Initiator_Version_Info causes a section type conflict
devinfoparser.h:149: error: msgPerceived_Device_Type causes a section type conflict
devinfoparser.h:155: error: msgAssociation causes a section type conflict
devinfoparser.h:156: error: msgScript causes a section type conflict
devinfoparser.h:157: error: msgExecutable causes a section type conflict
devinfoparser.h:158: error: msgText causes a section type conflict
devinfoparser.h:159: error: msgHTML causes a section type conflict
devinfoparser.h:160: error: msgDPOF causes a section type conflict
devinfoparser.h:161: error: msgAIFF causes a section type conflict
devinfoparser.h:162: error: msgWAV causes a section type conflict
devinfoparser.h:163: error: msgMP3 causes a section type conflict
devinfoparser.h:164: error: msgAVI causes a section type conflict
devinfoparser.h:165: error: msgMPEG causes a section type conflict
devinfoparser.h:166: error: msgASF causes a section type conflict
devinfoparser.h:167: error: msgQT causes a section type conflict
devinfoparser.h:170: error: msgEXIF_JPEG causes a section type conflict
devinfoparser.h:171: error: msgTIFF_EP causes a section type conflict
devinfoparser.h:172: error: msgFlashPix causes a section type conflict
devinfoparser.h:173: error: msgBMP causes a section type conflict
devinfoparser.h:174: error: msgCIFF causes a section type conflict
devinfoparser.h:175: error: msgUndefined_0x3806 causes a section type conflict
devinfoparser.h:176: error: msgGIF causes a section type conflict
devinfoparser.h:177: error: msgJFIF causes a section type conflict
devinfoparser.h:178: error: msgPCD causes a section type conflict
devinfoparser.h:179: error: msgPICT causes a section type conflict
devinfoparser.h:180: error: msgPNG causes a section type conflict
devinfoparser.h:181: error: msgUndefined_0x380C causes a section type conflict
devinfoparser.h:182: error: msgTIFF causes a section type conflict
devinfoparser.h:183: error: msgTIFF_IT causes a section type conflict
devinfoparser.h:184: error: msgJP2 causes a section type conflict
devinfoparser.h:185: error: msgJPX causes a section type conflict
This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.
Good day, Oleg! Will this PTP library work on Arduino Leonardo by it self?.. Is there a easy way to debug / check / develop for PTP on PC? I wont to extend the library with support for Sony cameras. Thanks!
I am trying to control a Nikon CoolPix P520 with an Arduino Mega ADK. Is there any documentation available to learn how to do this?
Thank you.
There are several articles linked on this page -> https://www.circuitsathome.com/arduino_usb_host_shield_projects as well as many examples in ‘examples’ directory of the library -> https://github.com/felis/PTP_2.0
Hi,
i do have a Problem with compiling the PTPDevInfo. I do not know what to do:
i use the Arduino IDE 1.0.5 with MacOsx 10.9.2.
Any Idea what to do?
This is the errormessage:
devinfoparser.h:149: error: msgPlayback_Rate causes a section type conflict
devinfoparser.h:150: error: msgPlayback_Object causes a section type conflict
devinfoparser.h:151: error: msgPlayback_Container causes a section type conflict
devinfoparser.h:10: error: msgCRLF causes a section type conflict
devinfoparser.cpp:715: error: __c causes a section type conflict
devinfoparser.cpp:710: error: __c causes a section type conflict
devinfoparser.cpp:702: error: __c causes a section type conflict
devinfoparser.cpp:694: error: __c causes a section type conflict
devinfoparser.cpp:686: error: __c causes a section type conflict
devinfoparser.cpp:678: error: __c causes a section type conflict
devinfoparser.cpp:670: error: __c causes a section type conflict
devinfoparser.cpp:662: error: __c causes a section type conflict
devinfoparser.cpp:654: error: __c causes a section type conflict
devinfoparser.cpp:646: error: __c causes a section type conflict
devinfoparser.cpp:624: error: __c causes a section type conflict
devinfoparser.cpp:618: error: __c causes a section type conflict
devinfoparser.cpp:534: error: __c causes a section type conflict
devinfoparser.cpp:531: error: __c causes a section type conflict
devinfoparser.cpp:528: error: __c causes a section type conflict
devinfoparser.cpp:525: error: __c causes a section type conflict
devinfoparser.cpp:522: error: __c causes a section type conflict
devinfoparser.cpp:519: error: __c causes a section type conflict
devinfoparser.cpp:516: error: __c causes a section type conflict
devinfoparser.cpp:513: error: __c causes a section type conflict
devinfoparser.cpp:510: error: __c causes a section type conflict
devinfoparser.cpp:507: error: __c causes a section type conflict
devinfoparser.cpp:504: error: __c causes a section type conflict
devinfoparser.cpp:501: error: __c causes a section type conflict
devinfoparser.cpp:498: error: __c causes a section type conflict
devinfoparser.cpp:495: error: __c causes a section type conflict
devinfoparser.cpp:492: error: __c causes a section type conflict
devinfoparser.cpp:486: error: __c causes a section type conflict
devinfoparser.h:9: error: msgTab causes a section type conflict
devinfoparser.h:187: error: msgUndefined_Firmware causes a section type conflict
devinfoparser.h:188: error: msgWindows_Image_Format causes a section type conflict
devinfoparser.h:189: error: msgUndefined_Audio causes a section type conflict
devinfoparser.h:190: error: msgWMA causes a section type conflict
devinfoparser.h:191: error: msgOGG causes a section type conflict
devinfoparser.h:192: error: msgAAC causes a section type conflict
devinfoparser.h:193: error: msgAudible causes a section type conflict
devinfoparser.h:194: error: msgFLAC causes a section type conflict
devinfoparser.h:195: error: msgUndefined_Video causes a section type conflict
devinfoparser.h:196: error: msgWMV causes a section type conflict
devinfoparser.h:197: error: msgMP4_Container causes a section type conflict
devinfoparser.h:198: error: msgMP2 causes a section type conflict
devinfoparser.h:199: error: msg3GP_Container causes a section type conflict
devinfoparser.h:8: error: msgVendorDefined causes a section type conflict
devinfoparser.h:57: error: msgEOS_GetStorageIDs causes a section type conflict
devinfoparser.h:58: error: msgEOS_GetStorageInfo causes a section type conflict
devinfoparser.h:59: error: msgEOS_GetObject causes a section type conflict
devinfoparser.h:60: error: msgEOS_GetDeviceInfo causes a section type conflict
devinfoparser.h:61: error: msgEOS_GetObjectIDs causes a section type conflict
devinfoparser.h:62: error: msgEOS_Capture causes a section type conflict
devinfoparser.h:63: error: msgEOS_SetDevicePropValue causes a section type conflict
devinfoparser.h:64: error: msgEOS_SetPCConnectMode causes a section type conflict
devinfoparser.h:65: error: msgEOS_SetExtendedEventInfo causes a section type conflict
devinfoparser.h:66: error: msgEOS_GetEvent causes a section type conflict
devinfoparser.h:67: error: msgEOS_GetLiveViewPicture causes a section type conflict
devinfoparser.h:68: error: msgEOS_MoveFocus causes a section type conflict
devinfoparser.h:71: error: msgPS_GetObjectSize causes a section type conflict
devinfoparser.h:72: error: msgPS_StartShootingMode causes a section type conflict
devinfoparser.h:73: error: msgPS_EndShootingMode causes a section type conflict
devinfoparser.h:74: error: msgPS_ViewfinderOn causes a section type conflict
devinfoparser.h:75: error: msgPS_ViewfinderOff causes a section type conflict
devinfoparser.h:76: error: msgPS_ReflectChanges causes a section type conflict
devinfoparser.h:77: error: msgPS_CheckEvent causes a section type conflict
devinfoparser.h:78: error: msgPS_FocusLock causes a section type conflict
devinfoparser.h:79: error: msgPS_FocusUnlock causes a section type conflict
devinfoparser.h:80: error: msgPS_InitiateCaptureInMemory causes a section type conflict
devinfoparser.h:81: error: msgPS_GetPartialObject causes a section type conflict
devinfoparser.h:82: error: msgPS_GetViewfinderImage causes a section type conflict
devinfoparser.h:83: error: msgPS_GetChanges causes a section type conflict
devinfoparser.h:84: error: msgPS_GetFolderEntries causes a section type conflict
devinfoparser.h:52: error: msgGetObjectReferences causes a section type conflict
devinfoparser.h:53: error: msgSetObjectReferences causes a section type conflict
devinfoparser.h:54: error: msgSkip causes a section type conflict
devinfoparser.cpp:195: error: __c causes a section type conflict
devinfoparser.h:13: error: msgUndefined causes a section type conflict
devinfoparser.h:14: error: msgGetDeviceInfo causes a section type conflict
devinfoparser.h:15: error: msgOpenSession causes a section type conflict
devinfoparser.h:16: error: msgCloseSession causes a section type conflict
devinfoparser.h:17: error: msgGetStorageIDs causes a section type conflict
devinfoparser.h:18: error: msgGetStorageInfo causes a section type conflict
devinfoparser.h:19: error: msgGetNumObjects causes a section type conflict
devinfoparser.h:20: error: msgGetObjectHandles causes a section type conflict
devinfoparser.h:21: error: msgGetObjectInfo causes a section type conflict
devinfoparser.h:22: error: msgGetObject causes a section type conflict
devinfoparser.h:23: error: msgGetThumb causes a section type conflict
devinfoparser.h:24: error: msgDeleteObject causes a section type conflict
devinfoparser.h:25: error: msgSendObjectInfo causes a section type conflict
devinfoparser.h:26: error: msgSendObject causes a section type conflict
devinfoparser.h:27: error: msgInitiateCapture causes a section type conflict
devinfoparser.h:28: error: msgFormatStore causes a section type conflict
devinfoparser.h:29: error: msgResetDevice causes a section type conflict
devinfoparser.h:30: error: msgSelfTest causes a section type conflict
devinfoparser.h:31: error: msgSetObjectProtection causes a section type conflict
devinfoparser.h:32: error: msgPowerDown causes a section type conflict
devinfoparser.h:33: error: msgGetDevicePropDesc causes a section type conflict
devinfoparser.h:34: error: msgGetDevicePropValue causes a section type conflict
devinfoparser.h:35: error: msgSetDevicePropValue causes a section type conflict
devinfoparser.h:36: error: msgResetDevicePropValue causes a section type conflict
devinfoparser.h:37: error: msgTerminateOpenCapture causes a section type conflict
devinfoparser.h:38: error: msgMoveObject causes a section type conflict
devinfoparser.h:39: error: msgCopyObject causes a section type conflict
devinfoparser.h:40: error: msgGetPartialObject causes a section type conflict
devinfoparser.h:41: error: msgInitiateOpenCapture causes a section type conflict
devinfoparser.h:44: error: msgGetObjectPropsSupported causes a section type conflict
devinfoparser.h:45: error: msgGetObjectPropDesc causes a section type conflict
devinfoparser.h:46: error: msgGetObjectPropValue causes a section type conflict
devinfoparser.h:47: error: msgSetObjectPropValue causes a section type conflict
devinfoparser.h:48: error: msgGetObjectPropList causes a section type conflict
devinfoparser.h:49: error: msgSetObjectPropList causes a section type conflict
devinfoparser.h:50: error: msgGetInterdependentPropDesc causes a section type conflict
devinfoparser.h:51: error: msgSendObjectPropList causes a section type conflict
devinfoparser.h:88: error: msgCancelTransaction causes a section type conflict
devinfoparser.h:89: error: msgObjectAdded causes a section type conflict
devinfoparser.h:90: error: msgObjectRemoved causes a section type conflict
devinfoparser.h:91: error: msgStoreAdded causes a section type conflict
devinfoparser.h:92: error: msgStoreRemoved causes a section type conflict
devinfoparser.h:93: error: msgDevicePropChanged causes a section type conflict
devinfoparser.h:94: error: msgObjectInfoChanged causes a section type conflict
devinfoparser.h:95: error: msgDeviceInfoChanged causes a section type conflict
devinfoparser.h:96: error: msgRequestObjectTransfer causes a section type conflict
devinfoparser.h:97: error: msgStoreFull causes a section type conflict
devinfoparser.h:98: error: msgDeviceReset causes a section type conflict
devinfoparser.h:99: error: msgStorageInfoChanged causes a section type conflict
devinfoparser.h:100: error: msgCaptureComplete causes a section type conflict
devinfoparser.h:101: error: msgUnreportedStatus causes a section type conflict
devinfoparser.h:104: error: msgObjectPropChanged causes a section type conflict
devinfoparser.h:105: error: msgObjectPropDescChanged causes a section type conflict
devinfoparser.h:106: error: msgObjectReferencesChanged causes a section type conflict
devinfoparser.h:109: error: msgBatteryLevel causes a section type conflict
devinfoparser.h:110: error: msgFunctionalMode causes a section type conflict
devinfoparser.h:111: error: msgImageSize causes a section type conflict
devinfoparser.h:112: error: msgCompressionSetting causes a section type conflict
devinfoparser.h:113: error: msgWhiteBalance causes a section type conflict
devinfoparser.h:114: error: msgRGBGain causes a section type conflict
devinfoparser.h:115: error: msgFNumber causes a section type conflict
devinfoparser.h:116: error: msgFocalLength causes a section type conflict
devinfoparser.h:117: error: msgFocusDistance causes a section type conflict
devinfoparser.h:118: error: msgFocusMode causes a section type conflict
devinfoparser.h:119: error: msgExposureMeteringMode causes a section type conflict
devinfoparser.h:120: error: msgFlashMode causes a section type conflict
devinfoparser.h:121: error: msgExposureTime causes a section type conflict
devinfoparser.h:122: error: msgExposureProgramMode causes a section type conflict
devinfoparser.h:123: error: msgExposureIndex causes a section type conflict
devinfoparser.h:124: error: msgExposureBiasCompensation causes a section type conflict
devinfoparser.h:125: error: msgDateTime causes a section type conflict
devinfoparser.h:126: error: msgCaptureDelay causes a section type conflict
devinfoparser.h:127: error: msgStillCaptureMode causes a section type conflict
devinfoparser.h:128: error: msgContrast causes a section type conflict
devinfoparser.h:129: error: msgSharpness causes a section type conflict
devinfoparser.h:130: error: msgDigitalZoom causes a section type conflict
devinfoparser.h:131: error: msgEffectMode causes a section type conflict
devinfoparser.h:132: error: msgBurstNumber causes a section type conflict
devinfoparser.h:133: error: msgBurstInterval causes a section type conflict
devinfoparser.h:134: error: msgTimelapseNumber causes a section type conflict
devinfoparser.h:135: error: msgTimelapseInterval causes a section type conflict
devinfoparser.h:136: error: msgFocusMeteringMode causes a section type conflict
devinfoparser.h:137: error: msgUploadURL causes a section type conflict
devinfoparser.h:138: error: msgArtist causes a section type conflict
devinfoparser.h:139: error: msgCopyrightInfo causes a section type conflict
devinfoparser.h:142: error: msgSynchronization_Partner causes a section type conflict
devinfoparser.h:143: error: msgDevice_Friendly_Name causes a section type conflict
devinfoparser.h:144: error: msgVolume causes a section type conflict
devinfoparser.h:145: error: msgSupportedFormatsOrdered causes a section type conflict
devinfoparser.h:146: error: msgDeviceIcon causes a section type conflict
devinfoparser.h:147: error: msgSession_Initiator_Version_Info causes a section type conflict
devinfoparser.h:148: error: msgPerceived_Device_Type causes a section type conflict
devinfoparser.h:154: error: msgAssociation causes a section type conflict
devinfoparser.h:155: error: msgScript causes a section type conflict
devinfoparser.h:156: error: msgExecutable causes a section type conflict
devinfoparser.h:157: error: msgText causes a section type conflict
devinfoparser.h:158: error: msgHTML causes a section type conflict
devinfoparser.h:159: error: msgDPOF causes a section type conflict
devinfoparser.h:160: error: msgAIFF causes a section type conflict
devinfoparser.h:161: error: msgWAV causes a section type conflict
devinfoparser.h:162: error: msgMP3 causes a section type conflict
devinfoparser.h:163: error: msgAVI causes a section type conflict
devinfoparser.h:164: error: msgMPEG causes a section type conflict
devinfoparser.h:165: error: msgASF causes a section type conflict
devinfoparser.h:166: error: msgQT causes a section type conflict
devinfoparser.h:169: error: msgEXIF_JPEG causes a section type conflict
devinfoparser.h:170: error: msgTIFF_EP causes a section type conflict
devinfoparser.h:171: error: msgFlashPix causes a section type conflict
devinfoparser.h:172: error: msgBMP causes a section type conflict
devinfoparser.h:173: error: msgCIFF causes a section type conflict
devinfoparser.h:174: error: msgUndefined_0x3806 causes a section type conflict
devinfoparser.h:175: error: msgGIF causes a section type conflict
devinfoparser.h:176: error: msgJFIF causes a section type conflict
devinfoparser.h:177: error: msgPCD causes a section type conflict
devinfoparser.h:178: error: msgPICT causes a section type conflict
devinfoparser.h:179: error: msgPNG causes a section type conflict
devinfoparser.h:180: error: msgUndefined_0x380C causes a section type conflict
devinfoparser.h:181: error: msgTIFF causes a section type conflict
devinfoparser.h:182: error: msgTIFF_IT causes a section type conflict
devinfoparser.h:183: error: msgJP2 causes a section type conflict
devinfoparser.h:184: error: msgJPX causes a section type conflict
Hi, is there a simple how to where i can find out how to install the PTP_20 lib?
i installed every lib independent from each other, on Win7 and OSX (in a fresh VM), tried arduino 1.0.0-1.5.x with qp without qp everything, but i still get sooo many errors.. i really get frustrated.
Anyone with a simple howto with a recent arduino version? Doesnt matter wether OSX or win….
THank you so much!!!
Please see my previous comment. I have made it available via my website: http://blog.tkjelectronics.dk/wp-content/uploads/PTP_20.zip.
Hmm,
its so sad, that there seems to be no more help with this library, it was exactly what i really needed.. but i simply cannot get it to work – it has been almost 2 weeks of trying. i followed the cmplete qp tuts, to get qp working (and i can compile the examples) but still loooots of error messages when trying to compile nkremote or even PTPDevinfo…
Maybe someone can just tell me if its somehow possible to get this to work with whatever arduino version at all? Maybe someone could upload the working QP Lib + PTP Lib…
What versions do use?
I am relly depressed….
Sorry,
Pcace
+ There is no qp for arduino 1.0.x anymore, and i cannot find it anywhere. could someone upload it?
Please see my previous comment and link: http://blog.tkjelectronics.dk/wp-content/uploads/PTP_20.zip.
There is still no qp for arduino 1.0.x anymore.. so i think i will never get this to work properly…
Or is there anyone who is willing to help me with this?
Thanks,
Pcace
Hi Lauszus,
I red almost every post and every comment on this site, but I cannot make the PTP 2.0 work with the USB_Shield 2.0.
I tried different IDE, different QP version, your PTP_20 all-in-one library version, but I still get a lot of error even in the simplest PTPDevInfo sketch, most of the errors are “*** causes a section type conflict”.
So, besides continue to tell to use your link, there is any suggestion you can give us in order to make this work?
Hi Lauszus,
So many thanks for your all in one version. I got some of it to work! I have a Nikon D300s and the camera will now Capture frames repeatedly, View Settings and all of the applicable Change Settings works. The only Trouble I am having is with the Viewfinder On and Viewfinder Off functions. Those don’t seem to be working. Do you know if those work with the D300s? If not could you confirm these functions work with a specific model? I’m thrilled to have this working.
All the best,
Steve
Hi everybody,
I’m stuck, same condition experienced by MatteGarry:
“I tried different IDE, different QP version, your PTP_20 all-in-one library version, but I still get a lot of error even in the simplest PTPDevInfo sketch, most of the errors are “*** causes a section type conflict”.”
anyway to properly compile PTP_20?
Thank you
Dear Oleg & dear all,
the project sounds very nice. I tried to compile the PTP_2.0 for NKremote about days and days with different setups but there still errors.
My actual sw setup is:
Arduino IDE 0022
USB Host Shield 2.0 Library
PTP_2.0 Library (i tried the setup made by Lauszus as well)
QP_Arduino 1.0.x (QP/C++ 4.5.03/QM 3.1.1)
I would like to try the QP_Arduino 4.3.00 but there is NO source anymore.
Could anybody share a zip-file for windows with me?!
My actual error set follows:
In file included from NKRemote.cpp:6:
C:\Program Files (x86)\arduino-0022\libraries\PTP_20/qp_port.h:3132: error: section attribute not allowed for ‘file’
In file included from NKRemote.cpp:12:
/psconsole.h: In constructor ‘PSConsole::PSConsole()’:
psconsole.h:40: error: invalid cast from type ‘QState (*)(PSConsole*, const QEvent*)’ to type ‘QState (QHsm::*)(const QEvent*)’
NKRemote.cpp: At global scope:
NKRemote:10: error: section attribute not allowed for ‘file’
NKRemote:62: error: section attribute not allowed for ‘file’
Hope for some replies!
Thanks a lot!
I seem to have found a fix for the frequent “… causes a section type conflict” problem with the PTPDevInfo example. Tested with Arduino IDE 1.0.5 on OSX 10.9 and Arduino 1.5.7 Beta on Windows.
in devinfoparser.h:
lines 237-244, eight lines beginning with “static const char* ” … change to “static const char* const”. So for example,
static const char* ptpopNames[];
becomes
static const char* const ptpopNames[];
in devinfoparser.cpp:
starting in line 3, find the matching eight “const char* ” and change them to “const char* const”.
For example,
const char* DevInfoParser::ptpopNames[] PROGMEM = { …
becomes
const char* const DevInfoParser::ptpopNames[] PROGMEM = { …
For me, this made the multitude of other errors disappear, even the seemingly unconnected “__c causes a section type conflict” errors caused by PSTR() calls.
thanks!
Hello Everybody
I have been making experiments with an Nikon D90 with great results, but until now there are some properties that I can’t control.
– Live View: for this I have used the command value 0xD05D with no results.
– Video Record : For this I don’t have idea of which value should I use or where to find it, I have tried with all the vendor defined properties without successful
Any suggestion?
Thanks!
Hi Azrrael,
i can’t help you with your actual questions. Sorry. Hoping somebody else will step in, but i would very thankfull if you can post me your setup what leads you to the great results. Working now a view month on this to compile the ptp lib with qp and all this but without a “great result”
Thanks in advance!
Hi Simon and Azrrael,
I’m new here and came here by surfing through the challenge I have – I want live view remote video recording form my D3200 – this is not implemented, which (I think) means that the command isn’t present in the D3200’s firmware. I’d like live view recording via USB (PTP?) so that the remote video record function of softwares like qdslrdashboard and digicam control are available.
I’m not great at coding, but (following the infinite monkeys theory) I will eventual solve my problem.
Has anyone been able to add the command(s) to the Nikon D3200 necessary for recording video via UB and live view?
I’ll contribute any way that I can, and I’m prepared to test as well.
Cheers!
Trevor