How can you programmatically control a Casio Exilim EX-F1 digital camera? - camera

I would like to be able to programmatically emulate a shutter button press on my Casio Exilim EX-F1 digital camera.
It comes with a USB tethered remote control that can emulate a shutter press, so I would think there is a way to emulate that from a PC.
I've looked and can't find any libraries or anything for controlling this camera.
Anybody have any ideas? How about a way to "sniff" the USB being sent from the remote (I can't imagine that's easy).

Ok although it might be out-of-the-box thinking the easiest solution I can think of, without having the patent documentation + technical specs in-front of me (that is the normal route people use to do this sort of thing) you could always use Lego Mindstorm robotics.
Edit: Anyways besides the Lego, which would be my course of action, I mentioned, the hard-core way is to use the Spec sheets, you can normally get them off the website, but then your basically into driver programming. If you find that prospect attractive in anyway this link will give you some ideas for doing it on Windows.

In case anyone finds this question, Casio finally released an official way to do this with the free EX-F1 Controller software (with special firmware included):
http://support.casio.com/download.php?rgn=5&cid=001&pid=573
It has its limitations but it makes more possible for sure.

There's a non-official API to control the Casio EX-F1. It's a reverse enginyering free (as in freedom) product.
http://code.google.com/p/exf1ctrl/

Related

Applying Non-Standard Power Assertions & Creating Virtual HIDs

I've got a big ask here, but I am hoping someone might be able to help me. If there's another site you think this should be posted on, please let me know.
I'm the developer of the free app Amphetamine for macOS and I'm hoping to add a new feature to the app - keeping a Mac awake while in closed-display (clamshell) mode while not having a keyboard/mouse/power adapter/display connected to the Mac. I get requests to add this feature on an almost daily basis.
I've been working on a solution (and it's mostly ready) which uses a non-App Store helper app that must be download and installed separately. I could still go with that solution, but I want to explore one more option before pushing the separate app solution out to the world.
An Amphetamine user tipped me off that another app, AntiSleep can keep a Mac awake while in closed-display mode, while not meeting Apple's requirements. I've tested this claim, and it's true. After doing a bit of digging into how AntiSleep might be accomplishing this, I've come up with 2 possible theories so far (though there may be more to it):
In addition to the standard power assertion types, it looks like AntiSleep is using (a) private framework(s) to apply non-standard power assertions. The following non-standard power assertion types are active when AntiSleep is keeping a Mac awake: DenySystemSleep, UserIsActive, RequiresDisplayAudio, & InternalPreventDisplaySleep. I haven't been able to find much information on these power assertion types beyond what appears in IOPMLibPrivate.h. I'm not familiar at all with using private frameworks, but I assume I could theoretically add the IOPMLibPrivate header file to a project and then create these power assertion types. I understand that would likely result in an App Store review rejection for Amphetamine, of course. What about non-App Store apps? Would Apple notarize an app using this? Beyond that, could someone help me confirm that the only way to apply these non-standard power assertions is to use a private framework?
I suspect that AntiSleep may also be creating a virtual keyboard and mouse. Certainly, the idea of creating a virtual keyboard and mouse to get around Apple's requirement of having a keyboard and mouse connected to the Mac when using closed-display mode is an intriguing idea. After doing some searching, I found foohid. However, I ran into all kinds of errors trying to add and use the foohid files in a test project. Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app? I'm not asking for code help with that (yet). I'd just like some help determining whether it might be possible to do.
Thank you in advance for taking a look.
Would Apple notarize an app using this?
I haven't seen any issues with notarising code that uses private APIs. Currently, Apple only seems to use notarisation for scanning for inclusion of known malware.
Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app?
Taking a quick glance at the code of that project, it's clear it implements a kernel extension (kext). Those are not allowed on the App Store.
However, since macOS 10.15 Catalina, there's a new way to write HID drivers, using DriverKit. The idea is that the APIs are very similar to the kernel APIs, although I suspect it'll be a rewrite of the kext as a DriverKit driver, rather than a simple port.
DriverKit drivers are permitted to be included in App Store apps.
I don't know if a DriverKit based HID driver will solve your specific power management issue.
If you go with a DriverKit solution, this will only work on 10.15+.
I suspect that AntiSleep may also be creating a virtual keyboard and mouse.
I haven't looked at AntiSleep, but I do know that in addition to writing an outright HID driver, it's possible to generate HID events using user space APIs such as IOHIDPostEvent(). I don't know if those are allowed on the App Store, but as far as I'm aware, IOKitLib is generally fine.
It's possible you might be able to implement your virtual input device using those.

What is the nature of the gestures needed in Windows 8?

Most of touchpads on laptops don't handle multitouch, hence are not able to send swipe gestures to the OS.
Would it be possible to send some gestures to Windows from an external device, like a Teensy, or a recent Arduino, that can already emulate a keyboard and a mouse. I could send buttons 4 and 5 (mouse wheel up and down), but I would like to send a real swipe gesture (for example with a flex sensor...).
One of the ways that you could work with arduino and similar is to use the Microsoft .NET Microframework, which is an open source code, available for no cost from: Micro Framework
There are other frameworks available for the Artuino that you might want to use. So if you have a great idea on how to utilize the sensor hardware, then the output must meet certain specifications.
To be able to connect to your hardware that reads gestures, you will need to understand how drivers are created, so take a look at this: Info on drivers.
To find that type of information you would need to take a look at above link, this is for sensors, which would appear to be not quite what you are looking for, you are looking to use "gestures" but first you have to be able to make the connection to your device, this guide MIGHT help. I have reviewed it for other reasons.
There is a bunch of stuff to dig through, but first of all, imo, is to understand how to get your software to communicate with Windows 8. Let me know if you have any other questions. I am not the best person, you might want to refer to the community at the Micro Framework link shown above.
Good luck.
That's perfectly possible. What your effectively suggesting is that you want to create your own input peripheral like a trackpad and use that to send inputs. As long as windows recognizes this device as an input source it will work.

Is it possible to record screen with Titanium / Appcelerator?

We're in process of developing a desktop application which needs to record user's screen once he clicks a button. I read a tutorial about Adobe AIR, which says it is easy to do with AIR: http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html
But our preference is Titanium as we've explored it a little bit. So I want to know is that even possible? If yes, how can we get started with?
There's also an interesting solution which uses Java applet for recording, as demonstrated here: http://www.screencast-o-matic.com/create?step=info&sid=default&itype=choose
But again, we're not sure about JAVA and would like to know how can it be done? or if its even possible to run a JAVA applet in Titanium?
When you say "record screen", I'm assuming you mean video. Correct?
The only way to do this in Titanium Desktop right now is to take a bunch of screenshots and string them together (encoding would probably need to be done server-side).
Depending on how long your videos need to be, this probably won't work for you. I'm also not confident in how quickly you could capture screenshots, and if it would have a high enough frame rate to be usable.
Past that, a module could be developed for Desktop to support some native APIs to record video. That's not something I see on the horizon, though.
I hope this helps, albiet a rather dismal answer. -Dawson

How to make a library for the webcam?

I'm learning Factor and I thought it would be great to have a small program to capture images from the webcam that comes with my mac pro. I know every webcam will be very different but sounds like something I should be able to do. I want to create a library with support for Mac, Linux and Windows. The problem is that I'm not sure where to start.
Factor-based answers are welcome but I'm looking for the language agnostic solutio. When I google for it, all I get is programs that capture images. I want to learn how to interact (in the 3 big operative systems) with the drivers I guess.
I think the only clue I have is the ioctl wiki page. How would you start such a project? What kind of google keywords would you use? Books?
It's not clear if you want to write a driver for your particular webcam or a library that makes talking to the existing driver easier.
If you want to write a driver for your webcam, you probably want to investigate libusb for Mac and Linux and libusb-win32 for Windows. You would need to understand the protocol that your webcam talks, though. You could probably read the source code for the existing Linux driver (assuming there is one, which is pretty likely).
As for Google search terms, you might try "video capture" and maybe looking for Python/Ruby etc. code or Open Source programs will get you code you can look at to see how to do what you want to do.
Perhaps if you describe in a little more details what you're trying to accomplish someone could give you better suggestions.

Programmable stand alone Button (hardware+software)

I need to have a physical button that when pressed will be noticed by my program.
There are many types of usb-buttons that are preprogrammed to open a website, shutdown the computer and so on. And I have seen some projects using buttons and serial port.
But none of them "have it all", an easy description of how to put togheter the hardware, and an easy description of the code.
I really only need a button connected to the serial port that send some signal that the button has been pressed.
I know this question is a crossover between software and hardware, but when I googled this I have seen plenty more people asking this question, all of them left without answers.
Maybe this question fits stackoverflow?
EDIT: My solution
My application in this case was a que system and I wanted a button for people to print a que ticket.
I just took apart an old ps2-mouse and bought me a button (4$) and solded two wires from the circuit board to the button. Each mouse button has to dots on the back of the circuit board that we can connect an external button to.
Then in my program I just hooked the mousebutton-event systemwide to get when the button is pressed, in my case this computer is dedicated to this program so its not a problem.
Might be worth a look at Phidgets:
http://www.phidgets.com/index.php
They do many little USB I/O devices, and the code samples are there on the site too.
I would take a look at the Arduino microcontroller board - you can wire all sorts of things into that (buttons, sensors) and interface with it using the .NET Ports classes.
I'm looking for the same thing. this might do the trick:
http://awatts.co.uk/
Haven't tried it yet, but he has code to run a shell command or simulate a keypress and the source code is available if you need something different.
And for Linux: search freshmeat dot net for usb-panic-button-daemon project. (I'm a new user, and can't post more than one hyperlink!)
And another thing I just found is that Griffin makes an SDK available (at least they used to, I'm waiting for a reply) for their PowerMate knob to get it to simulate more than mostly just keypresses.
BTW I'm looking for USB buttons, but I could use serial too, come to think of it.