USB Driver & Serial Commands

Discuss the SplashBase & get support

USB Driver & Serial Commands

Postby Carl-SolderSplash » Mon Mar 18, 2013 10:35 pm

The SplashBase has 2 methods of control. Ethernet and USB, USB when connected to a Windows/Mac/Linux appears as a CDC - Com port (/dev/ttyUSBx in *nix) and is achieved using an on board serial to USB bridge.

To use the USB port you will need a driver, which you can find on the FTDI website

For windows I use putty as the client. Select serial, type the COM port number in to the "serial line" box and change the speed to 115200

This is a list of the following commands that can be issued to the SplashBase via the com port. You can see this list on your SplashBase by sending the "help" or "?" command.
The banner will only appear the first time the SplashBase is booted. It will show the version number, date of compilation and your assigned Name.

Code: Select all
  ____        _     _           ____        _           _        _          _
 / ___|  ___ | | __| | ___ _ __/ ___| _ __ | | __ _ ___| |__    | |    __ _| |__  ___
 \___ \ / _ \| |/ _` |/ _ \ '__\___ \| '_ \| |/ _` / __| '_ \   | |   / _` | '_ \/ __|
  ___) | (_) | | (_| |  __/ |   ___) | |_) | | (_| \__ \ | | |  | |__| (_| | |_) \__ \
 |____/ \___/|_|\__,_|\___|_|  |____/| .__/|_|\__,_|___/_| |_|  |_____\__,_|_.__/|___/
                                     |_|
SolderSplash Labs - SplashBase V0.7 - Mar 18 2013 22:18:02 - SplashBase

help               : Display list of commands
?                  : Display list of commands
config             : <save>/<factorydefault> save or factory default settings
setname            : name - Set SplashBase name
ipconfig           : <dynamic>/<static> <ip> <mask> <gateway> Show/Set Network Config
cosm               : <setkey>/<sethost>/<seturi> COSM/HTTP Put Control
date               : <update>, <offset> <set>, <server> <server hostname> - Display/update date time via NTP, apply offset in minutes offset to the clock
rgb                : <mode> <toprgb> <bottomrgb> - Mode 0-4, colours 32bit hex (html format)
reboot             : Reboot
uptime             : Power up time
relay              : <enabled>/<disabled> / optional:<relaynumber> <on/off>
getadcs            : return ADC values for each port
servomove          : <servo> <position> - 8bit servo number (zero based) and position
bridge             : <scan> List Connected SolderBridges
dmxupdate          : offset value
gettemp            : Retrieve Temperature
gpioinit           : <disable>/<enable> / <get>/<set> <portno> <direction>/<port> <mask> <value> get or set port init
gpio               : <get>/<set> <portno> <direction>/<port> <mask> <value> get port status or set dir/port value
selftest           : Factory Test with test rig
fwupdate           : Trigger Firmware Update

User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: USB Serial Commands

Postby Carl-SolderSplash » Mon Mar 18, 2013 10:37 pm

Here is a brief explanation of each command

Save the current configuration state of the SplashBase
Code: Select all
config save

Revert the SplashBase to factory defaults
Code: Select all
config factorydefault

Customise the network name of the SplashBase
Code: Select all
setname NewName

Get status of network connection
Code: Select all
ipconfig
Dynamic IP
MAC : 00-04-a3-38-3d-43
IP : 192.168.0.15
Gateway : 192.168.0.1
Netmask : 255.255.255.0

Set network interface to dynamic IP (DHCP)
Code: Select all
ipconfig dynamic

Set network interface to Static IP <static> <ip> <mask> <gateway>
Code: Select all
ipconfig static 192.168.1.10 255.255.255.0 192.168.1.1

Show Date/Time
Code: Select all
date
Show configured SNTP Server
Code: Select all
date server
Configure the NTP Server to use (max 32 chars)
Code: Select all
date server set new.sntp.server.com
Update Date/Time from the configured SNTP server
Code: Select all
date update
Configure time offset in minutes, used to set your effectively set your timezone. In minutes as some zones are not whole hour offsets from UTC
1 Hour ahead
Code: Select all
date offset set 60
1 Hour behind
Code: Select all
date offset set -60



Reboot
Code: Select all
reboot

Uptime of the SplashBase
Code: Select all
uptime

Relay control, when using the splashbase with a Four Channel SolderBridge. Turn relay 1 on
Code: Select all
relay 1 on
Then off
Code: Select all
relay 1 off
All off
Code: Select all
relay off
All on
Code: Select all
relay on

Return the ADC counts on all 3 ADC channels
Code: Select all
getadcs

Move servo 0 to a position 0-255, When using a Servo SolderBridge
Code: Select all
servomove 0 255

Show which SolderBridges are attached
Code: Select all
bridge list
Rescan SPI and I2C for new SolderBridges
Code: Select all
bridge scan

Show temperature of air temp sensor in °C
Code: Select all
gettemp

Code: Select all
selftest

Start the bootloader, once issued use LM Flash to update the Firmware over the network
Code: Select all
fwupdate
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: USB Serial Commands

Postby Carl-SolderSplash » Mon Mar 18, 2013 11:33 pm

Show a list of all of the General Purpose Inputs/Outputs
Code: Select all
gpio get
Replys with
Code: Select all
0 : Port(A) : Dir : 0x0000 Pins : 0x0000
1 : Port(B) : Dir : 0x0000 Pins : 0x0000
2 : Port(C) : Dir : 0x0000 Pins : 0x0000
3 : Port(D) : Dir : 0x0000 Pins : 0x0000
4 : Port(E) : Dir : 0x0000 Pins : 0x0000
5 : Port(F) : Dir : 0x0000 Pins : 0x0000
6 : Port(G) : Dir : 0x0000 Pins : 0x0000
7 : Port(H) : Dir : 0x0000 Pins : 0x0000
8 : Port(I) : Dir : 0x0000 Pins : 0x0000
9 : Port(J) : Dir : 0x0000 Pins : 0x0000
10 : Port(K) : Dir : 0x0000 Pins : 0x0000
11 : Port(L) : Dir : 0x0033 Pins : 0x0033
12 : Port(M) : Dir : 0x0000 Pins : 0x0000
13 : Port(N) : Dir : 0x0000 Pins : 0x0000
14 : Port(O) : Dir : 0x0000 Pins : 0x0000
Each port is given a number and a letter,
PORTA to PORTG are GPIO ports on the SplashBase's ARM and are only 8bit wide.
PORTH to PORT0 are via the GPIO Expanders and are 16bit wide, Each GPIO Expander SolderBridge adds 2 GPIO Ports

A high bit in the direction value indicates that pin is an output, the level it is set to is shown by the "Pins" value.

Set a ports pins,
the port is represent by its number, use the previous table as reference. The operation is on the ports pins. The mask value tells the SplashBase which bits to use in the last value. The mask and Pins are expressed in 16bit hexadecimal.
Code: Select all
gpio set 6 port 0001 0001
This set port 6 (PORTG) PIN0/BIT0 high
To Control the ports direction register, it's the same but replace port with direction
Code: Select all
gpio set 6 direction 0001 0001



// gpioinit in development...
You can configure the state of the GPIO upon power up by enabling gpioinit
Code: Select all
gpioinit get
Shows a simular output to the "gpio get" command but indicates on startup what the ports will be set to.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm


Return to SplashBase LM3S6x

Who is online

Users browsing this forum: No registered users and 5 guests

cron