0

I want to get the directory list of FlashAir which is connected to a android device over wifi, and i need to download the selected files.

Here is the networking specification of the device

  1. Supported protocol - TCP/IP (IPv4)
  2. Server functionality - HTTP Server, DHCP Server
  3. Client functionality - HTTP, DHCP, DNS, NETBIOS

What protocol can be used to get the directory list and how?

Raneez Ahmed
  • 3,808
  • 3
  • 35
  • 58

2 Answers2

1

The only protocol in the list which is able to transfer files is http. However, the http server must be configured to allow for directory listings. Also, of course, the file system subtree which can be browsed will be limited to the structure below the http server's "root" directory.

class stacker
  • 5,357
  • 2
  • 32
  • 65
  • the device gives a html page with the directory list when opened in a browser and it's possible to get it by parsing the html page. but i dont think it's a good method as the page source may change on firmware update. Is there any other ways to get the directory list using http protocol? – Raneez Ahmed Feb 05 '13 at 13:14
  • @Reneez No. -- Does the device really not support TFTP or FTP? -- Anyway, you can sanitize the HTML into XHTML and apply XSLT, which would most likely allow you to hook into the file info in a relatively design-independent fashion. – class stacker Feb 05 '13 at 13:42
  • Is it possible to run any scripts using http to generate the directory list? – Raneez Ahmed Feb 06 '13 at 10:52
  • @Reneez I'd never choose `grep`. If I have enough resources on the Android, I'll transform it into XHTML and find all relevant information using XSLT. `grep` is much too insecure in the sense that I'd feel I couldn't specify the grep context the way I'd want it to describe -- if you need a hook in the HTML hierarchy, you're simply lost with grep's regular expressions. – class stacker Feb 06 '13 at 12:27
1

Here is a tutorial that shows you how to write a quick app that will allow you to get a directory list of FlashAir contents as well as download image files (or with some tweaking, any files) from the FlashAir:

https://flashair-developers.com/en/documents/tutorials/android/3/

anothercoder
  • 1,449
  • 12
  • 16