Debugging: tracing the Server Channel command in syslog

The server channel handles downloading the commands to retrieve and then execute your script.   Use the "tail" command as shown to see the script command in real time.

remoteit package

pi@raspberrypi:~ $ tail -f /var/log/syslog | grep -i "Server Channel"
Jul 28 21:27:32 raspberrypi connectd: Server Channel Send SC!80:00:00:00:01:05:9c:5e!CMD!0CD84FFF-24A1-FC0F-2D70-814EECDF4080!!cd /tmp;curl -Lks https://$3/t/7rlNDMLeNqw -o;chmod +x /tmp/;/tmp/ $2 $3 EZ1xX2o2YUX

connectd package

pi@raspberrypi:~ $  tail -f /var/log/syslog | grep "Server Channel" 
Jul 28 14:49:07 Old-Gigabyte Connectd[16012]: Server Channel Send SC!80:00:00:05:3a:00:4b:21!CMD!355DAFD7-7994-3DC6-9683-36970CE399F8!!cd /tmp;curl -Lks https://$3/t/QVFXmU7qx98 -o;chmod +x /tmp/;/tmp/ $2 $3 4qrLPFdGX0g

In both cases, the resulting command string can be broken into the following sections:

Command header


Service ID




Task ID ($2)


API URL ($3)!

Linux Command string

The Linux command string uses the Task ID for its first parameter and the API URL for the second parameter.

cd /tmp; Execute in the /tmp folder
curl -Lks https://$3/t/7rlNDMLeNqw -o; Download the script and give it the correct name
chmod +x /tmp/; Make the script executable
/tmp/ $2 $3 EZ1xX2o2YUX

Execute the script using the following parameters:

  • Task ID
  • Short code

The short code is used as the Server Channel daemon has a limited buffer size.  In scripts which use the short code, this has to be translated via an API call to expand the full command line.



Was this article helpful?
0 out of 0 found this helpful