Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
07-21-2011, 03:51 AM   #1
Veteran Member




Join Date: Sep 2010
Location: Canberra
Photos: Gallery | Albums
Posts: 739
Microcontrollers such as Arduinos - Mobile Apps, Pentax hackery.. maybe...

Local Geek Porn site sent me an email pimping that they are getting a bunch of Redpark Serial Cables for iOS.

Serial Cable for iOS

Basically, its a way to get serial into and out of any iOS device, iPad, iPhone etc.

Got me thinking - this means it would be quite simple now to look at some sort of Pentax Remote Control device... that can potentially even be wireless still too.

Option A is the shortest route...

Use Serial IO Cable, Connect to Mini-Arduino, attach IR LED's.. use the established "IR Remote" code on the arduino, write a quick and dirty interface..
and Voila!.. IR Remote on any iOS Device. And because its arduino based, very easily firmware upgradeable/scriptable.

Want to do HDR Bracketted Time Lapse? No Problem...

Option B is a longer path to travel, but cooler...

Take the pktether code that is now established, and port its functionality across to an Arduino. At least in terms of the function controls. Also attach i/O for wireless (wifi, or xbee... choose your poison). Combine with a nice PC frontend and an Android/iPhone frontend and your set (can already do the serial on android).

Image transfer with the Serial is out - it'll only do 57.6k. But if you used an Arduino as a USB host and then had it do WiFi to an iPad/iPhone in infrastructure mode - then it could potentially do RAW straight from camera ...

Has anyone played much with microcontrollers etc and their Pentax's ? I think with pktether now getting there, the ability to port it to a microcontroller isn't that far fetched.. and with that... we can do all sorts of things...

We should look at getting some interested parties together and see what some like minded individuals could come up with ! We all have the cameras.. and arduino's are dirt cheap if you don't have some lying around already...

Thoughts ?


Last edited by adr1an; 07-25-2011 at 10:40 AM.
07-22-2011, 04:50 AM   #2
Veteran Member




Join Date: Sep 2010
Location: Canberra
Photos: Gallery | Albums
Posts: 739
Original Poster
No one ? Wow... I thought they'd be people all over the shop that had played with or thought about microcontroller based pentax hackery... not to mention from an iOS device...
07-22-2011, 06:58 AM - 1 Like   #3
Veteran Member
RioRico's Avatar

Join Date: Jun 2008
Location: Limbo, California
Posts: 11,263
This is about Apple gear, right?

No thanks, I never touch the stuff.
07-25-2011, 10:20 AM   #4
Senior Member




Join Date: Apr 2011
Location: Munich
Photos: Gallery
Posts: 203
I have the cable (well, the SkyWire version, which is fairly close to this, from same manufacturer).
I am also a programmer and actually thought about this, too.

The problems are:
- speed is limited to 57600 baud. That's fairly slow.
- to make an app out of it, you'd then have to cater it to every iOS device by getting that device's UDID, registering it and deploy a new download for it. Which means you'll have a lot of work servicing all those who want the app but don't have their own Apple Developer subscription and tools. Alternatively, you could provide a single download for those who have jailbroken their device.

There's a much better solution:

Instead of the Redpark cable, use a Wifi-to-serial adapter, like the RN-134 from Roving Networks. That provides a serial I/O via Wifi, and it's much faster (about 1mbps). Also gets rid of the ugly cable.

All we then need is the part that talks to the camera via USB.

I am actually looking into some of this. I've contacted the pktether programmer to see if he'd reveal the details of how he talks to the camera (I have the PTP specs but the K-5 doesn't offer the official features for this, so I guess Tomasz knows something I don't).

One more thought on the speed: Well, even 1mpbs won't do us good if we wanted to transer pictures from the camera. A RAW file would still take ages to transfer at that speed. So, all we can accomplish with this setup is remote controlled shutter release and maybe control the capture properties.

I wanted to see what pktether can do, but it doesn't see my K-5, not sure why.

07-25-2011, 10:38 AM   #5
Veteran Member




Join Date: Sep 2010
Location: Canberra
Photos: Gallery | Albums
Posts: 739
Original Poster
Could just do wifi natively off of the 'duino via a wifi shield though.. so >1mbps isn't so much an issue.. and receiving files via the standard iOS SDK isn't terribly difficult either (ala dropbox etc)..

So yes - the key now is to find out how portable the basic tether code is and port it to the Arduino. That will give immeadiate remote-control on the same level.
Second step would be to then take the image sampling stuff and have it transmit at least the LV preview.. then final step actual full RAW transfer.
Then you have the basics of the 'smart' controller that is programmeable - its then just a matter of writing the interface/porting pktether so to speak...

If done well enough on the iOS side - the app itself can be rapidly ported if its written in that cross-worlds IDE thingy so it can spit out a 'droid, iOS, and MasOSX/PC version...

The thing hangs on getting pktether source working natively on the duino.. after that everything else is just elementary really.

I'd love to do some hacking on this front - so if your interested - we should keep it going in this thread even if its just on the 'duino side for the moment.. see what we can't get happening... alternatively PM me with some details and we can maybe take it out of the forum if it just bores everyone else...
07-25-2011, 10:55 AM   #6
Senior Member




Join Date: Apr 2011
Location: Munich
Photos: Gallery
Posts: 203
I don't know the "wifi shield" yet - but aren't all Arduinos rather slow 8 bit CPUs? Running a proper TCP/IP stack and Wifi driver on it could be a bit of a burden, won't it? (ah, just googled it - yes, seems to be pretty fast, certainly faster than the RN module. So, if we get a Arduino which is fast enough to process those speeds now...)

I do have a small Linux computer here, which already has USB and TCP stacks on it, just no Wifi on board.

I also just learned that pk_tether doesn't use PTP at all, but Pentax's proprietary protocol. I wonder how Tomasz learned how it works - rev eng'd or are there same public docs on this?

Then there's the question if there's any LV transmission at all. Even with pk_tether, I don't see a live picture but only already taken pictures stored on the card. I believe, though, that the K20D had a live view, so maybe that's something Tomasz just hasn't gotten to implement.

> so if your interested

As long as you write "you're" or "you are" when you mean it, I'm happy to continue this ;^)
07-25-2011, 11:07 AM   #7
Veteran Member




Join Date: Sep 2010
Location: Canberra
Photos: Gallery | Albums
Posts: 739
Original Poster
Ok ok - grammar isn't my forte

And yes - Re the LV - it would be interesting to see what additional hooks there is post the K20D on that front. But even having the ability to take a 'test snap' and view it remotely ala the current PC version of pk_tether it would be nice.

07-25-2011, 07:23 PM   #8
Veteran Member




Join Date: Jan 2010
Location: Ferguson, Mo.
Photos: Gallery
Posts: 1,348
QuoteOriginally posted by adr1an Quote
Re the LV - it would be interesting to see what additional hooks there is post the K20D on that front. But even having the ability to take a 'test snap' and view it remotely ala the current PC version of pk_tether it would be nice.
Without a tether be be way more 'cute' for sure.

Used several micro's to bit bang some stuff on proto basis Adrian.
Couple of microchip's products.Everything was hard wired.
Fab'd up serial ports a few times so units could talk to each other.Time being most
valuable commodity,never having enough of it,almost all coding done via assembly
for RISC processors(reduce important stuff to complier),guess you see how
it plays out here. I'll get to point where I can say "thats nice" or more often,
"#%*@" it,grab a body/lens and go shooting.

Latest attemp at any kind of tether was fiber based cable switch for my K20.
Buddy gave me 'bout 80 meters of 3 mil fiber and had a few IR reciever/transmitter
packages on hand.Used a couple of pics to do the talking on each end.Had a couple
of cheap CS's,cut 'em up and used available hardware for connectivity.
Worked on short length of around 1 meter.Just not alot of practicality to it.
As is normally the case,said "#%*@ it",grabbed a body/lens and went shooting.
07-27-2011, 12:35 PM   #9
Inactive Account




Join Date: Jul 2011
Posts: 1
I work for Redpark. Here is an FAQ that is pretty sparse but useful. Sending control signals through the cable works well but sending large amounts of data (photos) would be disappointing at best unless you have lots of time. A Wi-Fi connection would be much faster and there are no Apple restrictions on WiFi.

There are Apple restrictions on using the 30 pin connector at the bottom of the iOS device. If you want to write an app that works through the 30 pin connector, the Redpark cable may be the way to go. Currently SkyWire and Get Console are using the serial cable for their apps.
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
arduino, cable, ios, port, wifi
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
DIY DSLR K-X “Cable” Cable Release trailrider Do-It-Yourself 4 07-11-2012 10:18 PM
Apple to unveil OS X 10.7 Lion, iOS 5 and iCloud at WWDC jogiba General Talk 3 06-08-2011 01:36 PM
K-5 opens up new possibilities sgrewal Pentax K-5 & K-5 II 18 03-28-2011 06:47 AM
X-sync cable v. Hotshoe extension cable Squier Pentax DSLR Discussion 10 11-01-2010 10:34 AM
Machinery Possibilities.. SCguy Post Your Photos! 3 05-30-2010 06:11 AM



All times are GMT -7. The time now is 08:43 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top