I need to transfer an application data file to the raspberry pi, may be a couple times a day. The file size is around 20mb. I am considering the following options:
break down the file in small chunks and transfer the data using MQTT
use HTTP to post the file to the pi
does balena provide any file transfer services that I can use
I am new to IOT, which way is the prefer way? I can see with the MQTT approach, i need to resemble the file from the MQTT messages and the HTTP approach I need to run a http server on the pi.
In this way you won’t have to run additional services in your container, but you can directly copy/scp the contents to the desired location. Will such a solution work for you?
@pli yes you can put the file in that location if you’d like to access it from a container. You’re right in that you can’t bind other directories on the host OS but you can add files to named volumes in the way you’re proposing.
Thanks for the reply. I have two questions about using the balena tunneling
balena login --credentials --email --password
balena tunnel <device’s uuid> -p 22222:4321
[Info] Tunnel to <device’s uuid>
? Select a device
[Info] - tunnelling localhost:4321 to <device’s uuid>
[Info] Waiting for connections…
First question is even if I specify the device’s uuid in the balena tunnel command, it still prompts me to confirm the device from a list of my devices. Is there a way to disable the prompt? If not, I can do “echo | balena tunnel …” to automate the selection.
Second question is the balena tunnel command is hung at “Waiting for connections…”. Any idea why it is hanging? I am running the development os on the pi.
When you say it is hanging at “Waiting for connections”, do you mean it doesn’t work then? Or it works, but still hangs? Could you confirm the version of your CLI (balena version), and your computer’s operating system? (Windows, macOS, Linux)
So the “hanging” terminal serves two purposes: it is where log / error messages are printed, and it serves as a “foreground process” (or a “visible process”) responsible for keeping the tunnel open. An alternative would be a “detached” or “background” process, that created a running service behind the scenes and logged messages to a file. That’s not how it’s currently implemented, but if could raise it as a feature request in the balena-cli repo if you think there is a use case for it.
Hi @pli, I’d like to let you know that we fixed the bug with balena tunnel offering selection menu despite a UUID being specified in the first place. Paulo (my teammate maintaining balena CLI) notes that this is fixed for version 11.3.4+.
Thank you for reporting the bug. And on another note, I hope that you are able to transfer files fine.