Skip to content

HiHope HH-D03 AT Usage

Device Information

  • Device Model: HiHope HH-D03
  • Main Control Chip: WS63
  • Supports BLE 5.3 + BLE Mesh + SLE 1.0
  • Onboard User Button + Reset Button + Type-C Interface + CH340C Serial Port + Voltage Regulator + Two Indicator Lights + NearLink Module and Module Built-in Antenna

HiHope AT Command Usage Tutorial

Device BLE Server Configuration

  1. Enable Bluetooth

    Terminal window
    AT+BLEENABLE

    Enable Bluetooth

  2. Set Bluetooth Address

    Terminal window
    AT+BLESETADDR=0,0x112233445566

    Set Bluetooth Address

  3. Register Server Callback Function

    Terminal window
    AT+GATTSREGCBK

    Register Server Callback Function

  4. Create a GATTServer

    Terminal window
    AT+GATTSREGSRV=0x1122

    Create a GATTServer

  5. Add a GATT Service

    Terminal window
    AT+GATTSSYNCADDSERV=1,0x1122,1

    Add a GATT Service

  6. Add a Characteristic to the Service

    Terminal window
    AT+GATTSSYNCADDCHAR=1,14,0x2a4a,0x03,0,1,0x01

    Add a Characteristic to the Service

  7. Add a Descriptor to the Characteristic

    Terminal window
    AT+GATTSSYNCADDDESCR=1,14,0x2a4a,0x03,1,0x02

    Add a Descriptor to the Characteristic

  8. Start the Service

    Terminal window
    AT+GATTSSTARTSERV=1,14

    Start the Service

  9. Set BLE Advertisement Data

    Terminal window
    AT+BLESETADVDATA=6,0x112233445566,0,0,1

    Set BLE Advertisement Data

  10. Set BLE Advertisement Parameters

    Terminal window
    AT+BLESETADVPAR=48,48,0,0x000000000000,0,0x000000000000,7,0,1,0,1

    Set BLE Advertisement Parameters

  11. Start BLE Advertisement

    Terminal window
    AT+BLESTARTADV=1

    Start BLE Advertisement

Device BLE Client Configuration

  1. Enable Bluetooth

    Terminal window
    AT+BLEENABLE

    Enable Bluetooth

  2. Set Bluetooth Address

    Terminal window
    AT+BLESETADDR=0,0x112233445577

    Set Bluetooth Address

  3. Register Client Callback Function

    Terminal window
    AT+GATTCREGCBK

    Register Client Callback Function

  4. Create a GATTClient

    Terminal window
    AT+GATTCREG=0x3434

    Create a GATTClient

  5. Set BLE Scan Parameters

    Terminal window
    AT+BLESETSCANPAR=0x48,0x48,0,1,0

    Set BLE Scan Parameters

  6. Connect to Server

    Terminal window
    AT+BLECONN=0,0x112233445566

    Connect to Server

  7. Pair with Server

    Terminal window
    AT+BLEPAIR=0,0x112233445566

    Pair with Server

  8. Get Paired Device Information

    Terminal window
    AT+BLEGETPAIREDDEV

    Get Paired Device Information

  9. Discover Services

    Terminal window
    AT+GATTCFNDSERV=1,0,0x1122

    Discover Services

BLE Communication Test

  1. Client Sends Write Request

    Terminal window
    AT+GATTCWRITEREQ=1,0,17,1,0x11

    Client Sends Message to Server

  2. Server Prints Received Data, If Successful, Indicates Normal Communication!

    Terminal window
    [GATTServer]WriteReqReceiveCallback--server_id:1 conn_id:0
    request_id:3 handle:17 offset:0 need_authorize:0 need_rsp:1 is_prep:0
    data_len:1 data:
    11
    status:0

Video Tutorial

HiHope HH-D03 BLE Demo