# File Transfer via WiFi

**URL:** <https://forum.snapmaker.com/t/file-transfer-via-wifi/5270>\
**Category:** Snapmaker 2.0 (3-in-1)\
**Created:** [February 14, 2020, 9:52am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270 "2020-02-14T09:52:27Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![scyto](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/scyto/32/13938_2.png) [@scyto](https://forum.snapmaker.com/u/scyto)\
**Post date:** [July 15, 2021, 6:02pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/61 "2021-07-15T18:02:22Z")

</div>

This does happen from time to time. I was unable to transfer files for the first week (i have had my machine for 6 weeks), more reliable now.

1. if the file doesn’t send restart luban (note wait about a minute from when you close the visible window, seems to take a while for all processes to quiesce)
2. make sure you are on latest firmware and luban versions.
3. power off printer for at least 15 seconds if the above doesnt work and make sure to do 1 if you if you do this.

I now don’t get asked on the touchscreen very often and when luban fails to send i just restart it.

---

<div class="post-metadata">

**Author:** ![CestLaGalere](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/cestlagalere/32/14062_2.png) [@CestLaGalere](https://forum.snapmaker.com/u/CestLaGalere)\
**Post date:** [July 16, 2021, 8:54am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/62 "2021-07-16T08:54:08Z")

</div>

I did find by going through the menu on the touchscreen I could get the connect question up, but I have not yet found a consistent way. I have read somewhere else a request to bea ble to permanently enable the connect, let’s hope this appears.

---

<div class="post-metadata">

**Author:** ![BrianS](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/brians/32/16625_2.png) [@BrianS](https://forum.snapmaker.com/u/BrianS)\
**Post date:** [December 28, 2022, 4:13pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/63 "2022-12-28T16:13:19Z")

</div>

To re-adjust Z offset after a calibration, G1029 D x.xx where x.xx is how far you want the nozzle to go, negative down, positive up. Remains until your next calibration. You can adjust as much as you like, but has to be under 1mm at a time

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [January 10, 2023, 2:05pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/64 "2023-01-10T14:05:35Z")

</div>

I’ve released a command line tool that you can easily use to find devices and upload your gcode as well as .nc, .bin (yes you can upload the firmware bin)

I’m also adding feature to support J1 & Artisan.

> **[GitHub - macdylan/sm2uploader: A command-line tool for send the gcode file to...](https://github.com/macdylan/sm2uploader/)**
>
> A command-line tool for send the gcode file to Snapmaker 2 via WiFi connection. - GitHub - macdylan/sm2uploader: A command-line tool for send the gcode file to Snapmaker 2 via WiFi connection.

---

<div class="post-metadata">

**Author:** ![chrisfox](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@chrisfox](https://forum.snapmaker.com/u/chrisfox)\
**Post date:** [May 18, 2023, 6:38pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/65 "2023-05-18T18:38:05Z")

</div>

Thank you, very cool. I always have to authorize on Snapmaker display. What do I do wrong.  
This is my command line from the automator  
‘/Users/fuchschr/Library/CloudStorage/Dropbox/3D Druck/Snapmaker\_tools/sm2uploader-darwin-arm64/sm2uploader-darwin-arm64’ -host 10.0.0.113 ‘/Users/fuchschr/Library/CloudStorage/Dropbox/3D Druck/Projekte/Spielzeug/Elsa Stencil/aaX\_Elsa\_0.2mm\_PLA\_A350\_5h9m.gcode’

It is send but I have to go to the printer.

Thanks for your help.  
Christian

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [May 19, 2023, 1:15am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/66 "2023-05-19T01:15:38Z")

</div>

> [@chrisfox](#):
>
> /Users/fuchschr/Library/CloudStorage/Dropbox/3D Druck/Snapmaker\_tools/sm2uploader-darwin-arm64/

Check hosts.yaml file is generated in this directory, and if not, move the sm2uploader to a writable directory.

hosts.yaml will save the necessary data such as ip and tokens.

---

<div class="post-metadata">

**Author:** ![nweolu](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/nweolu/32/23079_2.png) [@nweolu](https://forum.snapmaker.com/u/nweolu)\
**Post date:** [May 19, 2023, 1:38am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/67 "2023-05-19T01:38:42Z")

</div>

Could you please post an example of hosts.yaml. Discovery doesn’t work for some reason, I would add the printer to hosts manually.

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [May 19, 2023, 1:55am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/68 "2023-05-19T01:55:20Z")

</div>

You can use `-host ip` even without hosts.yaml file connect directly to the dest printer.

Here’s an example hosts.yaml

```auto
printers:
    - ip: 192.168.1.11
      id: A350
      model: Snapmaker 2 Model A350
      token: 593de41d-1111-2222-3333-f37412390f5c9
      sacp: false
    - ip: 192.168.1.22
      id: J1
      model: Snapmaker J1
      token: ""
      sacp: true

```

---

<div class="post-metadata">

**Author:** ![chrisfox](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@chrisfox](https://forum.snapmaker.com/u/chrisfox)\
**Post date:** [May 19, 2023, 8:15am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/69 "2023-05-19T08:15:07Z")

</div>

Thank you, folder has everyone Read/Write. What has to be in the host.yaml?

---

<div class="post-metadata">

**Author:** ![nweolu](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/nweolu/32/23079_2.png) [@nweolu](https://forum.snapmaker.com/u/nweolu)\
**Post date:** [May 21, 2023, 4:11pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/70 "2023-05-21T16:11:37Z")

</div>

That did it, with one caveat.  
When running

```auto
 sm2uploader -octoprint :8833 -host A350

```

I got error:

```auto
listen tcp :8833: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

```

Turns out on Windows 10 there is a reserved range of ports you can check with command

```auto
netsh interface ipv4 show excludedportrange protocol=tcp

```

```auto
Protocol tcp Port Exclusion Ranges

Start Port End Port
---------- --------
      5357 5357
      8435 8534
      8535 8634
      8635 8734
      8735 8834
      8835 8934
      8935 9034
     50000 50059 *

* - Administered port exclusions.

```

8844 or 8833 within the range so I had to use 6633 - that did it.

```auto
sm2uploader -octoprint :6633 -host A350
2023/05/21 12:01:04 Found printer in ~~\Utils\hosts.yaml
2023/05/21 12:01:04 Printer IP: 192.168.1.55
2023/05/21 12:01:04 Printer Model: Snapmaker 2 Model A350
2023/05/21 12:01:04 Starting OctoPrint server on :6633 ...
2023/05/21 12:01:04 Server started, now you can upload files to http://[::]:6633
2023/05/21 12:05:42 Request GET /api/version completed in 0s

```

Thank you @macdylan for the tool. I’ve added it to the [GitHub - shurushetr/awesome-snapmaker: Curated list of things that help you make something awesome with Snapmaker machines.](https://github.com/shurushetr/awesome-snapmaker)

---

<div class="post-metadata">

**Author:** ![nweolu](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/nweolu/32/23079_2.png) [@nweolu](https://forum.snapmaker.com/u/nweolu)\
**Post date:** [May 22, 2023, 2:38pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/71 "2023-05-22T14:38:48Z")

</div>

@macdylan, have you thought of implementing

```auto
api/v1/prepare_print
api/v1/start_print

```

In a way that would enable the Upload & Print button in prusa?

![image](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/3/f/3f6a9816814c939b812f77824ecbac5c3495f97b.png)

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [May 24, 2023, 8:13am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/72 "2023-05-24T08:13:56Z")

</div>

In sm printers, If you want to start print through the API, you must use the online printing APIs, but online printing need a heartbeat connection, if lost it will automatically pause.

This is dangerous because normally I exit PS after I’ve finished slicing.

---

<div class="post-metadata">

**Author:** ![nweolu](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/nweolu/32/23079_2.png) [@nweolu](https://forum.snapmaker.com/u/nweolu)\
**Post date:** [May 24, 2023, 12:37pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/73 "2023-05-24T12:37:24Z")

</div>

Interesting, In my case machine displays a message

> The machine has lost its connection with Luban. Only when you tap Stop the current job will be terminated.

I first noticed it with Lightburn sending files over wifi with api calls for laser jobs. And now just checked it with Luban for 3DP.  
Machine will finish the job tho, unless you press stop button.

> **Pic of the message**
>
> ![image](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/6/9/699f42072a8dc6c0e8a09e5bf3f4414eb212a415.jpeg)

> **M1005 firmware virsions**
>
> M1005  
> Marlin SM2-4.5.34  
> Compiled: Mar 9 2023, 17:08:07  
> PACKAGE: Snapmaker\_V4.5.34  
> Module Ver:  
> Module 0x00C250C8: v1.13.12  
> Module 0x00C82A8A: v1.13.12  
> Module 0x00022D90: v1.13.12  
> Module 0x00C82A96: v1.13.12  
> Module 0x00C2520A: v1.13.12  
> Module 0x00C82A98: v1.13.12

We loose the status update on the touchscreen

On the other hand, I assumed Octoprint would be responsible for heartbeat connection not PS.  
I guess I have to ask how do you run the sm2uploader in connection with PS, do they start and stop at the same time when you start and stop PS?

---

<div class="post-metadata">

**Author:** ![Skreelink](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/skreelink/32/16398_2.png) [@Skreelink](https://forum.snapmaker.com/u/Skreelink)\
**Post date:** [May 24, 2023, 12:49pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/74 "2023-05-24T12:49:08Z")

</div>

The way the snapmaker works if you use the API, is it fully uploads the gcode to a temporary storage on the controller. Then when the `start_print` API is called, it begins feeding that file into the motion system to begin printing.

The heartbeat (which is just a status call every second or so) is only required to keep the machine in a ‘connected’ state and the live updates in Luban. If you disconnect, it will keep going just fine, just don’t press the stop button on the touchscreen. You can reconnect Luban later to check the status as well.

I personally use my drag/drop files to run files, simply export the gcode, drag it ontop of the batch file, and it automatically uploads it to the snapmaker and starts it. Funfact; you can actually retrieve the files uploaded in this manner from the controller using the `print_file` API.

> [@nweolu](#):
>
> On the other hand, I assumed Octoprint would be responsible for heartbeat connection not PS.

There’s no heartbeat connection with Octoprint, it’s simply feeding the gcode directly via serial. Octoprint would likely be the best option to integrate with prusaslicer’s upload/start option.

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [May 24, 2023, 1:31pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/75 "2023-05-24T13:31:04Z")

</div>

> [@Skreelink](#):
>
> Octoprint would likely be the best option to integrate with prusaslicer’s upload/start option.

Unfortunately, Octoprint doesn’t work well with J1, causing the printer’s touchscreen to become unresponsive. Also, I don’t want the touchscreen of any sm printers to lose its function and it won’t work properly when operated through Octoprint.

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [May 24, 2023, 1:38pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/76 "2023-05-24T13:38:24Z")

</div>

> [@nweolu](#):
>
> Machine will finish the job tho, unless you press stop button.

You’re right, that prompt is very very stupid 💩 💩, you can’t go back to the previous screen until the work is done.

---

<div class="post-metadata">

**Author:** ![nweolu](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/nweolu/32/23079_2.png) [@nweolu](https://forum.snapmaker.com/u/nweolu)\
**Post date:** [May 24, 2023, 1:42pm UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/77 "2023-05-24T13:42:03Z")

</div>

Riskey shared the submit ticket link here ([Discussion of Snapmaker 2.0 Firmware Updates - #685 by Riskey](https://forum.snapmaker.com/t/discussion-of-snapmaker-2-0-firmware-updates/5441/685)). I’ll go ahead and submit a ticket for this (add button to return to standalone mode on touchscreen), just to see what will happen.

---

<div class="post-metadata">

**Author:** ![nweolu](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/nweolu/32/23079_2.png) [@nweolu](https://forum.snapmaker.com/u/nweolu)\
**Post date:** [June 24, 2023, 9:21am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/78 "2023-06-24T09:21:54Z")

</div>

![Screenshot_20230624_052130_Gmail](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/a/f/af515cdb206198900016af80bf41f33bed3e4343.jpeg)

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [June 25, 2023, 6:27am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/79 "2023-06-25T06:27:40Z")

</div>

Starting from [v1.8 sm2up](https://github.com/macdylan/sm2uploader/releases) and [smfix](https://github.com/macdylan/SMFix/releases) will work together, which means there is no need to set up post-processing script in the slicer anymore. Simply put sm2up and smfix in the same directory, and they will automatically work together 🎉

---

<div class="post-metadata">

**Author:** ![macdylan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/macdylan/32/18460_2.png) [@macdylan](https://forum.snapmaker.com/u/macdylan)\
**Post date:** [July 11, 2023, 8:23am UTC](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270/80 "2023-07-11T08:23:02Z")

</div>

[sm2uploader v2.0](https://github.com/macdylan/sm2uploader/releases)

- Integrated the SMFix, no longer need to download it. Now you can remove `smfix` in the post-processing scripts in the slicer. use `-fix=0` to disable this feature.
- Improve discover, working on all net interfaces.

[Previous page](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270.md?page=3)

[Next page](https://forum.snapmaker.com/t/file-transfer-via-wifi/5270.md?page=5)
