I have a somewhat different need but also using FTP to interact between my
Linux laptop and my Kindle Fire to manage PDFs I need to read.

The following are some samples, I hope they will help you:

1)
   curl ftp://192.168.0.165:3721/Documents/ --ftp-create-dirs

    curl has various options you can execute on the remote FTP site

2)
    wput -u  mydocs/* ftp://[email protected]:3721/Documents/

     Just like curl, wput also has options you can interact with the remote
FTP site


3)
  Using HERE document mechanism:

  lftp -u Anonymous,pass 192.168.0.165:3721 << EOF
rm  -r Documents/Folder
EOF


On Sat, Oct 15, 2022 at 1:21 PM Chuck Hast <[email protected]> wrote:

> Folks,
> I have some WiFi devices that I am loading code into to convert
> them to something called AREDN, Amateur Radio Emergency
> Data Network. Most of them use tftp to upload the new image
> into the device. After doing several of them I tried to figure out
> how to write a small script to do the tftp uploads. The steps are
> as follows
> kp4djt@kp4djt64:~$ tftp 192.168.1.1
> tftp> bin    (set binary transfer)
> tftp> trace on   (set trace on)
> Packet tracing on.    (response)
> tftp> put /tftp/file.bin   (file to send to device)
>
> At this point it will either start showing blocks being
> sent or will time out
> I would like to write a script that just runs that, I would
> have 2 versions one for devices which default to 192.168.1.1
> and those who use .1.20, then it runs and all I have to do
> is either edit it and put the upload file in or have it stop
> and I paste/type the file name in and turn it loose.
>
> Of course as soon as you invoke tftp it jumps into it's own
> interface, I googled for writing scripts to control tftp, I saw
> some that embed it in a bash script but appears that you
> i have to make the tftp entries by hand with those scripts.
>
> Anyone have any idea of how to write a script to invoke
> tftp and insert commands to tftp?
>
>
>
> --
>
> Chuck Hast  -- KP4DJT --
> I can do all things through Christ which strengtheneth me.
> Ph 4:13 KJV
> Todo lo puedo en Cristo que me fortalece.
> Fil 4:13 RVR1960
>

Reply via email to