Sending arbitrary files to a master
Auser
Posts: 506
Hi all,
I'm trying to figure out whether it's possible to send a text file to a master via a serial link using NetLinx Studio, File Transfer or other software.
Obviously it's possible to do so using ftp, but I'm trying to figure out a way to send all files I need using a serial cable so that the person who's on site commissioning the system doesn't have to be able to communicate with the master via IP. In addition to the usual .tkn, .tp4, .irl, etc. files, I need to be able to upload a text file or two to the master but can't find any way to do this with NS2/FT2. Any ideas?
Many thanks
I'm trying to figure out whether it's possible to send a text file to a master via a serial link using NetLinx Studio, File Transfer or other software.
Obviously it's possible to do so using ftp, but I'm trying to figure out a way to send all files I need using a serial cable so that the person who's on site commissioning the system doesn't have to be able to communicate with the master via IP. In addition to the usual .tkn, .tp4, .irl, etc. files, I need to be able to upload a text file or two to the master but can't find any way to do this with NS2/FT2. Any ideas?
Many thanks
0
Comments
A quick experiment shows that the text buffer has a limit of quite a lot.
The way I envisage it working is sending the necessary files to the person commissioning the system and getting them to run a batch file. The batch file will use FileTransfer to transfer the touch panel, keypad, IR, etc. files followed by the .tkn file via the program port. Once the master has rebooted and is back up and running, the batch file will fire a small utility which will put the program port into pass mode to a predefined virtual device and send the text files to the master via a module watching string events on that virtual device. Should be fairly easy.
When you download an irl file, those files show up in the root directory, I don't know if the master checks if it's a valid irl file or not before it places it there though. Then you would change the filename you're trying to read in code from filename.txt to filename.irl
Actually I gues the file gets renamed so you'd need an empty ir port to upload the file to and then need to figure out the renaming scheme.
Similar scenario for the serial port method, I'd rather leave all the serial ports available for dealing with real devices in all systems. It would be possible to have a module watching for certain comms on any or all serial ports normally used by projectors, etc., but then the NetLinx has to parse incoming data on the port twice, once by the device module and once by the module waiting for control/file transfer type comms. Also, who knows what arcane baud rate, parity, etc. setting the physical device plugged into that port may be using. It's preferable that the guy in the field can plug in a single cable and send all the required files without having to reconfigure anything.
I've implemented the solution which I described above which seems to work quite well in the absence of anything more elegant. I'm going to include that module in all systems and add other functionality to it as I feel the need - like being able to copy, list and retrieve files from the control system and 'do_push(d: p:s,channel,time)'. At the moment the file transfer functionality is pretty rudimentary and doesn't include any error checking, but I'll implement a superset of the TFTP protocol or similar as and when I find the time.
I may run into hassles with this as USB program ports are starting to appear on NetLinx controllers, but hopefully the good folks at AMX were helpful enough to implement the USB connection as a virtual COM port so that we'll still have a terminal interface available when the Telnet and SSH ports are locked down on the device.
Thanks for the ideas.