Our website is under construction. Please stay tuned!

Shell API

UART Interface

Shell uses the UART interface, which can also work in binary mode. The binary mode is used to read API commands in TLV format. The module starts by default in binary mode after reset. The shell mode can be entered by pressing ENTER twice within one second. The binary mode can be entered by executing command quit in shell mode. The shell mode and the binary mode can be switched back and forth.

Tip

Press Enter to repeat the last command


BLE LUS (LEAPS UART Service) Interface

The LEAPS UWBS supports additional BLE LUS (LEAPS UART Service) interface, following steps to set up the interface.

Note

If UART shell is being opened, BLE shell will not be accessed.

  1. Install the python ble-serial library with below command:

    python –m pip install ble-serial
    

    Note

    If the Windows is being used, please follow additional steps “Additional steps for Windows” in this link ble-serial.

  2. Use below command to find device. LEAPS board should appear with name as “LEAPS….”.

    ble-scan
    

    and the result of successful scan:

    ../../../../_images/ble-lus-scan.png
  3. To connect serial port, open a terminal and run below commands with MAC addresses found at above steps.

    ble-serial -d CA:E5:56:1F:57:3D -r e8573d97-6758-11e9-8860-cb4385c24b83 -w e6bfa235-6758-11e9-979f-5b24c4603eb8 -t 10
    
  4. If successful, it will display as below

    ../../../../_images/ble-lus-passed.png
  5. As the log, the script created a serial port with name as “/tmp/ttyBLE” to communicate with serial port on LEAPS board. Let’s this terminal running, open another terminal and use tools as minicom to access this serial port.

  6. Press double enter to enter shell.


Supported Commands

Command

Description

Example

?

this help

?

help

this help

help

quit

quit

quit

reset

Reboot the system

reset

frst

Factory reset

frst

si

System info

si

f

Show free memory on the heap

f

stg

Get stats

stg

stc

Clear stats

stc

rbv

Read battery voltage

rbv

rcs

Read charger status

rcs

ut

Show device uptime

ut

gc

GPIO clear

gc

gg

GPIO get

gg

gs

GPIO set

gs

gt

GPIO toggle

gt

twi

General purpose TWI read

twi

aid

Read ACC device ID

aid

av

Read ACC values

av

scs

Stationary config set

scs

scg

Stationary config get

scg

les

Show meas. and pos.

les

lec

Show meas. and pos. in CSV

lec

lep

Show pos. in CSV

lep

lej

Show pos. in JSON

lej

lea

how meas., pos. and pdoa

lea

ucs

Set UWB channel and compliance

ucs

utpg

Get TxPwr

utpg

utps

Set TxPwr

utps

ufs

UWB Frontend Set

ufs

ucls

Set BLE Adv UWB counter low water mark

ucls

uclg

Get BLE Adv UWB counter low water mark

uclg

nmg

Get node mode

nmg

nmo

Set UWB mode to off

nmo

nmp

Set UWB mode to passive

nmp

nma

Set mode to AN

nma

nmi

Set mode to ANI

nmi

nmt

Set mode to TN

nmt

nmtl

Set mode to TN-LP

nmtl

nmb

Set mode to BN

nmb

ln

Show node list

ln

la

Show AN list

la

nis

Set Network ID

nis

nls

Set node label

nls

nps

Set network profile

nps

udi

Show incoming IoT data

udi

uui

Send IoT data

uui

usps

UWB Synchronization Pulse Set

usps

uspg

UWB Synchronization Pulse Get

uspg

urs

Set update rate

urs

urg

Get update rate

urg

tcs

Set tag config

tcs

tlv

Send TLV frame

tlv

tlvr

Cmd as TLV frame with manual CRC

tlvr

ums

Set default UART mode

ums

ana

Set MAC address

ana

amlg

Get MAC address list.

amlg

mrs

Set mesh random timing

mrs

mrg

Get mesh random timing

mrg

dacs

Distance alarm set

dacs

dacg

Distance alarm get

dacg

acs

Configure node

acs

pg

Get the position

pg

ps

Set the position

ps

fls

Filter config set

fls

flg

Get filters

flg

ahs

Set HW version once

ahs

eks

Set encryption key

eks

ekc

Clear encryption key

ekc

amls

Set MAC addr list once

amls

fniq

Configure the device to FiRa UWB Sub-System Nearby Interaction mode.

fniq

fuci

Configure the device to FiRa UWB Sub-System UCI mode.

fuci