Skip to content

Latest commit

 

History

History
 
 

terminal

Code Card CLI

To make it easier to configure your Code Card, we included an embedded CLI.
The Code Card has a serial-usb chip. We use serial communication to configure the Code Card wifi and button settings.

Connect via Terminal Emulator

You can also use any terminal emulator app such as PuTTY (Windows), CoolTerm (Mac), or screen (Mac and Linux.)

The USB-Serial port will have different names depending on your OS:

  • Windows: COM[X]
  • Mac: /dev/tty.wchusbserial[XXXX]
  • Linux: /dev/ttyUSB[X]

If your machine is not recognizing the Code Card, you might need to install the the Silicon Labs CP2104 USB serial drivers. You will need to reboot your system before the drivers will function correctly.

Steps
  1. Connect to the device with the emulator for your OS (baud rate = 115200)
  2. Once connected, you'll need to reset the device by flipping the power switch off then on again
  3. Bring the Code Card into configuration mode by performing a simultaneous button A+B short-press

Once the Code Card has finished booting into configuration mode - the CLI menu will be displayed (per the above image).
You can type help in the emulator anytime to bring up a list of commands..

Keep in mind that pausing for 2 seconds while typing will automatically enter the command. It may be easier to pre-type the commands elsewhere and copy-paste them into the window.

Change Wi-Fi Profile:

First, we will set the Wi-Fi SSID by entering the following command.

ssid=<your-ssid>

Code Card will confirm setting update as follows.

>>>
Value saved for ssid: <your-ssid>
>>>

Next, set the Wi-Fi password by entering the following command.

password=<your-password>

Code Card will confirm setting update as follows.

>>>
Value saved for password: <your-password>
>>>