GW102 Development Manual

File Transfer

Developers need to copy files to the gateway, or copy files from the gateway to a computer. Three methods can be used.

Network file transfer: On macOS or Linux systems, use the scp command; on Windows systems, use the WinSCP tool.

WinSCP tool http://dl.i2som.com/s/lBmTK

MicroSD card file transfer: Use a MicroSD card and card reader.

USB flash drive file transfer: Use a USB flash drive storage device.

Network file transfer scp command on macOS or Linux

// Single file, from local to gateway

scp hello.txt root@192.168.1.100:~/

// Directory, from local to gateway scp -r hello root@192.168.1.100:~/

// Single file, from gateway to local scp root@192.168.1.100:~/hello.txt hello.txt

// Directory, from gateway to local scp -r root@192.168.1.100:~/hello hello MicroSD card file transfer The file system format of the SD card is recommended to be FAT32 or Ext4. FAT32 can be read and written normally under Windows and Linux systems, while Ext4 can only be read and written under Linux systems.

Insert the SD card into the TF card slot of the gateway. Mount it in the system to read and write. After use, it must be unmounted before removal.

mount -t vfat /dev/mmcblk0p1 /mnt

cp hello.txt /mnt
cp /mnt/hello.txt .

umount

USB flash drive file transfer The file system format of the USB flash drive is recommended to be FAT32 or Ext4. FAT32 can be read and written normally under Windows and Linux systems, while Ext4 can only be read and written under Linux systems.

Insert the USB flash drive into the USB Host interface of the gateway. Mount it in the system to read and write. After use, it must be unmounted before removal.

mount -t vfat /dev/sda1 /mnt

cp hello.txt /mnt
cp /mnt/hello.txt .

umount