Welcome to Our Community

Some features disabled for guests. Register Today.

What is everyone using to send GCode

Discussion in 'Controller Boards' started by Ronald4418, Jan 20, 2021.

  1. Ronald4418

    Ronald4418 Well-Known
    Builder

    Joined:
    Nov 4, 2015
    Messages:
    218
    Likes Received:
    33
    What is everyone using to send their freshly created GCode from one computer to another? I am using a Windows 10 Desktop with VCarve, Fusion 360 and SolidWorks to create my files with. But I'm trying to find a way other that using a Zip Drive to send files from one system to the other. By using Angry Ip, I can see with system that is running my Openbuilds Controller. Just can't figure out how to send it from one system to the other. Other then sending it as an email attachment.
     
  2. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,036
    Likes Received:
    1,433
    I'm using dropbox. Just post my code to my local dropbox folder, then its available at both of my machines.
     
  3. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    Dropbox folder. Still have to USB sneakernet over to the Linux controller(s) until I figure out a cross-platform local shared drive system, but works great for the laser that's on the Windows PC down there.
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
    If you are on CONTROL v1.0.275 and up :

    Open a browser to http://ip-address:3000/upload

    Where ip-address = the IP of the computer running OpenBuildsCONTROL
     
    sharmstr likes this.
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
  6. Ronald4418

    Ronald4418 Well-Known
    Builder

    Joined:
    Nov 4, 2015
    Messages:
    218
    Likes Received:
    33
    Never heard of sneakernet and I have been using a computer since 1980. I'll have to look that one up as I am using a Raspberry Pi 400 to run my OpenBuilds Controller.

    I'll give that a try, thanks.

    I'll definitely give it a shot. Thanks.

    [merged seperate posts - by moderator]
     
    #6 Ronald4418, Jan 20, 2021
    Last edited by a moderator: Jan 20, 2021
  7. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    That looks like exactly the sort of thing I was hoping for. Thanks!

    Ye olde hacker turn of phrase, mostly used ironically now. Just means non-networked physical transfer.
     
    Ronald4418 likes this.
  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
    David the swarfer and sharmstr like this.
  9. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,283
    Likes Received:
    1,836
    I have everything on the household network so I just transfer through the network.
    I could do it directly to OBCONTROL, you can use the web interface as Peter suggests or you can use a direct http POST operation which is a bit more complicated to set up but works fine (that is how the transfer button in the SketchUcam toolbar works, that is a Ruby script if you want to hack it.).

    My GUI is bCNC which runs on a XUbuntu linux so I use the pscp secure copy program that comes with Putty, you could use the 'scp' built into Windows 10 as well. (this will work with your RPi 400)
    The critical parts are
    1. the target computer must have a fixed IP address, I set this in my DHCP service in my networkrouter but you can also just set it manually on the PC itself. This is so your copy process can find it everytime.
    2. the authorization key needs to be transferred to enable passwordless transfers. Basics are: generate a key pair with putty's keygen, then put the public key onto the target computer.
    3. Have php installed so it can process command line scripts (many other script languages could be used), and php.exe must be in the environment path.
    In my folder where I save all .nc files are 2 scripts, send.bat which starts up the send.php with php and the correct parameters.

    send.bat
    Code:
    @php send.php 192.168.1.111 %1
    
    which starts php with send.php, the IP address of the controller, and then any parameter I give to send.bat.
    The parameter can be left off, in which case send.php sends the 5 most recent .nc files.
    Or the parameter can be a wildcard like 'spiral*.nc' which will transfer all the spiral.... files, even if more than 5.
    The IP address is given here so I can have mutiple send.bat files, one for each machine that I might use as a controller.
    I have the regular i7 laptop but also a Rpi4 for testing and backup purposes, the i7 is about 8 years old now and one never knows when it will die, so there is a backup RPi4 (and an RPi3 that could be deployed in 20 minutes, backups of backups are always good and never a waste of time).

    send.php
    Code:
    <?php
    // if there is a parameter use it as a wildcard and transfer all files found
    if ($argc > 2)
       {
       $wild = $argv[2];
       $num = -1;
       }
    else
       {
       // if no param, find all .nc and send newest 5 only
       $wild = '*.nc';   
       $num = 5;
       }
    $ip = $argv[1];   
    
    $files = array();
    exec("dir /b /od $wild", $files);
    $cnt = count($files);
    if ($num == -1)
       $num = count($files);
    
    print "Sending most recent $num files\n";
    $st  = $cnt >= $num ? $cnt - $num : 0;
    for($i = $st; $i < $cnt; $i++)
       {
       $file = $files[$i];
       print $i . $file;
       $cmd = "pscp -i c:\path\to\putty\puttyprivatekeyfile.ppk $file remoteusername@$ip:/home/remoteusername/Desktop/CNC/";
       system($cmd) . "\n";
       }
    ?>
    
    you would have to change
    • c:\path\to\putty\puttyprivatekeyfile.ppk to point to your actual key file
    • remoteusername to the actual username on the remote machine. (both instances)
    A very similar set of scripts inhabits my Linux desktop computer (I have had to migrate most stuff to a Win10 box for working-from-home-due-to-covid), so it does not matter where I generate Gcode, I can push it directly to my controller (which is just across the room, but could be anywhere on the local network).
     
  10. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,283
    Likes Received:
    1,836
    One could also use something like Filezilla to do a direct ftp or sftp connection to the Pi400. This is the huge benefit of Linux based computers, talking to them via a network is easy and standardized and it has taken Windows some >10 versions to get built in ssh and scp commands, and setting up an ftp service is a nightmare though 'homegroup' sharing could be used if you can get it to work.
     
  11. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,921
    Likes Received:
    1,619
    If you are a Microsoft windows 10 user, you have the OneDrive on your computer. I create a project from the comfort of my laptop and reclining sofa then save it to my OneDrive. I then open it on my laptop in the shop that is connected to my CNC machine. You need to set up your computers so they sync via the OneDrive. It is so much easier than carrying out an SD card or thumb drive.
    upload_2021-1-23_22-14-54.png
     
    sharmstr and Peter Van Der Walt like this.
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,283
    Likes Received:
    1,836
    while Cloud services are fine for many things, here in Africa I will have to wait 10 to 20 minutes for the upload and download. But things are looking up, Herotal came past the other day asking my permission to put a FTTH pole in my back yard.
     
    sharmstr likes this.
  13. Corey Corbin

    Corey Corbin Well-Known
    Builder

    Joined:
    Feb 27, 2016
    Messages:
    135
    Likes Received:
    62
    I email it to my self. Then access my email on other computer.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice