Regbot command interface: Difference between revisions

From Rsewiki
 
(25 intermediate revisions by the same user not shown)
Line 3: Line 3:
== Teensy command list ==
== Teensy command list ==


==== Commands available for regbot Mary ====
This command list is for '''raw commands''' sent on the USB connection.
 
From the GUI, the commands can be used from the 'debug' tab.
 
On all other tabs, these commands are used to get data or set parameters relevant to the tab page.
 
All commands and data on the USB connection are clear text lines ending with a 'new-line' ('\n').
 
==== Commands available for Regbot ====  
*    help        This help text.
*    help        This help text.
*  veri and 'sub ver N' get version number, HW type and repository date
*  veri and 'sub ver N' get version number, HW type and repository date
Line 26: Line 34:
*  veli and 'sub vel N' Get velocity 'left right' (m/s)
*  veli and 'sub vel N' Get velocity 'left right' (m/s)
*  confi and 'sub conf N' Get robot conf (radius, radius, gear, pulsPerRev, wheelbase, sample-time)
*  confi and 'sub conf N' Get robot conf (radius, radius, gear, pulsPerRev, wheelbase, sample-time)
*  ---- EE (configuration flash) ====--
*  ---- EE (configuration flash) ====-
*  eew Save configuration to EE-Prom (flash)
*  eew Save configuration to EE-Prom (flash)
*  eer Read configuration from EE-Prom
*  eer Read configuration from EE-Prom
==== Motor help ====-
==== Motor help ====
*  motv m1 m2 Set motor voltage -24.0..24.0 - and enable motors
*  motv m1 m2 Set motor voltage -24.0..24.0 - and enable motors
*  motfrq Set motor PWM frequency [100..50000], is 17000
*  motfrq Set motor PWM frequency [100..50000], is 17000
Line 38: Line 46:
*  servo i p v set one servo i=index 1..5, pos +/-1024, v=velocity 0..4000,0=max, 1=sloooow
*  servo i p v set one servo i=index 1..5, pos +/-1024, v=velocity 0..4000,0=max, 1=sloooow
*  svoi and 'sub svo N' get servo configuration 'svo {enabeled pos[0...1000] vel}*5'
*  svoi and 'sub svo N' get servo configuration 'svo {enabeled pos[0...1000] vel}*5'
==== AD converter ====-
==== AD converter ====
*  adi and 'sub ad N' Get raw AD values (ir1, ir2, battery, m1 current, m2 current)
*  adi and 'sub ad N' Get raw AD values (ir1, ir2, battery, m1 current, m2 current)
*  lsi and 'sub ls N' Get raw line sensor AD values (n1, n2, ls1 (l,h), ls2 ... ls8, ct1, ct2 (us))
*  lsi and 'sub ls N' Get raw line sensor AD values (n1, n2, ls1 (l,h), ls2 ... ls8, ct1, ct2 (us))
==== Motor current ====-
==== Motor current ====
*  mcai and 'sub mca N' Get motor current 'mca m1 m2' [Amps]
*  mcai and 'sub mca N' Get motor current 'mca m1 m2' [Amps]
*  mcoi and 'sub mco N' Get motor current offset (AD: 0..4096) 'mco o1 o2 ad1 ad2'
*  mcoi and 'sub mco N' Get motor current offset (AD: 0..4096) 'mco o1 o2 ad1 ad2'
==== Line sensor ====-
==== Line sensor ====
*  lip p w h t wi s Set sensor baseics p=on, w=white, h=high power, t=tilt comp, wi=wide, s=swap
*  lip p w h t wi s Set sensor baseics p=on, w=white, h=high power, t=tilt comp, wi=wide, s=swap
*  licw Use current value as full white
*  licw Use current value as full white
Line 54: Line 62:
*  livni and 'sub livn N' Get line-sensor normalized value 'livn ls1 ls2 ls3 ls4 ls5 ls6 ls7 ls8'
*  livni and 'sub livn N' Get line-sensor normalized value 'livn ls1 ls2 ls3 ls4 ls5 ls6 ls7 ls8'
*  lipi and 'sub lip N' Get line-sensor position 'lip on wh le leCnt re reCnt ... some more'
*  lipi and 'sub lip N' Get line-sensor position 'lip on wh le leCnt re reCnt ... some more'
==== IR distance ====-
==== IR distance ====
*  irc A1 B1 A2 B2 Set calibration values A=13cm, B=50cm (sensor 1 and 2)
*  irc A1 B1 A2 B2 Set calibration values A=13cm, B=50cm (sensor 1 and 2)
*  iron V Turn IR sensor on or off V=1 for on (0=off)
*  iron V Turn IR sensor on or off V=1 for on (0=off)
*  iri and 'sub ir N' Get IR and calibration data 'irc dist1 dist2 ... (meter)
*  iri and 'sub ir N' Get IR and calibration data 'irc dist1 dist2 ... (meter)
==== Mission help ====-
==== Mission help ====
*    madd user-mission-line>    add a user mission line (0 lines loaded in 1 threads)
*    madd user-mission-line>    add a user mission line (0 lines loaded in 1 threads)
*    mmod T L user-mission-line  Modify line L in thread T to new user-mission-line
*    mmod T L user-mission-line  Modify line L in thread T to new user-mission-line
*    mclear>     Clear all user mission lines
*    mclear      Clear all user mission lines
*    mevent X>   Make an event number X (from 0 to 31)
*    mevent X    Make an event number X (from 0 to 31)
*  mgeti and 'sub mget N' Get all mission lines
*  mgeti and 'sub mget N' Get all mission lines
*  mtoki and 'sub mtok N' Get all mission lines as tokens (debug feature)
*  mtoki and 'sub mtok N' Get all mission lines as tokens (debug feature)
==== logger ====
==== logger ====
*  log Get current log, if any
*  log Get current log, if any
Line 73: Line 82:
*  lfli and 'sub lfl N' Get log flags 'lfl mis acc gyro mag motref motv mota enc vel turnr pose line dist batt ex chirp'
*  lfli and 'sub lfl N' Get log flags 'lfl mis acc gyro mag motref motv mota enc vel turnr pose line dist batt ex chirp'
*  lsti and 'sub lst N' Get log status 'lst interval rows rowsMax'
*  lsti and 'sub lst N' Get log status 'lst interval rows rowsMax'
==== Control settings ====-
==== Control settings ====
*  rc P lv hv [b] Remote control P=0: off, P=1:manual, P>1: mission; lv=linear vel (m/s); hv = heading vel (ish); b=1 for balance
*  rc P lv hv [b] Remote control P=0: off, P=1:manual, P>1: mission; lv=linear vel (m/s); hv = heading vel (ish); b=1 for balance
*  hm n Hard coded mission: n=1 balance 5s, n=2 square, n=3 wall, n=?
*  hm n Hard coded mission: n=1 balance 5s, n=2 square, n=3 wall, n=?
Line 96: Line 105:
*  params: use kp iuse itau ilim Lfuse LfNum LfDen Lbuse LbNum LbDen preUse preNum preDen
*  params: use kp iuse itau ilim Lfuse LfNum LfDen Lbuse LbNum LbDen preUse preNum preDen
*          preIuse preItau preIlim ffUse ffKp ffFuse ffFnum ffFden LimUse Lim
*          preIuse preItau preIlim ffUse ffKp ffFuse ffFnum ffFden LimUse Lim
==== IMU help ====-
==== IMU help ====
*  gyroc Start gyro calibration (finished=1)
*  gyroc Start gyro calibration (finished=1)
*  magcal Set magnetometer calibration values (offset[3] rotate/scale[9])
*  magcal Set magnetometer calibration values (offset[3] rotate/scale[9])
Line 112: Line 121:
*  imuposei and 'sub imupose N' Get IMU-based pose 'imupose roll pitch yaw (radians)
*  imuposei and 'sub imupose N' Get IMU-based pose 'imupose roll pitch yaw (radians)
*  boardi and 'sub board N' Get orientation of IMU board (board rX rY rZ)
*  boardi and 'sub board N' Get orientation of IMU board (board rX rY rZ)
==== IR distance ====-
==== IR distance ====
*  play N Play melody number N to buzzer-pin
*  play N Play melody number N to buzzer-pin
*  mutedi and 'sub muted N' Is sound muted (on 4.1 only)
*  mutedi and 'sub muted N' Is sound muted (on 4.1 only)
*  soundi and 'sub sound N' Get current sound activity
*  soundi and 'sub sound N' Get current sound activity
==== Display ====-
==== Display ====
*  disp text Set a display line text
*  disp text Set a display line text
*  displayi and 'sub display N' Get current display text
*  displayi and 'sub display N' Get current display text
==== USB host ====-
==== USB host ====
*  usbhost A Set USB host as active or not A=1 is active
*  usbhost A Set USB host as active or not A=1 is active
*  joyn A Notify on updates
*  joyn A Notify on updates
*  joyc A Changes only
*  joyc A Changes only
== Bluetooth extra ==
===BLE 4.0 CC2541HM-10===
The modules in hand are version HMSoft V006 (from Arduino store). It seems like an old version, but I purchased it in December 2025!
See (some) data here: https://ardustore.dk/error/HC-10%20Datasheet.pdf.
Some described functions are not implemented in this version; only those on this list are valid.
Command list:
$ echo "bt4tx AT+HELP?" >/dev/ttyACM0
* *******************************************************************
* Command            Description          *
* ---------------------------------------------------------------- *
* AT                  Check if the command terminal work normally  *
* AT+RESET            Software reboot  *
* AT+VERS            Get firmware, bluetooth, HCI and LMP version *
* AT+HELP            List all the commands          *
* AT+NAME            Get/Set local device name                    *
* AT+PIN              Get/Set pin code for pairing                *
* AT+BAUD            Get/Set baud rate                  *
* AT+LADDR            Get local bluetooth address  *
* AT+ADDR            Get local bluetooth address  *
* AT+DEFAULT          Restore factory default  *
* AT+RENEW            Restore factory default  *
* AT+STATE            Get current state  *
* AT+PWRM            Get/Set power on mode(low power)    *
* AT+POWE            Get/Set RF transmit power    *
* AT+SLEEP            Sleep mode                    *
* AT+ROLE            Get/Set current role.                  *
* AT+PARI            Get/Set UART parity bit.                    *
* AT+STOP            Get/Set UART stop bit.                      *
* AT+INQ              Search slave model                          *
* AT+SHOW            Show the searched slave model.              *
* AT+CONN            Connect the index slave model.              *
* AT+IMME            System wait for command when power on.  *
* AT+START            System start working.  *
* AT+UUID            Get/Set system SERVER_UUID .              *
* AT+CHAR            Get/Set system CHAR_UUID .              *
* -----------------------------------------------------------------*
* Note: (M) = The command supports master mode only.            *
==== Mounted into Regbot 6.3 serial port ====
Cable
Regbot            Bluetool module (HC-10 or HC42)
nc                State  (LED output)
4: 3.3V (black)    Vcc (3.3-5V)
1: GND  (Yellow)  Gnd
2: Rx  (White)    Tx
3: Tx  (Red)      Rx
nc                key/break (break connection when grounded)
==== Test (HC-10) ====
* bt4use 1      (enable Bluetooth, remember eew to save)
* bt4br 115200  (set baudrate on the Regbot side)
* bt4tx AT+BAUD?  => OK+Get:4  (4=115200 bit/sec, 0=9600 bit/sec (default))
* bt4tx AT+VERS?  =>  HMSoft V006
* bt4tx AT+ADDR?  =>  OK+ADDR:=3CA308ABB420  (master)
* bt4tx AT+ADDR?  =>  OK+ADDR:=6CECEB430D96  (slave)
* bt4tx AT+POWE?  =>  OK+Get:3
* bt4tx AT+ADVI?  =>  OK+Get:0  (0=100ms, 8=1022ms, F=7000ms)
* bt4tx AT+ROLE1  =>  OK+Set:1  (master (faster blink))
* bt4tx AT+ROLE?  =>  OK+Get:1  (master)
* bt4tx AT+ROLE?  =>  OK+Get:0  (slave)
* bt4tx AT+IMME?  =>  OK+Get:0  (0=start at boot, 1= wait for AT commands)
* bt4tx AT+UUID?  =>  OK+Get:0xFFE0
* bt4tx AT+CHAR?  =>  OK_Get:0xFFE1
* bt4tx AT+CHAR\!AA77 => OK_Set:0xAA77
* bt4tx AT+INQ\!  =>  (master)
    Scanning...
    +INQ:1 0x6CECEB430D96  (the other BLE 4 device)
    +INQ:2 0x4CB9EA9BA5B3  (some other devices)
    +INQ:3 0xA4C1389482C1
    +INQ:4 0x28E6A923C915
    +INQE
* bt4tx AT+INQ\!  =>  (slave)
    ERROR:BLE_ROLE_PERIPHERAL  (slave is also called peripheral)
* bt4tx AT+CONN1\! => +CONN:1  (and now connected/bound to first in INQ list, LED now steady)
* bt4tx AT+RESET (on slave) => OK+RESET  (and connection broke - sometimes)
Then, when sending characters (either way), nothing is received on the other end.
Reason is unknown - gave up.
=== BT5 HC-42 ===
Using nRF52832 sub-board.
No help list.
==== Experience ====
* bt4br 9600      (default baudrate)
* bt4tx AT+UART        =>  OK+UART=9600
* bt4tx AT+UART=115200  =>  OK+UART=115200
* bt4br 115200
* bt4tx AT+UART        =>  OK+UART=115200
* bt4tx AT+ADDR        =>  OK+ADDR=CC:DD:9E:FC:54:55  (master)
* bt4tx AT+ADDR        =>  OK+ADDR=F4:27:53:3D:92:A9  (slave)
* bt4tx AT+NAME        =>  OK+NAME=HC-42

Latest revision as of 13:26, 21 December 2025

back to regbot

Teensy command list

This command list is for raw commands sent on the USB connection.

From the GUI, the commands can be used from the 'debug' tab.

On all other tabs, these commands are used to get data or set parameters relevant to the tab page.

All commands and data on the USB connection are clear text lines ending with a 'new-line' ('\n').

Commands available for Regbot

  • help This help text.
  • veri and 'sub ver N' get version number, HW type and repository date

State settings

  • setidx N Set ID to N (sets robot name) (id=89, part of hbt).
  • setid string Set device type to string (< 32 chars, is=regbot).
  • sethw N Set hardware version (is = 41, part of hbt).
  • stop Stop and set manual mode
  • start Start mission
  • off T Turn off power (cuts power after T seconds)
  • pind pin v [p] Set pin direction v=1 output, p=1 pull up, p=-1 pull down
  • pinv pin v Set pin to v [0..1]
  • hbti and 'sub hbt N' Get time and state 'hbt time idx revision batVolt state hw'
  • idi and 'sub id N' Get device type and name 'name type name'
  • timei and 'sub time N' sample timing [us] 'time start actual sensor control done'
  • pini and 'sub pin N' Get pin value (pin is set by 'pind') 'pin pin value'

Encoder settings

  • enc0 Reset pose to (0,0,0)
  • confw rl rr g t wb Set configuration (radius gear encTick wheelbase)
  • enci and 'sub enc N' Get encoder value 'enc encoder interrupts' (integer)
  • posei and 'sub pose N' Get current pose 'pose t x y h' (sec,m,m,rad)
  • veli and 'sub vel N' Get velocity 'left right' (m/s)
  • confi and 'sub conf N' Get robot conf (radius, radius, gear, pulsPerRev, wheelbase, sample-time)
  • ---- EE (configuration flash) ====-
  • eew Save configuration to EE-Prom (flash)
  • eer Read configuration from EE-Prom

Motor help

  • motv m1 m2 Set motor voltage -24.0..24.0 - and enable motors
  • motfrq Set motor PWM frequency [100..50000], is 17000
  • moti and 'sub mot N' Get motor voltage 'mot m1(V) m2(V) vel_ref1(m/s) vel_ref2(m/s)'
  • motpwmi and 'sub motpwm N' Get motor direction and PWM 'motpwm dir1 pwm1 dir2 pwm2'

Servo

  • svos e p v e p v ... set all servos e=enable, p=position +/-1024, v=velocity -1..100,-1=max
  • servo i p v set one servo i=index 1..5, pos +/-1024, v=velocity 0..4000,0=max, 1=sloooow
  • svoi and 'sub svo N' get servo configuration 'svo {enabeled pos[0...1000] vel}*5'

AD converter

  • adi and 'sub ad N' Get raw AD values (ir1, ir2, battery, m1 current, m2 current)
  • lsi and 'sub ls N' Get raw line sensor AD values (n1, n2, ls1 (l,h), ls2 ... ls8, ct1, ct2 (us))

Motor current

  • mcai and 'sub mca N' Get motor current 'mca m1 m2' [Amps]
  • mcoi and 'sub mco N' Get motor current offset (AD: 0..4096) 'mco o1 o2 ad1 ad2'

Line sensor

  • lip p w h t wi s Set sensor baseics p=on, w=white, h=high power, t=tilt comp, wi=wide, s=swap
  • licw Use current value as full white
  • licb Use current value as black limit
  • liwi and 'sub liw N' Get line-sensor white (AD) level 'liw w1 w2 w3 w4 w5 w6 w7 w8'
  • libi and 'sub lib N' Get line-sensor black (AD) level 'lib b1 b2 b3 b4 b5 b6 b7 b8'
  • ligi and 'sub lig N' Get line-sensor channel gain 'lig g1 g2 g3 g4 g5 g6 g7 g8'
  • livi and 'sub liv N' Get line-sensor channel value 'liv ls1 ls2 ls3 ls4 ls5 ls6 ls7 ls8'
  • livni and 'sub livn N' Get line-sensor normalized value 'livn ls1 ls2 ls3 ls4 ls5 ls6 ls7 ls8'
  • lipi and 'sub lip N' Get line-sensor position 'lip on wh le leCnt re reCnt ... some more'

IR distance

  • irc A1 B1 A2 B2 Set calibration values A=13cm, B=50cm (sensor 1 and 2)
  • iron V Turn IR sensor on or off V=1 for on (0=off)
  • iri and 'sub ir N' Get IR and calibration data 'irc dist1 dist2 ... (meter)

Mission help

  • madd user-mission-line> add a user mission line (0 lines loaded in 1 threads)
  • mmod T L user-mission-line Modify line L in thread T to new user-mission-line
  • mclear Clear all user mission lines
  • mevent X Make an event number X (from 0 to 31)
  • mgeti and 'sub mget N' Get all mission lines
  • mtoki and 'sub mtok N' Get all mission lines as tokens (debug feature)

logger

  • log Get current log, if any
  • lfls Set log flags (except control) - same order as lfl
  • lfcs Set log control log flags - same order as lfc
  • lsts Set log interval (for timing info only)
  • lfci and 'sub lfc N' Get log flags for control 'lfc vel turn pos edge wall dist bal balvel balpos'
  • lfli and 'sub lfl N' Get log flags 'lfl mis acc gyro mag motref motv mota enc vel turnr pose line dist batt ex chirp'
  • lsti and 'sub lst N' Get log status 'lst interval rows rowsMax'

Control settings

  • rc P lv hv [b] Remote control P=0: off, P=1:manual, P>1: mission; lv=linear vel (m/s); hv = heading vel (ish); b=1 for balance
  • hm n Hard coded mission: n=1 balance 5s, n=2 square, n=3 wall, n=?
  • cvel params Set wheel velocity control
  • cveli and 'sub cvel N' Get params
  • ctrn params Set heading control
  • ctrni and 'sub ctrn N' Get params
  • cwve params Set front distance control
  • cwvei and 'sub cwve N' Get params
  • cwth params Set wall distance control
  • cwthi and 'sub cwth N' Get params
  • cpos params Set drive distance control
  • cposi and 'sub cpos N' Get params
  • cedg params Set edge follow control
  • cedgi and 'sub cedg N' Get params
  • cbal params Set balance angle control
  • cbali and 'sub cbal N' Get params
  • cbav params Set balance velocity control
  • cbavi and 'sub cbav N' Get params
  • cbap params Set balance drive position control
  • cbapi and 'sub cbap N' Get params
  • params: use kp iuse itau ilim Lfuse LfNum LfDen Lbuse LbNum LbDen preUse preNum preDen
  • preIuse preItau preIlim ffUse ffKp ffFuse ffFnum ffFden LimUse Lim

IMU help

  • gyroc Start gyro calibration (finished=1)
  • magcal Set magnetometer calibration values (offset[3] rotate/scale[9])
  • acccal Set accelerometer calibration values (offset[3] scale[3])
  • acccal2 make simple acceleration calibration with horizontal board
  • board rX rY rZ Set IMU board orientation angles (in radians)
  • gyroc Start gyro calibration (finished=1)
  • gyroi and 'sub gyro N' Get current gyro value as 'gyro gx gy gz' (deg/s)
  • gyrooi and 'sub gyroo N' Get gyro offset 'gyroo ox oy oz'
  • acci and 'sub acc N' Get accelerometer values 'acc ax ay az' (m/s^2)
  • accoi and 'sub acco N' Get accelerometer offset values 'acco xo yo zo' (m/s^2)
  • magi and 'sub mag N' Get magnetometer values 'mag mx my mz' (uT)
  • magwi and 'sub magw N' Get magnetometer raw values 'magw mx my mz' (uT)
  • magoi and 'sub mago N' Get magnetometer offset values 'mago xo yo zo r11 r12 r13 r21 ... r33' (uT)
  • imuposei and 'sub imupose N' Get IMU-based pose 'imupose roll pitch yaw (radians)
  • boardi and 'sub board N' Get orientation of IMU board (board rX rY rZ)

IR distance

  • play N Play melody number N to buzzer-pin
  • mutedi and 'sub muted N' Is sound muted (on 4.1 only)
  • soundi and 'sub sound N' Get current sound activity

Display

  • disp text Set a display line text
  • displayi and 'sub display N' Get current display text

USB host

  • usbhost A Set USB host as active or not A=1 is active
  • joyn A Notify on updates
  • joyc A Changes only

Bluetooth extra

BLE 4.0 CC2541HM-10

The modules in hand are version HMSoft V006 (from Arduino store). It seems like an old version, but I purchased it in December 2025!

See (some) data here: https://ardustore.dk/error/HC-10%20Datasheet.pdf. Some described functions are not implemented in this version; only those on this list are valid.

Command list: $ echo "bt4tx AT+HELP?" >/dev/ttyACM0

* *******************************************************************
* Command             Description           *
* ---------------------------------------------------------------- *
* AT                  Check if the command terminal work normally  *
* AT+RESET            Software reboot   *
* AT+VERS             Get firmware, bluetooth, HCI and LMP version *
* AT+HELP             List all the commands           *
* AT+NAME             Get/Set local device name                    *
* AT+PIN              Get/Set pin code for pairing                 *
* AT+BAUD             Get/Set baud rate                   *
* AT+LADDR            Get local bluetooth address   *
* AT+ADDR             Get local bluetooth address   *
* AT+DEFAULT          Restore factory default   *
* AT+RENEW            Restore factory default   *
* AT+STATE            Get current state   * 
* AT+PWRM             Get/Set power on mode(low power)    *
* AT+POWE             Get/Set RF transmit power    *
* AT+SLEEP            Sleep mode                    *
* AT+ROLE             Get/Set current role.                   *
* AT+PARI             Get/Set UART parity bit.                     *
* AT+STOP             Get/Set UART stop bit.                       *
* AT+INQ              Search slave model                           *
* AT+SHOW             Show the searched slave model.               *
* AT+CONN             Connect the index slave model.               *
* AT+IMME             System wait for command when power on.   *
* AT+START            System start working.   *
* AT+UUID             Get/Set system SERVER_UUID .               *
* AT+CHAR             Get/Set system CHAR_UUID .               *
* -----------------------------------------------------------------*
* Note: (M) = The command supports master mode only.            *

Mounted into Regbot 6.3 serial port

Cable

Regbot             Bluetool module (HC-10 or HC42)
nc                 State  (LED output)
4: 3.3V (black)    Vcc (3.3-5V)
1: GND  (Yellow)   Gnd
2: Rx   (White)    Tx
3: Tx   (Red)      Rx
nc                 key/break (break connection when grounded)

Test (HC-10)

  • bt4use 1 (enable Bluetooth, remember eew to save)
  • bt4br 115200 (set baudrate on the Regbot side)
  • bt4tx AT+BAUD? => OK+Get:4 (4=115200 bit/sec, 0=9600 bit/sec (default))
  • bt4tx AT+VERS? => HMSoft V006
  • bt4tx AT+ADDR? => OK+ADDR:=3CA308ABB420 (master)
  • bt4tx AT+ADDR? => OK+ADDR:=6CECEB430D96 (slave)
  • bt4tx AT+POWE? => OK+Get:3
  • bt4tx AT+ADVI? => OK+Get:0 (0=100ms, 8=1022ms, F=7000ms)
  • bt4tx AT+ROLE1 => OK+Set:1 (master (faster blink))
  • bt4tx AT+ROLE? => OK+Get:1 (master)
  • bt4tx AT+ROLE? => OK+Get:0 (slave)
  • bt4tx AT+IMME? => OK+Get:0 (0=start at boot, 1= wait for AT commands)
  • bt4tx AT+UUID? => OK+Get:0xFFE0
  • bt4tx AT+CHAR? => OK_Get:0xFFE1
  • bt4tx AT+CHAR\!AA77 => OK_Set:0xAA77
  • bt4tx AT+INQ\! => (master)
    Scanning...
    +INQ:1 0x6CECEB430D96   (the other BLE 4 device)
    +INQ:2 0x4CB9EA9BA5B3   (some other devices)
    +INQ:3 0xA4C1389482C1
    +INQ:4 0x28E6A923C915
    +INQE
  • bt4tx AT+INQ\! => (slave)
    ERROR:BLE_ROLE_PERIPHERAL   (slave is also called peripheral)
  • bt4tx AT+CONN1\! => +CONN:1 (and now connected/bound to first in INQ list, LED now steady)
  • bt4tx AT+RESET (on slave) => OK+RESET (and connection broke - sometimes)

Then, when sending characters (either way), nothing is received on the other end. Reason is unknown - gave up.

BT5 HC-42

Using nRF52832 sub-board.

No help list.

Experience

  • bt4br 9600 (default baudrate)
  • bt4tx AT+UART => OK+UART=9600
  • bt4tx AT+UART=115200 => OK+UART=115200
  • bt4br 115200
  • bt4tx AT+UART => OK+UART=115200
  • bt4tx AT+ADDR => OK+ADDR=CC:DD:9E:FC:54:55 (master)
  • bt4tx AT+ADDR => OK+ADDR=F4:27:53:3D:92:A9 (slave)
  • bt4tx AT+NAME => OK+NAME=HC-42