Updated reference code for RFC 27

* also added command examples for RFC 27