A kind-of-FAQ for operating the Tessel 2 from the commandline (via SSH, serial console or tessel root
).
Prefix your commands with "DEBUG=commands:usb
" to learn about the commands sent to the device:
$ DEBUG=commands:usb t2 wifi -l
INFO Looking for your Tessel...
commands:usb [ 'uci', 'get', 'system.@system[0].hostname' ] +0ms
INFO Connected to tessel2.
INFO Scanning for available networks...
commands:usb [ 'iwinfo', 'wlan0', 'scan' ] +25ms
INFO Currently visible networks (25):
INFO Wireless (57/70)
INFO Wi-Free (19/70)
...
The above command only lists commands sent via an USB connection - for LAN (be that wireless or ethernet) connections, use DEBUG=commands:lan
:
$ DEBUG=commands:lan t2 push index.js --full
INFO Looking for your Tessel...
commands:lan [ 'uci', 'get', 'system.@system[0].hostname' ] +0ms
INFO Connected to tessel2.
commands:lan [ '/etc/init.d/tessel-app', 'stop' ] +3s
commands:lan [ 'rm', '-rf', '/tmp/remote-script/' ] +81ms
commands:lan [ 'mkdir', '-p', '/tmp/remote-script/' ] +20ms
commands:lan [ 'rm', '-rf', '/app/' ] +23ms
commands:lan [ 'mkdir', '-p', '/app/' ] +402ms
commands:lan [ 'tar', '-x', '-C', '/tmp/remote-script/' ] +86ms
INFO Building project.
INFO Writing project to Flash on tessel2 (133.12 kB)...
INFO Deployed.
commands:lan [ 'dd', 'of=/app/start' ] +376ms
commands:lan [ 'chmod', '+x', '/app/start' ] +39ms
INFO You may now disconnect from the Tessel. Your code will be run whenever Tessel boots up. To remove this code, use `tessel erase`.
commands:lan [ 'mv', '/tmp/remote-script/', '/app/' ] +24ms
commands:lan [ '/etc/init.d/tessel-app', 'start' ] +1s
INFO Running index.js...
You can use the commands below by opening a serial or SSH connection to your Tessel and typing them in the resulting command line.
reboot -f
firstboot
Then, power-cycle or soft-reboot. Note, this disables wireless functionality (as that's the default setting). You may have to turn this back on manually.
uci show wireless
uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi