MLV Lite - The sweet taste of MLV with none of the extra calories™

Lua scripting updated


Twitter: @autoexec_bin    Facebook: magiclantern.firmware    Live chat: [email protected]

Want to help with Magic Lantern development, but have no coding skills?

Author Topic: [proposal] tr_wifi.mo - Transcend WiFi SD driver  (Read 7152 times)

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 2701
[proposal] tr_wifi.mo - Transcend WiFi SD driver
« on: September 11, 2013, 09:00:55 PM »
the transcend wifi cards recently got interesting, after an article about root'ing these devices was published.
(http://haxit.blogspot.com.es/2013/08/hacking-transcend-wifi-sd-cards.html)


internals:


they contain an ARMv5 instruction set ARM926EJ with somewhere around 400 MHz and 32 MiB RAM.
plus an integrated 16 or 32 GiB SD card ;)
the used operating system is linux with busybox and a bunch of reaaaallllyyy hackish shell scripts.
you can place an 'autorun.sh' and it will get executed on startup... as root...

unfortunately the wifi speed is embarrasing slow - i got 1 MBit/s which is not making any fun with .cr2 files.
(no, dont even ask for raw video!)

Magic Lantern - tr_wifi.mo module functionality
 - "Enable TrWiFi" / "Disable TrWiFi" - places or removes autorun.sh with magic lantern specific code
 - "Mode: DirectShare" / "Mode: Internet" - depending on current mode switch to the other one for either accessing internet or tethering with mobile phone

plus providing these functions to other modules:
 - int32_t trwifi_get_file ( char *url, char *dst_file )
   the file at given URL is being downloaded and copied from the linux system to camera filesystem.
   as we can access the SD from linux, but this will compete with our DryOS filesystem driver, we have to use files like B:/ML/DATA/TR_UPLNK.DAT and B:/ML/DATA/TR_DNLNK.DAT.
   both camera and linux will access the files without changing anything in the file structure to transfer data between each other.
   possible structure: [payload_size][payload] where payload initially is a shell script that is executed by autorun.sh
   these shell scripts can use that comm channel for any arbitrary command specific to the script. the camera has to care for communicating with the right commands.

 - char *trwifi_exec ( char *command )
   execute any command on linux side and return its stdout as string

i am not sure if it makes sense or fun to implement tcp/udp connect/read/write functionality or even PTP functionality (by forwarding to DryOS PTP handler).
tunneling through these files may be a bit slow and complicated.


constructive feedback?


SDX

  • Moderators
  • Senior
  • *****
  • Posts: 288
  • Medialogist
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #1 on: September 11, 2013, 09:07:51 PM »
is the wifi speed good enough for streaming LV? Would be really cool to use these cards as transmitter for tablet/notebook based, external field monitors.
600D, EOS M - Flickr


marcb

  • New to the forum
  • *
  • Posts: 7
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #3 on: September 12, 2013, 12:15:43 AM »
This sounds interesting  :) Maybe one could use the processing power of the card's hardware to encode small proxy videos of the RAW footage. Ideally, the proxies would be small enough so that they could be streamed to a phone/tablet/laptop via the cards wifi.


marcb

  • New to the forum
  • *
  • Posts: 7
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #5 on: September 12, 2013, 12:30:41 AM »
Good point  ;D Is it possible to do it via DIGIC? Would be a very nice feature... Especially if the proxies could be streamed via wifi. But even without the wifi streaming it would be awesome to have small proxy clips on the cam in addition to the RAW clips.

Pelican

  • Senior
  • ****
  • Posts: 398
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #6 on: September 12, 2013, 01:40:41 AM »
It can check and download the latest ML... :)
« Last Edit: September 12, 2013, 02:02:50 AM by Pelican »
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 580EX, 550EX, YN600EX, YN565EX x 2
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

Greg

  • Senior
  • ****
  • Posts: 458
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #7 on: September 12, 2013, 02:01:36 AM »
i guess it is not fast enough to get a smooth frame rate :)
but mabye 1 frame /sec ?

1Mb = 128KB
15FPS - 8,54KB (one frame)
We need 360x240 compressed jpg  ;D

It would make sense if the card have 5Mb or more speed.


eduperez

  • Developer
  • Freshman
  • *****
  • Posts: 65
  • 400D
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #8 on: September 12, 2013, 09:26:45 AM »
It can check and download the latest ML... :)

Can you expand on that please!? I am really tired of taking the card out of the camera to try each compilation...

SDX

  • Moderators
  • Senior
  • *****
  • Posts: 288
  • Medialogist
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #9 on: September 12, 2013, 11:36:18 AM »
I remember it to be miyake who did a great effort in making a system that updates autoexec.bin via PTP. He never finished it though. Maybe it could be useful.

EDIT: found it http://www.magiclantern.fm/forum/index.php?topic=2246
« Last Edit: September 12, 2013, 11:42:44 AM by SDX »
600D, EOS M - Flickr

gerk.raisen

  • Member
  • ***
  • Posts: 157
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #10 on: September 13, 2013, 12:11:42 PM »
Better than the Transcend cards there are the PQI Air cards.
Same "hackability" (it seem that Flucard, Transcend and PQI share the same or very similar Linux-Busuybox inside.
Similar but the big difference is that PQI Aircard works like a microSD to SD converter.
You can put any microSDHC inside (up to 32Gb)
In theory it doesn't affect the microSD original speed.
So you can reach at least the class-10 speed, hopefully more (UHS-I card)


I was already thinking about some sort of PTP implementation to have a sort of "console", maybe in future when it will return to works also launch scripts.
I think your idea is good...go ahead :)
I can already test it on Flucard and PQI.

marcb

  • New to the forum
  • *
  • Posts: 7
Re: [proposal] tr_wifi.mo - Transcend WiFi SD driver
« Reply #11 on: September 13, 2013, 05:45:49 PM »
Remote control of the camera functions & ML settings via the wifi SD card paired with a smartphone or laptop would be pretty cool  :)

I was already thinking about some sort of PTP implementation to have a sort of "console", maybe in future when it will return to works also launch scripts.
I think your idea is good...go ahead :)
I can already test it on Flucard and PQI.
« Last Edit: September 13, 2013, 05:48:28 PM by marcb »