# Easiest way to get a file off of a device?

**URL:** <https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056>\
**Category:** Firmware\
**Tags:** photon2\
**Created:** [January 30, 2025, 2:50pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056 "2025-01-30T14:50:00Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![jettonj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jettonj/32/29510_2.png) [@jettonj](https://community.particle.io/u/jettonj)\
**Post date:** [January 30, 2025, 2:50pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/1 "2025-01-30T14:50:00Z")

</div>

Is there a way to access the P2 filesystem directly? Otherwise I was planning on trying out the binary type publish, but since the size of the file may be larger than the publish limit I'd have to consider working around that. Just wondering if there was a simple way before I dive into trying a few different things.

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [January 30, 2025, 2:52pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/2 "2025-01-30T14:52:11Z")

</div>

Hey, I've read there is no way to access the file system.  
Another option to the one you mention is using a TCP client (unsure if such a library works on a p2).  
Best,

---

<div class="post-metadata">

**Author:** ![jettonj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jettonj/32/29510_2.png) [@jettonj](https://community.particle.io/u/jettonj)\
**Post date:** [January 30, 2025, 2:58pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/3 "2025-01-30T14:58:53Z")

</div>

Got it. Right now I can just log dump the bytes over serial or the binary publish but I was wondering if something more sophisticated could be (easily) achieved using cloud resources. Could I use logic or some other webhook to parse the incoming binary events and combine them into a file?  
Though if the file is large enough it would probably take too long to send as multiple publishes.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [January 30, 2025, 3:10pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/4 "2025-01-30T15:10:53Z")

</div>

Increased publish size and rate limit will be coming in Device OS 6.3.0 as a preview release, possibly next week. You may still have to do recombination if your files are large, but a lot less than before.

---

<div class="post-metadata">

**Author:** ![jettonj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jettonj/32/29510_2.png) [@jettonj](https://community.particle.io/u/jettonj)\
**Post date:** [January 30, 2025, 3:17pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/5 "2025-01-30T15:17:18Z")

</div>

Ooo interesting. Will the rate limit increase only be available on 6.3.0 or will it be released for other versions/platforms?  
And can you tell us what that size limit will be or is that a surprise?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [January 30, 2025, 3:22pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/6 "2025-01-30T15:22:33Z")

</div>

Only 6.3.0 and later.

The event size will be 16384 bytes of binary or text payload. Each 1024 bytes is a data operation, so sending a 2000 byte event is 2 data operations.

Instead of the fixed rate limit, you'll be limited to 32 Kbytes of data in transit. Thus slower cellular devices (LTE Cat M1 for example) will have a lower rate than Ethernet, Wi-Fi, and LTE Cat 1. There's a new API to see if the device can publish a given size if requested right now.

---

<div class="post-metadata">

**Author:** ![gpatt1](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@gpatt1](https://community.particle.io/u/gpatt1)\
**Post date:** [February 1, 2025, 5:39am UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/7 "2025-02-01T05:39:13Z")

</div>

Will larger messages have the 1 second delay between 1,000 byte messages? Such as the 16k message take at least 16 seconds?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [February 1, 2025, 9:14am UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/8 "2025-02-01T09:14:49Z")

</div>

You do not need to delay 1 second between publishes with 6.3.0 and later. The limit is that only 32 Kbytes of data can be in the process of being sent at a time.

Also all publishes are asynchronous, though you can wait for completion to simulate the old behavior if you want to.

---

<div class="post-metadata">

**Author:** ![gpatt1](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@gpatt1](https://community.particle.io/u/gpatt1)\
**Post date:** [February 1, 2025, 6:48pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/9 "2025-02-01T18:48:39Z")

</div>

This is huge for me! Looking forward to it. Thank you team 🎇

---

<div class="post-metadata">

**Author:** ![jettonj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jettonj/32/29510_2.png) [@jettonj](https://community.particle.io/u/jettonj)\
**Post date:** [February 9, 2025, 2:26am UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/10 "2025-02-09T02:26:04Z")

</div>

On 6.3.0 I reduced my publish delay from 1 second to 100 ms, and it still rate limited the publishes after 4. Outside of looking at the commits, is there documentation on the new publishing API? I'm assuming the new limits and data in transit are exclusive to the new API usage.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [February 9, 2025, 9:14am UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/11 "2025-02-09T09:14:02Z")

</div>

The documentation will be out this coming week.

Prior to Device OS 6.3.0, there was a rate limit of approximately 1 publish for second, with greater bursts.

With Device OS 6.3.0 and extended publish, there is a limit of approximately 32 Kbytes of data in transit at a time. It is no longer necessary to wait a specific amount of time.

The `canPublish()` method can be used to check if a publish of a given size would be allowed at the current time. It it returns false, you should wait and check again later after the queued data has been sent.

More specifically, the limit is 32 logical blocks of data, rounded up to 1024 bytes. An event without payload data takes 1 block, 1024 bytes of payload data is still 1 block, 1025 bytes is 2 blocks, and so on. If there are 32 logical data blocks in flight already, canPublish will return false or an attempt to publish without checking will fail.

---

<div class="post-metadata">

**Author:** ![jettonj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jettonj/32/29510_2.png) [@jettonj](https://community.particle.io/u/jettonj)\
**Post date:** [February 10, 2025, 5:04pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/12 "2025-02-10T17:04:37Z")

</div>

Got this working by making my events of type CloudEvent and checking for `canPublish()` before sending, now it sends all of my start up events within 300 ms. Thanks!

```auto
0000038099 [app] INFO: Publishing: ...
0000038159 [app] INFO: Publishing: ...
0000038189 [app] INFO: Publishing: ...
0000038216 [app] INFO: Publishing: ...
0000038246 [app] INFO: Publishing: ...
0000038272 [app] INFO: Publishing: ...
0000038299 [app] INFO: Publishing: ...
0000038353 [app] INFO: Publishing: ...
0000038375 [app] INFO: Publishing: ...

```

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [February 10, 2025, 5:53pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/13 "2025-02-10T17:53:53Z")

</div>

Documentation for features in Device OS 6.3.0 including [Typed and extended publish](https://docs.particle.io/reference/device-os/typed-publish/) (includes examples), [CloudEvent](https://docs.particle.io/reference/device-os/api/cloudevent/) (the most important class for this feature), and [Particle.publish](https://docs.particle.io/reference/device-os/api/publish/particle-publish-cloudevent-publish/) is now available!

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [February 18, 2025, 6:20pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/14 "2025-02-18T18:20:56Z")

</div>

New example code! The [file upload example](https://github.com/rickkas7/file-upload-example) uses large publish in 6.3.0 to split a file on the file system of a device into 16 Kbyte chunks and reassemble it using Logic.

---

<div class="post-metadata">

**Author:** ![embedIT](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@embedIT](https://community.particle.io/u/embedIT)\
**Post date:** [February 21, 2025, 4:41am UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/15 "2025-02-21T04:41:45Z")

</div>

Where can the QSPI flash memory size for the P2 and Photon 2 be found? They are not listed on the following sites:

> **[EventData | Reference](https://docs.particle.io/reference/device-os/api/eventdata/eventdata/)**
>
> Reference manual for the C++ API used by user firmware running on Particle IoT devices

> **[File system | Reference](https://docs.particle.io/reference/device-os/file-system/)**
>
> Documentation for Particle, a platform for connected devices.

Thank you

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [February 21, 2025, 9:08am UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/16 "2025-02-21T09:08:31Z")

</div>

Internal flash file system is 2 MB on every device except the Tracker SoM, which is 4 MB.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)\
**Post date:** [March 23, 2025, 7:09pm UTC](https://community.particle.io/t/easiest-way-to-get-a-file-off-of-a-device/69056/17 "2025-03-23T19:09:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
