supplierdeeply

CHDK while using SX530HS built-in wifi

  • 12 Replies
  • 1467 Views
CHDK while using SX530HS built-in wifi
« on: 11 / May / 2017, 10:22:48 »
Advertisements
I'm looking for some way to use the built-in SX530HS wifi to copy files to a PC under CHDK control.

The wifi support built-into the SX530HS seems fine for allowing files to be remotely downloaded, and it can even fire the shutter, but that's all. I know it would be very hard to get full wifi control under CHDK, but I've found that CHDK can continue running -- even running lua scripts -- while the camera is wifi tethered. The catch is that the wifi apparently disables all the camera buttons, and that causes CHDK to be unable to do things like capturing another photo while wifi is running.  E.g., shoot() apparently uses the button-press interface and is hence disabled, but scripts can still be running and even writing on the display. A lua script can take photos and then enable wifi to send them, but ending the wifi connection apparently forces the camera to power down rather than to return to normal operation.  I'm open to any workaround.  BTW, I have done full remote control via Toshiba FlashAir SD cards, but I'm trying to avoid needing a FlashAir card in each of an array of SX530HS cameras....

Re: CHDK while using SX530HS built-in wifi
« Reply #1 on: 11 / May / 2017, 21:00:35 »
I'm looking for some way to use the built-in SX530HS wifi to copy files to a PC under CHDK control.
There may be a indirect way, by using Canon's (some times unreliable)  Camera Connect App, but I have only tried
the Android version's on my Sx600, Sx610 and EOS M3.:-

a/ SX530HS via the Wi-Fi  CC-app to a smart phone or smart tablet and then download to your PC.

b/  SX530HS via the Wi-Fi  CC-app  to a second CHDK enabled and wifi CC-app capable Camera USB tethered to a PC.

c/ When I tried some recent versions Canons PC software I couldn't get a direct connection via the wifi  CC-app.
    Just a vague connection error message ( ??? ).

Note:1 Older versions of the wifi  CC-app  can be found by using Google, however some caution is then required.

Note:2 The Wi-Fi  CC-app  can then be de-compressed just by changing the file extension CC-app.apk to CC-app .zip

Note:3 The Wi-Fi  CC-app can then be  dis-assembled  by using ARMu, IDA-Demo or similar.

Note:4 I then compare the dis-assembly's to establish that they are an OK version.

Note:4 Running CHDK and the Wi-Fi  CC-app doesn't crash my cameras.

H-H 

Re:- « Reply #5... » Non Wi-Fi Solution's.

An Explanation for anyone interested in CHDK Camera Array but  Non Wi-Fi rigs.

Edit #1 New Attached Files:-

GPS SD &SDHC Card Reader Extension Cable.jpg

Micro SD TF Memory Card Kit.jpg

The Basic concept is to modify the FourSee Camera Array Rig, (as shown in the attached photo; Reply #5),
to enable external access to the SD Card's. But another problem is that the rigs position is then changed slightly when Inserting or Removing the SD Cards. (???) This is why the Wi-Fi method is then preferded.

a/ "...Basically, I'm trying to have an array of () cameras functions as one.
    I've done this many times before, but always using USB for sync and then being stuck with the problem of
   how to collect the captures when done..."
   
Use the GPS SD &SDHC Card Reader Extension Cable kits.

b/ "...because the PowerShot N doesn't take SD cards..."
   
Use a  Micro SD to SD TF Memory Card extention Kit
« Last Edit: 13 / May / 2017, 02:17:54 by Hardware_Hacker »

Re: CHDK while using SX530HS built-in wifi
« Reply #2 on: 11 / May / 2017, 21:24:21 »
Yes, Canon's Camera Connect App can be used to grab the images... BUT when the app is closed, the camera powers down. While the wifi connection to the app is live, CHDK runs but can't do anything involving the UI, which includes shooting -- that's the problem. As a minimum, I want to be able to shoot, transfer files, and repeat.

*

Offline nafraf

  • *****
  • 1303
Re: CHDK while using SX530HS built-in wifi
« Reply #3 on: 11 / May / 2017, 22:46:02 »
See reyalp's investigations


*

Offline reyalp

  • ******
  • 11496
Re: CHDK while using SX530HS built-in wifi
« Reply #4 on: 12 / May / 2017, 01:07:35 »
See reyalp's investigations
FWIW, my hope was to use PTP/IP, since then all the CHDK extension (script execution, file transfer, remote shoot, live view etc) would "just work", but I was never able to get PTP/IP working while in record mode. I did successfully use the PTP extension over PTP/IP in playback mode, but my hack to get the camera paired without being accessed by windows no longer seems to work in windows 10. (edit: still works, other things were broken)

If you just want to be able to use the network without PTP/IP (and the CHDK extension), a workable approach should be using the console hook to set up the network connection. You should then be able to use the socket functions etc which are pretty easily identifiable.

I still want to get back into this some day, but I haven't found the time. A first step would be finishing up the console hook stuff to make a standard feature in the main codebase.
« Last Edit: 10 / January / 2018, 03:28:01 by reyalp »
Don't forget what the H stands for.

Re: CHDK while using SX530HS built-in wifi
« Reply #5 on: 12 / May / 2017, 09:03:39 »
Thanks! A thread from 2013...  no wonder I didn't catch that as the most relevant....   :)


I wasn't going to have windows on the other end, but Linux (or maybe Canon's app under wine or Android on a Linux box?). I would be thrilled to just get a straight socket interface (or at least a stream I/O interface) to either C code compiled-into CHDK or a Lua script -- that would be ideal!  It looks like that has been done before, according to the 2013 thread; I'll have to look that over with my students....


Basically, I'm trying to have an array of cameras functions as one. I've done this many times before, but always using USB for sync and then being stuck with the problem of how to collect the captures when done. It's not hard to collect the images via a FlashAir card (and even to send commands to the cameras via having FlashAir read commands and stick them in a file a CHDK script can scan), but that didn't help with FourSee (shown in the attached photo), because the PowerShot N doesn't take SD cards. With the SX530HS, our issue is simply cost -- we're trying to tie more together and an extra $30/camera for FlashAir cards hurts.

*

Offline reyalp

  • ******
  • 11496
Re: CHDK while using SX530HS built-in wifi
« Reply #6 on: 12 / May / 2017, 16:56:45 »
I wasn't going to have windows on the other end, but Linux (or maybe Canon's app under wine or Android on a Linux box?).
For PC connections, the camera uses PTP/IP with UPnP for discovery/pairing. When I looked into this before, I didn't find an obvious way to set up the UPnP stuff on linux, though I didn't try very hard. I don't know much about the current state of Wine, so I can't comment on the prospects for that.

The phone apps appear to use a different (presumably proprietary) protocol, but I have not investigated it at all. This could be a fruitful avenue for reverse engineering.

Quote
I would be thrilled to just get a straight socket interface (or at least a stream I/O interface) to either C code compiled-into CHDK or a Lua script -- that would be ideal!  It looks like that has been done before, according to the 2013 thread; I'll have to look that over with my students....
I would be thrilled if any of your students wanted to help move this capability over the finish line ;)

To get the network running without PTP/IP, you just need to feed the SSID, login etc to some Canon function that get their input from the camera console.

From my notes
Code: [Select]
=call_event_proc_task('NellConnect')
=return cam_con_gets()
ESSID:
=return cam_con_puts('ssid of my ap\n')
=return cam_con_gets()
ssid of my ap
ConnectionType( 0:Infra 1:adhoc )
Select->
=return cam_con_puts('0\n')
=return cam_con_gets()
0
SecurityType:
0: NONE SECURITY
1: WEP
2: WPAPSK/TKIP
3: WPAPSK/AES
4: WPA2PSK/TKIP
5: WPA2PSK/AES
Select->'
=return cam_con_puts('2\n')
=return cam_con_gets()
2
NetworkKey:'
=return cam_con_puts('*****\n')
=return cam_con_gets()
'*****
Addressing( 0:dhcp 1:autoIP 2:manual )
Select->'
=return cam_con_puts('0\n')
Note this  this requires the console hook patch, and is from elph130. It's possible Canon has changed things in newer cameras, though my impression is that the PC connection stuff is pretty similar on G7 X.

There's a wealth of debugging functions with descriptive strings which should make it easy to identify most of the socket related calls.
Quote
Basically, I'm trying to have an array of cameras functions as one. I've done this many times before, but always using USB for sync and then being stuck with the problem of how to collect the captures when done. It's not hard to collect the images via a FlashAir card (and even to send commands to the cameras via having FlashAir read commands and stick them in a file a CHDK script can scan), but that didn't help with FourSee (shown in the attached photo), because the PowerShot N doesn't take SD cards. With the SX530HS, our issue is simply cost -- we're trying to tie more together and an extra $30/camera for FlashAir cards hurts.
An alternative (which I'd guess you've probably considered already, but FWIW) would be to use something like a raspberry pi and use regular PTP to get the images off the camera. Obviously this increases the power requirements and complexity.
Don't forget what the H stands for.

Re: CHDK while using SX530HS built-in wifi
« Reply #7 on: 13 / May / 2017, 02:22:05 »
« Reply #6 » by reyalp  "...An alternative (which I'd guess you've probably considered already, but FWIW) would be to use something like a raspberry pi and use regular PTP to get the images off the camera. Obviously this increases the power requirements and complexity..."

~~~~~~~~~~~~~~~~~~~~

More detailed Explanation's for anyone interested in the general design of, outwardly pointing, CHDK or SDM Camera Array's.

This type of, outwardly pointing, multi-camera rig is used for capturing panoramas, the main design goal is to "MINIMIZE" Parallax stitching errors, So a design requirement is locate the cameras  close together as possible.

Example:- Google Street View's "Approved" Cameras.

Two or more non Wi-Fi cameras are then synced via CHDK or SDM or SDM-Lite, CHDK is used when "Small" image overlaps are required, SDM for "Large" image  overlaps are required.

Also the multi-camera array is usually mounted on a pole and the pole can also be part of a tripod or support.

More advantages of the (external) raspberry pi alternative:-

a/  The raspberry pi and additional battery's mounted at the base of the pole tripod or support. This gives improved mechanical camera and tripod stability.

b/ No additional space requirement's in the multi-camera array for the raspberry pi and battery's.

c/ The (Metal) pole can be additionally used for passive, internal, Wi-Fi Redirection or to internally contain the
USB Cables.

d/ Long Range Wi-Fi and Remote Camera Control is possible my be up to 1Km, via the raspberry pi and a more efficient Transmit and Receive Wi-Fi Antenna array's.

H-H

More efficient Transmit and Receive Wi-Fi Antenna array's. Attached Example's :-

TL-WN7200ND 150Mbps High Power Wireless USB Adapter. (Example #1)
2-4GHz Yagi Antenna RP-SMA (Example #2).

Note that the Wi-Fi Antenna can be then be hidden from the multi-camera array field of view.
Also Note that have successfully used a Tp-Link TL-WN7200ND on my Asus x402c Laptop, over about 1km
to then to log-on to the CHDK Forum. 
« Last Edit: 13 / May / 2017, 02:39:38 by Hardware_Hacker »


Re: CHDK while using SX530HS built-in wifi
« Reply #8 on: 13 / May / 2017, 02:56:34 »
I wasn't going to have windows on the other end........
With windows-10, and probably other OS's, there may be a few other issues to consider.

Some Examples and Also see the win-10 setup attached files.:-

a/ Wi-Fi Connection Reliability, my windows-10 is constantly dis-connecting, including when trying
     to do this post.   

b/ The apparent laptop default Win-10 is to save power by turning off the Wi-Fi Connection.

c/ The apparent laptop default Win-10 is to constantly un-check the silent re-connect box option. ( ??? )

d/ Constant Wi-Fi Connection dropouts even with a 100% signal strength.

H-H
« Last Edit: 13 / May / 2017, 03:01:56 by Hardware_Hacker »

Re: CHDK while using SX530HS built-in wifi
« Reply #9 on: 13 / May / 2017, 03:17:02 »
I'm looking for some way to use the built-in SX530HS wifi to copy files to a PC under CHDK control.

The wifi support built-into the SX530HS seems fine for allowing files to be remotely downloaded, and it can even fire the shutter, but that's all. I know it would be very hard to get full wifi control under CHDK, but I've found that CHDK can continue running -- even running lua scripts -- while the camera is wifi tethered. The catch is that the wifi apparently disables all the camera buttons, and that causes CHDK to be unable to do things like capturing another photo while wifi is running.  E.g., shoot() apparently uses the button-press interface and is hence disabled, but scripts can still be running and even writing on the display. A lua script can take photos and then enable wifi to send them, but ending the wifi connection apparently forces the camera to power down rather than to return to normal operation.
 I'm open to any workaround.....
My Observations on my M3 is somewhat similar in regard to the Wi-Fi CC-app.

Another thing that happens on the M3 is that the HDMI Live is then disabled and switched to the Smart Phone or Tablet.

However "....ending the wifi connection apparently forces the camera to power down..."
This problem has also occurred  my "FIX" was to instal or re-install a different version the Wi-Fi CC-app.

H-H

Windows 10 Wi-Fi Connection Reliability;_ additional attachments
« Last Edit: 13 / May / 2017, 03:23:55 by Hardware_Hacker »

 

Related Topics