We have written a very powerful sketch for Arduino called HamShield Serial Mode. This allows you to control your HamShield using any serial interface, including a computer over USB. This can be helpful when using one of the Chrome applications.
With the exception of some special commands, all serial commands are terminated with a semicolon ; and does not require any carriage return, line feed, etc. (ie: no new lines or enter keys required). The command is executed immediately after the reception of the ; character and waits for the next command.
Commands are not echoed to the sender. Only status responses are provided back over the serial port.
HamShield Serial Interface Commands
Mode | ASCII | Description |
Transmit | [Spacebar] | Space must be received at least every 500 milliseconds |
Receive Mode | [None] | If nothing is received or the transmit times out after 500 ms, unit goes into receive mode |
CTCSS In | A[tone]; | Tone must be numerical ASCII with decimal point indicating CTCSS receive tone required to unsquelch. "0" disables mode. |
CTCSS Out | B[tone]; | Tone must be numerical ASCII with decimal point indicating CTCSS transmit tone. "0" disables mode. |
CTCSS Enable | C[state]; | Turns on CTCSS mode (analog tone) with 1, off with 0. |
CDCSS Enable | D[state]; | Turns on CDCSS mode (digital tone) with 1, off with 0. |
Bandwidth | E[mode]; | For 12.5KHz mode: 0, for 25KHz: 1 |
Frequency | F[freq]; | Set the frequency in KHz. If offset is disabled, this is the transmit frequency |
CDCSS In | G[code]; | Code must be a valid CDCSS code |
CDCSS Out | H[code]; | Code must be a valid CDCSS code |
Print Config | I | Print out all configurations in comma delimited format. |
Power Level | P[level]; | Set power amp level, 0 = lowest, 15 = highest |
Enable Offset | R[state]; | 1 turns on repeater offset mode, 0 turns off repeater offset mode |
Squelch | S[level]; | Set the squelch level |
TX Offset | T[freq]; | The absolute frequency of the repeater offset to transmit on in KHz |
Volume | V[level]; | Set the volume level of the receiver |
Reset | X | Reset all settings to default |
Sleep | Z | Sleep radio |
Filters | @[state]; | Set bit to enable, clear bit to disable: 0 = pre/de-emphasis, 1 = high pass filter, 2 = low pass filter (default: ascii 7, all enabled) |
Vox mode | $[state]; | 0 = vox off, >= 1 audio sensitivity. lower value more sensitive |
Mic Channel | *[state]; | Set the voice channel. 0 = signal from mic or arduino, 1 = internal tone generator |
RSSI | ? | Respond with the current receive level in - dBm (no sign provided on numerical response) |
Tone Gen | %[notes] | To send a tone, use the following format: Single tone: %1,[freq],[length]; Dual tone: %2,[freq],[freq],[length]; DTMF: %3,[key],[length]; |
Voice Level | ^ | Respond with the current voice level (VSSI) |