Sunday, January 03, 2016

RBox - Xmpp Command List and Help

With reference to my previous post regarding RBox, Here is the detailed information on all available commands supported by RBox. For a full list of available commands, send "Help" command to RBox slave and it will reply with the list as shown below.




Note: Commands are not case-sensitive, internally they are always converted to lowercase before processing, so you dont have to worry about typing upper or lowercase characters.

"Version"

This command takes no arguments, It returns the version number of RBox in the following format,
MJ.Mn.BUILD
MJ is the Major version(e.g 00,01,02)
Mn is the Minor version(e.g 00,01,10,20)
BUILD is the 5 digit svn version number(using this number you can always re-create the same binary).
Hint: Run this command before and after running "Sysupdate" command, this way you will know current version number and updated version number or RBox.



"Sysupdate"
This command takes no arguments. It is used for updating the RBox version to latest available release in github. If you trigger this on already updated version, still it will update the non-active boot section and during next reboot, it will boot with last updated boot section. After Sysupdate, reboot is necessary for updates to take effect.
Hint: you can concatenate "Sysupdate;reboot" so that after update is done, reboot is triggered automatically.



"Reboot"
This command takes no arguments, Internally its a linux "reboot" command which initiates closure and logout of all services for a gracious shutdown and restarts.



"Poweroff"
This command takes no arguments, Internally its a linux "poweroff" command which initiates gracious shutdown and keeps the system in halt condition. Its an important command to be used whenever you plan switch off the power of RBox, Dont just hard-cut the power, it will confuse you by showing the Rbox still online but non-responsive, and xmpp server will not get an immediate update of such a disconnection of the client sessions.


"Uptime"

This command takes no arguments, Internally its a linux "uptime" but returns the time in hours so that you can have in idea of RBox being online for so many hours.


"Hostname [hostname]"

This command takes an optional argument, when you pass this argument, it will be set as new hostname and effect is seen after next reboot, its a persistent property, once saved will remain there till you change it. When no argument is passed, it prints out the current hostname string. It is always helpful to access your device with a hostname rather than the ip.
Hint: use this command when your master and slave devices are connected on the same local network. sometimes you might be required to login to Rbox via ssh, and this hostname helps in such cases.


"Resethostname"

This command takes not arguments. When RBox is started with freshly created SDCard Image, there is no hostname on first boot. Use this command to reset the hostname to default which will look like "brbox-1A2B3C4D5E6F"(last 12 characters are the MAC ID of your hardware). After running this command, reboot is needed for changes to take effect.
Hint: when you are not sure about deciding a correct hostname, just use this command to reset to default hostname.


"Publicip"

This command takes no arguments. In case of missing Dynamic DNS setup for accessing your home network, deploy the RBox behind your firewall and use this command to know which public ip was assigned to your router by the provider. For any reason, if your home router is unable to register new public IP with Dynamic DNS server, this command comes in handy. Knowing the public ip of your home network is of no use if you have not prepared your router with open ports and NAT assignment.


"Localip"

This command takes no arguments. If you want to do ssh access to RBox which is on your local network and you want to access it using  ip-address, then use this command to know the ip of RBox.


"Gpio [address] [value]"


This command takes "address" as mandatory argument, and optional "value" argument. Us this command to read/write gpio pins of Raspi or Beaglebone. e.g: if you want make GPIO2 High on P1 header of Raspi, run "Gpio 2 0". To make it low, run "Gpio 2 1". To read the current status of GPIO2, run "Gpio 2".
Note: after reboot of RBox, last written pin values are not retained, they will revert back to defaults.


2 comments:

essay services reviews.com said...

Nice blog post brings the reader with really a good amount of information and provide some basic ideas of the situations as well.. i liked your website as well. keep growing

Anonymous said...

I appreciate the simplicity and user-friendly interface of this app – it makes my life so much easier!I stumbled upon this Mouse Test website, and it's been a lifesaver for diagnosing issues with my mouse. Highly recommend!