[proposal] tr_wifi.mo - Transcend WiFi SD driver

Started by g3gg0, September 11, 2013, 09:00:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g3gg0

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?

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

SDX

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.

g3gg0

i guess it is not fast enough to get a smooth frame rate :)
but mabye 1 frame /sec ?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

marcb

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.

g3gg0

Quote from: marcb on September 12, 2013, 12:15:43 AM
Maybe one could use the processing power of the card's hardware

which power?
its a 200 MHz device, even DIGIC is better ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

marcb

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

EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

Greg

Quote from: g3gg0 on September 11, 2013, 10:05:53 PM
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

Quote from: Pelican on September 12, 2013, 01:40:41 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

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

gerk.raisen

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

Remote control of the camera functions & ML settings via the wifi SD card paired with a smartphone or laptop would be pretty cool  :)

Quote from: gerk.raisen on September 13, 2013, 12:11:42 PM
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.