This is an old revision of the document!
sudo apt update sudo apt install libfuse3-4 fuse3 libusb-1.0-0
Download cfnet-fs now.
Or, download directly to your target device using a terminal program like wget or curl.
wget https://downloads.comfiletech.com/CFNET/cfnet-fs/release/2.0.0/linux-arm64/cfnet-fs chmod +x cfnet-fs
Once downloaded, run the executable as illustrated below to create the virtual file system.
cfnet-fs {mount-point} {i2c1-device} {i2c2-device} {i2c3-device}
cfnet-fs {mount-point} cfheader {cfheader-address}
See Connecting CFHEADER to USB Host
For example, if you are using a single CFHEADER module configured for address 0:
cfnet-fs /tmp/cfheader0 cfheader 0
If you have multiple CFHEADER modules (e.g. one configured for address 0, and the other for address 1):
cfnet-fs /tmp/cfheader0 cfheader 0 cfnet-fs /tmp/cfheader1 cfheader 1
While cfnet-fs is running, use ordinary file system utilities like ls or tree to navigate the file system at the mount point (e.g. /tmp/cfnet-fs).
$ tree /tmp/cfnet-fs/
├── analog-input
│ └── 0
│ └── channel
│ ├── 0
│ │ ├── amps.txt
│ │ ├── amps.bin
│ │ ├── volts.txt
│ │ └── volts.bin
│ ├── 1
│ │ ├── amps.txt
│ │ ├── amps.bin
│ │ ├── volts.txt
│ │ └── volts.bin
│ ...
├── analog-input
│ └── 1
│ └── channel
│ ├── 0
│ │ ├── amps.txt
│ │ ├── amps.bin
│ │ ├── volts.txt
│ │ └── volts.bin
│ ...
├── analog-output
│ └── 0
│ └── channel
│ ├── 0
│ │ ├── raw.txt
│ │ └── volts.txt
│ └── 1
│ ├── raw.txt
│ └── volts.txt
├── analog-output
│ └── 1
│ └── channel
│ ├── 0
│ │ ├── raw.txt
│ │ └── volts.txt
│ ...
├── digital-input
│ └── 0
│ ├── channel
│ │ ├── 0
│ │ │ ├── state.txt
│ │ │ └── state.bin
│ │ ├── 1
│ │ │ ├── state.txt
│ │ │ └── state.bin
│ │ ...
│ ├── state.txt
│ └── state.bin
├── digital-input
│ └── 1
│ ├── channel
│ │ ├── 0
│ │ │ ├── state.txt
│ │ │ └── state.bin
│ ...
└── digital-output
├── 0
│ ├── channel
│ │ ├── 0
│ │ │ ├── state.txt
│ │ │ └── state.bin
│ │ ├── 1
│ │ │ ├── state.txt
│ │ │ └── state.bin
│ │ ...
│ ├── state.txt
│ └── state.bin
└── 1
├── channel
│ ├── 0
│ │ ├── state.txt
│ │ └── state.bin
...
Automate the modules by simply reading from and writing to the files in the mount point.
echo 1 > /tmp/cfnet-fs/digital-output/0/channel/3/state.txt
File.WriteAllText("/tmp/cfnet-fs/digital-output/0/channel/3/state.txt", "1");
with open("/tmp/cfnet-fs/digital-output/0/channel/3/state.txt", "w") as f: f.write("1")