Anyone used the USB-A port with a USB Memory Stick ?

Discussion in 'C-Bus Automation Controllers' started by impact, Apr 9, 2019.

  1. impact

    impact

    Joined:
    Feb 10, 2008
    Messages:
    117
    Likes Received:
    13
    So continuing on with my need to show a web page on the screen for the user to see data... Originating from a web page but needing to reformat it - ie. Radar from BOM, Breaking news from a website... etc... See https://www.cbusforums.com/threads/lua-help-maybe-or-something-else.9474/

    One of the ideas I had was to write a script to manipulate some files, to build my own web page and have that displayed to the user... So why not use the USB-A port with a memory stick (hint - its the port on the top of the 5500SHAC - dont think you need to plug a usb stick into the front USB-B Port (square plug) - as I stupidly tried that after finding all the adapters to do it!! It didn't work - LOL - and that's when the brain kicked in - noticing the USB port on the top right - doh!)

    So I can successfully mount the USB Stick... I can unmount it, I can even write files to it, and read files to it - so my concept of writing a script to manipulate data seems to be a way of doing it - stupidly inefficient... but at least all self contained within the SHAC.

    However - it appears that the mounted drive is not visible to the outside world... Lets say that the usb drive has a file Sample.html - I was hoping to create a screen with a frame pointing to 192.168.x.x to display the continually updated file generated from the script that was running...

    So from a browser - I would be wanting to read / see / load the Sample.html file that is being created - I have tried;
    //192.168.x.x/mnt/Sample.html
    //192.168.x.x/Sample.html
    //192.168.x.x/dev/Sample.html
    //192.168.x.x/dev/mnt/Sample.html
    //192.168.x.x/dev/sdb1/mnt/Sample.html
    and a few other 'guesses' - but each time I get a 404 Error....

    Anyone tried something similar - what other ideas are there....

    I followed the code in the documentation where the essential but to mount the drive was res, stat = io.readproc('mount /dev/' .. part .. ' /mnt 2>&1')
    which is really the command mount /dev/sdb1 /mnt 2>&1

    what that 2>&1 does - well google has been unable to help me!!!
     
    impact, Apr 9, 2019
    #1
  2. impact

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    This just redirects stderr to stdout. i.e. Sends any errors to the standard output.

    Aside from this, what you are trying to do is just not possible. There is no supported way of accessing a USB device directly via HTTP in Linux. If you hunt around you could probably find some hack to do it, but whether you could install that on the SHAC is doubtful.

    The supported way to do this is via a server running on the SHAC, but you would have to use a different port to the standard 80.
     
    Ashley, Apr 9, 2019
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.