SMB Server on Teensy 4.1

Status
Not open for further replies.
I have a Teensy 4.1 connected to custom hardware running an MQTT Client based data acquisition system. It's working really well and its fast.

I'm logging data to the SD card, which again is working perfectly, but the dream would be to get data off the SD card without having to remove it from Teensy.
  • Best option would be to run Samba server code on the Teensy, but I can't find any suggestion on the forum that suitable libraries exist or that its practical on the T4.1.
  • Second best option would be ftp or tftp server code on the Teensy. I have found some but I can't get it to run successfully - tftp client is refused connection.
  • Third best option would be WebServer code on the Teensy. Again, I've found some but couldn't get it working and I'm not sure it would allow me to upload a file to a PC, modify it and download it back onto the Teensy SD card would it?

Initially, I'm just looking for advice on the best practical solution and the best libraries to use with Teensy 4.1.

Thanks
 
Can't you do a file transfer via MQTT? This page suggests it's possible. http://www.steves-internet-guide.com/send-file-mqtt/
As you already have MQTT, this seems to be the easiest?

If you have a USB to a PC, just copy the file to Serial. (or a second USB Serial). Receiving on the PC can be done by a simple powershell script.

The files are likely to be quite large and routing them through an mqtt server based on a Raspberry Pi may take up a lot of bandwidth. It will also require a suitable mqtt client on the receiving PC I think.
The units are likely to be installed in inaccessible places, so USB, isn't ideal.
 
Have you tried this ftp server library:
https://github.com/xreef/SimpleFTPServer
I think that there should be a good chance to get it working on the Teensy (though I didn't try)

I just had a quick attempt at getting this running, but got a shed load of Ethernet errors despite using NativeEthernet.h.

I've just run the fnet_tfpf library and example from GITHUB provided by Manitou48, enabled the tftp command line utility on Windows 10 and that has worked first time. Just got to embed Manitou48's code into mine and I think I'm all set.
Thanks once again for your help
 
Status
Not open for further replies.
Back
Top