I'm using a Linux/KDE system, but with a little work this should work on Windows and OSx.
1 - edit the config file on your flashair care to make it operate in client mode (STA mode in their docs) https://flashair-developers.com/en/docu ... g/#APPMODE . You also need to enter the SSID and passkey for your wireless network. After this, the flashair card connects to your network just like your computer, cell phone, printer, etc. You can send and retrieve files from it from any computer that is on the network.
2 - go into the wireless router's DHCP settings and configure the flashair so it always gets the same ip address. This way, every time you turn you printer on or off or move the SD card, you know that it will be at the same address. 3 - acquire some code that can upload files to the flashair's upload.cgi script. I was originally using curl, but then stumbled on somebody else's code in python that was a bit more robust and offered the "verify after upload" functionality. Mirrored here https://gist.githubusercontent.com/gian ... /upload.py
4 - add a bit of a wrapper/helper script around the python uploader. There is a bit of a race condition involved with the x3g file creation. When Simplify3D executes our upload script, there is no guarantee that the x3g file has been fully written. This led to me uploading only partial files to my sd card. The solution was to check the x3g's filesize every second and wait until it is not changed before starting to upload it. Our wrapper script is also a handy place to store the IP address of the flashair card. This is what my script looks like https://gist.githubusercontent.com/gian ... lashAir.sh
5 - Add our helper script to Simplify3D's additional commands. Go to the 'Edit Process settings'->'Show Advanced'->'Scripts' screen. At the bottom, find the box for additional terminal commands. Here, you can call your upload wrapper script. There are a couple placeholders you can use that get swapped out for the output path and output filename. in my case, I used
Code: Select all
konsole -e sh -c "GCODE='[output_filepath]'; /home/j/3dprinting/uploadToFlashair.sh "${GCODE%.gcode}.x3g" || sleep 10"
6 - test it. If you did everything right, then load up a model, click "prepare to print" and when you "save toolpaths to disk", it will do like it normally did, but it should also call our wrapper script, which waits for the x3g file to be written, and passes that file along with our flashair's ip address to the upload.py script, which uploads the file and then verifies it. If everything works, then you have to add the script command to any of the profiles you use for this printer.
This is a gist with both the upload python code and my wrapper script. https://gist.github.com/giantpune/4642bcac24604ac9edf5