Wifi tethering using CHDK?

Started Sep 15, 2013 | Discussions
ProfHankD
ProfHankD Veteran Member • Posts: 8,155
Wifi tethering using CHDK?
1

I'm a long time user/developer of CHDK and am currently teaching a "Cameras as Computer Systems" course where I'm having students do some programming inside a CHDK A4000.  However, I really want to do some things involving wifi tethering of a CHDK camera....

I've been using CHDK with an EyeFi card to send images to a computer ("infinite memory" with a CHDK script taking photos), and I realize some PowerShots now have wifi support that can essentially do the same thing, but I'm interested in having something like the ability for a computer to drop commands into a file via wifi and have CHDK recognize & process the commands.

This certainly should be doable using a hacked transcend wifi SD card, but they cost $75.  I'm really hoping I can do this using, for example, the wifi built-into a $130 ELPH 320 HS.  Anybody know a way to do this?

 ProfHankD's gear list:ProfHankD's gear list
Canon PowerShot SX530 Olympus TG-860 Sony a7R II Canon EOS 5D Mark IV Sony a6500 +30 more
waterwingz
waterwingz Regular Member • Posts: 243
Re: Wifi tethering using CHDK?

You really need to ask that question on the CHDK forum : http://chdk.setepontos.com

That's where the core CHDK developers can be most easily reached.

Edit : looks like you already did that : http://chdk.setepontos.com/index.php?topic=9005.msg105358#msg105358and got the best answer you are likely to receive

 waterwingz's gear list:waterwingz's gear list
Canon PowerShot G16
ProfHankD
OP ProfHankD Veteran Member • Posts: 8,155
Re: Wifi tethering using CHDK?

waterwingz wrote:

You really need to ask that question on the CHDK forum : http://chdk.setepontos.com

That's where the core CHDK developers can be most easily reached.

Edit : looks like you already did that : http://chdk.setepontos.com/index.php?topic=9005.msg105358#msg105358and got the best answer you are likely to receive

Yup. I figured there was a decent chance that a non-CHDK-developer might have done this in some devious way and be lurking about this forum....  Maybe not, but it was worth asking here too.  

 ProfHankD's gear list:ProfHankD's gear list
Canon PowerShot SX530 Olympus TG-860 Sony a7R II Canon EOS 5D Mark IV Sony a6500 +30 more
waterwingz
waterwingz Regular Member • Posts: 243
Re: Wifi tethering using CHDK?

You could also try the German CHDK forum. Its the only other active CHDK forum I know about although I suspect most of the members watch the main CHDK forum anyway. But not all do.

http://forum.chdk-treff.de/

They are pretty casual about allow posts in English - google's chrome browser will allow you to automatically translate any responses or existing posts of interest.

edit :  typo

 waterwingz's gear list:waterwingz's gear list
Canon PowerShot G16
JJ Rodin Senior Member • Posts: 1,096
Re: Wifi tethering using CHDK?

First off, do you have a script that you can interject commands into it presently, iow- have a script running to inject commands into second script? (I honestly did not think this was possible, or for that matter to run 2 scripts)

Or have you found a script/api with access to the wifi (in cam or SD card) incoming command stack?

Seems if you have both of these then you have basic components for you students to hack it out!

Also, DSLRs and maybe some P&S have the ability via Canon utility for wired 'remote' control, do they now have it work for wifi cams such as 70D or sx280, etc and via wifi ?

OR buy a Sony specific P&S cam, DL the new Sony/Android api sdk, and have at it that way !

Good Luck

ProfHankD
OP ProfHankD Veteran Member • Posts: 8,155
Re: Wifi tethering using CHDK?

JJ Rodin wrote:

First off, do you have a script that you can interject commands into it presently, iow- have a script running to inject commands into second script? (I honestly did not think this was possible, or for that matter to run 2 scripts)

Or have you found a script/api with access to the wifi (in cam or SD card) incoming command stack?

I and my students don't just run scripts, but full custom C code. It's a pain, but there are plenty of places to hook your own code inside CHDK. Adding a script operator to read commands from a file is relatively easy.

Seems if you have both of these then you have basic components for you students to hack it out!

Only if somebody knows how to get packets from the wireless.

Also, DSLRs and maybe some P&S have the ability via Canon utility for wired 'remote' control, do they now have it work for wifi cams such as 70D or sx280, etc and via wifi ?

Apparently not for the PowerShots.  It's moving images from the camera only... although it can do that by request from the other device, so there is obviously a protocol that could be extended (if understood).  Also, I don't just want simple tethered control -- I want tethered interaction with a script.

OR buy a Sony specific P&S cam, DL the new Sony/Android api sdk, and have at it that way !

The Sony API doesn't allow much control of anything -- although I've been pushing Sony to fix that and also to allow 3rd-party in-camera scripts

Good Luck

Well, thanks.  

 ProfHankD's gear list:ProfHankD's gear list
Canon PowerShot SX530 Olympus TG-860 Sony a7R II Canon EOS 5D Mark IV Sony a6500 +30 more
waterwingz
waterwingz Regular Member • Posts: 243
Re: Wifi tethering using CHDK?

ProfHankD wrote:

Also, I don't just want simple tethered control -- I want tethered interaction with a script.

Have you looked at this :

http://chdk.wikia.com/wiki/PTP_Extension#chdkptp

Among other features, it allows you run Lua scripts on both the PC and camera side.  Doesn't address accessing the wifi stack - but then wifi is not really "tethered" is it

 waterwingz's gear list:waterwingz's gear list
Canon PowerShot G16
reyalp Regular Member • Posts: 193
Re: Wifi tethering using CHDK?

ProfHankD wrote:

I and my students don't just run scripts, but full custom C code.

How about reverse engineering?

I found a function in the elph130 firmware (at FF022068) which based on error messages allowed me to tentatively identify functions like socket(), setsockopt(), bind(), select() etc. Assuming these behave approximately like there traditional counterparts, getting some basic communication going shouldn't be out of reach of a motivated student.

I haven't tried them yet, but given that the relevant functions seem to be there I probably will soon.

Further discussion of this should probably go in the chdk forum, may be straying a bit far off topic for dpreview.

reyalp Regular Member • Posts: 193
Re: Wifi tethering using CHDK?
1

Apologies for the self reply, but for anyone interested, I have made some progress http://chdk.setepontos.com/index.php?topic=10724.0

Not a fully working solution yet, but it is now possible to communicate with CHDK over a wifi connection.

Keyboard shortcuts:
FForum MMy threads