Guide me, whether meshtastic library supports sending image, audio and video file?
Unfortunately Lora is too slow for this kind of application.
Does anybody know the max number of bytes you could fit in a meshtastic packet?
depending on the spreading factor, it can be from 51 to 222 bytes
Maybe you could fit most of a second of speech audio in a packet if you’re lucky using Lyra at 3kbps…
I guess this might be out of scope since OP asked for the built in support, but wouldn’t it be fesable to slowly transfer binary data and assemble it on the receiving end?
Not sure if this would be a bit abusive towards some larger public mesh networks.
A very important and valid point.
Any headway on this? I’ve been thinking about writing some sort of middleware to make this happen because, theoretically, it seems feasible.
Image transfer via LoRa is possible and has been done for point to point applications supported on SX126x, SX127x and SX128x.
However, one issue with sending images is that in their standard form, jpg etc, even a single bit error can corrupt the image. So you need to send and ack each packet\part of the image and check the packet is valid as sent. So perhaps not an application for Meshtastic.
Honestly don’t think going to see much traction on this, as already noted bandwidth available to lora communications is quite limited. Not just in the bitrate - bits can transfer a second, but in many countries there are ‘duty cycle’ limitations, meaning a single device can only use a small percentage of time (eg 1% duty cycle, means can only be transmitting for 36 seconds out in any one hour)
I have experimented with transmitting over lora directly, rather than using meshtastic protocol. Can get about 0.1k/second for short periods. But means you only get about 4kb/hour (once factor in duty cycle)! (using EU 868Mhz)
… once you add in meshtastic, that is going to add in extra overhead. so might be even smaller. (although I was using a channel that had lower duty cycle than meshtastic)
… Edit: forget to mention, that yes, one of the reasons for the low bitrate, is a lot of packets get lost or corrupted, and needed to be retransmitted. The exact percentage varies over time.
It depends on the use case and the implementation. With Short Range / Fast, a data transfer of 1,265 bytes per second between two nodes would be possible. The link budget 143dB plus antenna gain reaches 10km with a direct line of sight.
There may be image formats such as SSTV that tolerate a partial loss of packets. With a maximum load of 10%, 445 kilobytes per hour could be transmitted, which should be sufficient for five images in low resolutions.
This could be implemented via the JavaScript API Getting Started with Meshtastic.js | Meshtastic or CLI or a custom app. This may make sense for special applications such as in caves, but not for normal meshnets.
it is possible but not very practical:
you can still send binaries converted to ASCII
using UUencode or similar. Free Usenet Tools - Online UUEncoder and UUDecoder. usenet newsgroups binaries. Free Web interface for UUencode and UUdecode.
so, technically its possible, splitting a file and sending in multiple messages… will take some time…
New to the Meshtastic system, but have been studying up and have been wondering about voice transmitting with Meshtastic. Is there hardware beefy enough to handle voice running Meshtastic? With the understanding that there might have to be changes in the Meshtastic program to support it as well.
Maybe very short audio clips would work, but unlikly to get realtime bi-directional voice, for the reasons mentioned above.
Maybe lora on the 2.4Ghz band would work for voice. The range of devices working on 2.4Ghz is (as I understand it) much more restricted, than 433Mhz, 868Mhz and 915Mhz frequencies. Most meshtastic is at these lower frequences.
You can probably go a bit further than that, if there really is line of sight to get around the Earth curvature with no fresnel zone issues.
I once received packets with 13,700bps LoRa at 105km, simple omnis antennas, high altitude balloon to ground. That was at SF7, BW500Khz, CR4:8, 7dBm.
Even Semtech were surprised …
However, of course in practical applications, for handheld type nodes, you wont get anything like those distances, maybe for pratical applications reduce distances to 1/1000th of that for an urban area.
If you compress images to e.g. 8kb with https://play.google.com/store/apps/details?id=com.psoffritti.compress.image it could be possible to transfer this with lora in minutes.
Point to point maybe, and probably more than minutes.
If there are no packet errors, at the Meshtastic SRFast rate of SF7, BW250Khz, CR4:5 a JPG of 320x240 (circa 10kbyte) transferred using LoRa point to point will transfer in around 9.7 seconds, which is an average air rate of just under 8kbps.
If you had to deal with significant number of packet errors or lost packets then obviously the transfer could slow right down.
There are always packet errors
The transfer of (very compressed) images could increase the usefulness of Meshtastic.
It would be conceivable to extend the protocol for binary files up to 16 kilobytes, for example, by sending a maximum of 64 parts or 6 bits in succession in the protocol.
The transfer speed is based on the channel utalization. At high utilization, the parts are sent at greater intervals. A higher transfer rate would be possible with low utilization.
There are certainly applications where images or ZIP files could be used sensibly. Firmware updates could also be sent in this way, even if this would take several days.