$tpi is designed to facilitate your interaction with Turing Pi 2. It comes pre-installed on the BMC and can be easily invoked as follows:

# tpi -h
Usage: tpi [host] <options...>
Options:
	-p, --power         (on off status) Power management
	-u, --usb           (host device status) USB mode,Must be used with the node command
	-n, --node          (1 2 3 4) USB selected node
	-r, --resetsw        reset switch
	-U, --uart          uart opt get or set
	-C, --cmd           uart set cmd
	-F, --upgrade <img> upgrade fw
	-f, --flash <img>   flash an image to a specified node
	-l, --localfile     when flashing (-f), the specified file will be loaded locally from the device
	-m, --msd           load the node as mass storage device.
	-x, --clear_msd     pull rpiboot pin low and restart node.
	-h, --help          usage
example:
	$ tpi -p on //power on
	$ tpi -p off //power off
	$ tpi -u host -n 1 //USB uses host mode to connect to Node1
	$ tpi --uart=get -n 1 //get node1 uart info
	$ tpi --uart=set -n 1 --cmd=ls//set node1 uart cmd
	$ tpi --upgrade=/mnt/sdcard/xxxx.swu    //upgrade fw
	$ tpi -r  //reset switch
	$ tpi -n 1 -l -f /mnt/sdcard/raspios.img  // flash image file to node 1
	$ tpi -m -n 1  //(Rpi only) load the MSD driver. When executed successfully,
	// log into the BMC and use 'dmesg' to see the names of the new block devices,
	// and mount them as you wish.
	$ tpi -x -n 1  // clear msd node and restart

Host version

the $tpi is also available for your x86_64 linux/mac system. precompiled binaries can be downloaded here.

Considerations

  • The $tpi tool works over a nonencrypted connection. The TLS-enabled version is on the roadmap
  • No support for hostnames or ipv6. tracking issue