Welcome, Guest. Please login or register.


Author Topic: SD card interface (Read 342618 times)

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: SD card interface
« Reply #105 on: 2014.March.20. 19:31:37 »
I thought it was a like a hard drive WIFI brand Conceptronics that I own. Has similar features, but is fully accessible from any device connected.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14779
  • Country: hu
    • http://enterprise.iko.hu/
Re: SD card interface
« Reply #106 on: 2014.March.20. 19:53:57 »
Quote from: gflorez
Only permits transfer files from the camera SD-card
Just read, no write?

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: SD card interface
« Reply #107 on: 2014.March.21. 00:33:34 »
Exact, only can be writed when inserted on a card reader. Disapointing....for now.

Offline SlashNet

  • EP addict
  • *
  • Posts: 1370
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
Re: SD card interface
« Reply #108 on: 2014.March.21. 01:22:51 »
Temporarily I have similar card.
It transfers files by Wi-Fi only from device to PC (photos & videos).

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: SD card interface
« Reply #109 on: 2014.March.22. 23:28:05 »
Now I have found(by myself...) a simple way to transfer files to the root of WIFISD.

It appears that uploading was an option that was dropped before being marketed, then a web page named "uploadto.html" was left without links from the principal web page.

Thanks to the poor security of the card you can access the folder where that HTMLs stay and run it...



This is not like a decent shell as I wanted, but is a minimum of commodity...


On the other hand, some hacker as discovered that Transcend had left open another door. At boot the card looks for a script in case of an upgrade, and it lets me to run a telnet connection thanks to a clever lines written by some guy..... just with only the script and an open version of a command named Busybox at the root of the card.


But for now I have to study to benefit me from this via, as I am an ignorant on Linux... and nearly on all....
-------------------------------------
Acabo de encontrar(por mi mismo...) una forma de transferir ficheros a la raíz de la WIFISD.


Parece que la opción de enviar ficheros fue abandonada antes de la comercialización, entonces, una pagina web llamada "uploadto.html" fue dejada sin enlace desde la pagina web principal.

Gracias a la pobre seguridad de la tarjeta, puedes acceder a la carpeta donde están alojados esos HTMLs y ejecutarlo...


Esto no es un Shell decente como yo quería, pero es un mínimo de comodidad...


Por otro lado, algún hacker ha descubierto que Trascend ha dejado abierta otra puerta. En el arranque la tarjeta busca un fichero para el caso de que exista una actualización, y eso me permite ejecutar una conexión telnet gracias a unas cuantas lineas inteligentes escritas por algún tipo..... solo se necesita el script y una versión abierta de un comando llamado Busybox en la raiz de la tarjeta.


Pero de momento tengo que estudiar para beneficiarme de esa vía, porque soy un ignorante en Linux... y en casi todo....
« Last Edit: 2014.March.23. 01:12:42 by gflorez »

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: SD card interface
« Reply #110 on: 2014.March.23. 00:02:49 »
The board layout is more or less finished now, just need to double check everything, then I'll get some boards made up. You can also see from the PCB I've included an extra SPI header, so if anyone wants to add a second SPI device, you can. There are more lines spare on the CPLD, so if people come up with good extra SPI devices, I can always create another expansion board with more devices on... :)

I'll have to get SDCC setup properly to write some some code to actually test the SPI interface.

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: SD card interface
« Reply #111 on: 2014.March.23. 01:05:30 »
You bring good news Saint. Sorry for usurp some this thread...

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: SD card interface
« Reply #112 on: 2014.March.23. 08:51:18 »
You bring good news Saint. Sorry for usurp some this thread...

Not at all, your news is very interesting! :) I was looking at SPI WIFI modules as well, but the WIFI SD cards are a great solution...

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: SD card interface
« Reply #113 on: 2014.March.23. 20:42:51 »
I've gained bi-directional ftp access to my WIFISD.

Busybox is a condensed library of Linux commands made for tiny environments, much like Exdos on our EP, and inside it there are plenty of utilities that can make work almost every task you can imagine. I've searched the net for information on how to mount a ftp with Busybox and, in his official page, the creator gives two ways, but I opted for the easiest. The only drawback is that you can access to non-SD area, that is not formatted in FAT32, and thus you can damage "some" the Linux system if you write on it.

For now I only know the Telnet direct command, some as "/sbin/busybox tcpsvd -vE 192.168.11.254 21 /sbin/busybox ftpd -w /mnt/sd", but the same doesn't work inside the autorun.sh script for now, surely caused by a wrong path.

if I get to know the exact command for the ftp-thing then it will be accessible to anyone who put the custom script in the root directory + Busybox.


The attached file is the ftp working. Observe the path at the right side. "sd" is the storage space mounted(mnt), but you have root access to the Linux system if you dare.....
------------------------

He conseguido acceso ftp bi-direccional para mi WIFISD.

Busybox es una librería condensada de comandos Linux creada para entornos minúsculos, parecido a Exdos en nuestro EP, y dentro de él hay suficientes utilidades para hacer funcionar casi cualquier tarea que te imagines. He buscado por la red información sobre como montar un ftp, y, en la página oficial el creador nos da dos caminos, pero yo he optado por el mas fácil. La única pega es que se puede acceder a la zona que no es SD, que no está formateada en FAT32, y por lo tanto puedes perjudicar "algo" el sistema Linux si escribes allí.

Por ahora solo conozco el comando directo Telnet, algo como "/sbin/busybox tcpsvd -vE 192.168.11.254 21 /sbin/busybox ftpd -w /mnt/sd", pero el mismo no funciona dentro del script autorun.sh, segúramente causado por una ruta de acceso erronea.

Si consigo el comando exacto para la cosa ftp entonces será accesible para cualquiera que ponga en el directorio raiz de la tarjeta SD el script custom  + Busybox.


El fichero adjunto muestra el ftp funcionando. Observa la ruta de la parte de la derecha. "sd" es el espacio de almacenamiento montado(mnt), pero tienes acceso root al sistema Linux si te atreves....
« Last Edit: 2014.March.23. 23:39:03 by gflorez »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14779
  • Country: hu
    • http://enterprise.iko.hu/
Re: SD card interface
« Reply #114 on: 2014.March.24. 09:44:08 »
Quote from: Saint
The board layout is more or less finished now,
I miss the 5V power parts :oops:
It is will be stand vertical?

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: SD card interface
« Reply #115 on: 2014.March.24. 10:27:32 »
I miss the 5V power parts :oops:
It is will be stand vertical?

It's a split 5v and 3.3v design, both with 250ma max (U5 an U6). Should be enough for a second SPI device.

This board will stand vertically, yes. I was thinking I might extend the bottom of the pcb so it's inline with the bottom of the Enterprise to give some support. One thing I don't like about the vertical design is you can put a lot of leverage on the pcb edge if you knock the board. Although the board isn't very tall...

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: SD card interface
« Reply #116 on: 2014.March.25. 15:33:22 »
Zozo -- do you have any source code for an EXOS extension? I would like to try and start looking at writing code to test the SD card adapter. I would like to be able to write to a FLASH ROM and plug it into the board and be able to do something like:

:TEST

and get some results printed out on the screen, a bit like a DOS program would.

Any help on how to do this, much appreciated. I've just ordered the components I need, so once I've double checked those on the PCB layout I'll order some PCB's, then its onto the software side.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14779
  • Country: hu
    • http://enterprise.iko.hu/
Re: SD card interface
« Reply #117 on: 2014.March.25. 16:35:14 »
Try it :-) (Use Programmer’s Notepad for edit. In Windows Notepad the tabs looks crazy :oops: )

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
Re: SD card interface
« Reply #118 on: 2014.March.25. 18:09:38 »
Thank you Zozo, perfect as always... :)

Offline gflorez

  • EP addict
  • *
  • Posts: 3615
  • Country: es
    • Támogató Támogató
Re: SD card interface
« Reply #119 on: 2014.March.25. 19:50:32 »
I've realised what was wrong with the ftp command. With "tcpsvd -vE 192.168.11.254 21  ftpd -w /mnt/sd" I was setting a FTP that can only connect with that IP(itself!). On the other side if I set it as 0.0.0.0 the card is listening for all accessing IPs...  

Now, for everybody that is anxious to test it.......only put that little script on the root of your new Transcend WIFISD as it jumps out of the box....

Not so easy, previously you must extract securely the card and reinsert it, as the changes only will be efective until next boot of the WIFISD.

Then you must connect to it by WIFI (Domain:WIFISD Password:12345678) and then access it by ftp....

You have a FTP client for Firefox here. Once installed and rebooted Firefox, you only have to put ftp://FTP://192.168.11.254 on the URL box, hit return and the browser changes from HTML to FTP view and connects automatically to the card without passwords.

Now you are free to interchange files, delete, rename, etc, between the card and your computer.


-----------------------------
On the other side there are people exploring if this SD card can bring Wifi capabilities to the device where it is connected, imagine downloading something immediately from the WEB to the EP...