hakim-djz has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

Has anyone got knowledge on how to change files on a RaspberryPi by going through a USB connection?

I'm currently trying to do it through an Ethernet to change wi-fi config files by using the scp module, but my future goal is to do it by a USB connection if it's possible.

So I want to basically have my program installed either on the Pi(USB device) or the computer the Pi is being plugged into (Windows, Mac, or Linux). Once the Pi is plugged in, I want the program to auto-run and give the user the options to change the files on the RaspberryPi

If anyone can help with this would be great, thanks to all in advance

  • Comment on Changing files on a RaspberryPi connected via USB

Replies are listed 'Best First'.
Re: Changing files on a RaspberryPi connected via USB
by ww (Archbishop) on Feb 08, 2014 at 21:06 UTC

    And your question's relevance to Perl is.... uh.... um... ah...

    Oh! "not specified.

    So that sorta' makes it hard to answer in the confines of "PerlMonks, the Monastery"

    Perhaps you should direct your question to a pi-oriented-site (mathematics)... or a bakery if it's pie making you're seeking... or just maybe, one of the sites dedicated to RasberryPi.

    But if we are to infer that the "scp module" is a Perl module, as opposed to the python flavor or one of the variants created for Android, perhaps you'd like to read On asking for help and present some code that reflects the current (even if 'failed', perhaps) state of your efforts.

    Come, let us reason together: Spirit of the Monastery

    If you didn't program your executable by toggling in binary, it wasn't really programming!

      Apologies, the question I agree, seems not related to Perl.

      I had been looking at the Device::USB perl module and thought there may have been some similarities since the RaspberryPi would be connected via USB, and was hoping someone out there might have some ideas on how to create a perl script to change the details of a wi-fi config file or other files.

      The code that I had been using with the Net::SCP module for another project, which is similar to what I need, works as:

      copy file from other to my computer

      open file and add or change as needed

      save and copy back to other computer

      I don't have the code for changing the RaspberryPi written yet, but it's just a matter of changing IP addresses and the user & login names of my old program, I can upload that if it helps, but the main issue is making a script to do the above through USB connection. If Perl has any modules out there that could do this

      Or in a more general sense, looking to make a Perl script to manage files on a Linux computer connected through a USB connection.

Re: Changing files on a RaspberryPi connected via USB
by Anonymous Monk on Feb 09, 2014 at 00:18 UTC