Inventek IWIN AT command software allows users to establish Wi-Fi and BLE connections for IoT projects using the IWIN AT command set.   Here is a example of BLE eS-WiFi Module AT Command running on our ISM4343-M4G-L54 eS-WiFi module based on the Cypress combo radio CYW4343.

 

This example covers usage of the AT Command Set to communicate using BLE on the eS-WiFi combo modules.  This feature is supported in Inventek IWIN AT command set firmware version 6.2 or greater.  Firmware version 6.x supports both synchronous and asynchronous mode.  The default and preferred mode of communication is synchronous.

 

Supported BLE Services and Characteristics

The Primary Service is:

             0000FF10-0000-1000-8000-00805F9B34FB

 

The Characteristic for Writing and Reading data is:

0000FF11-0000-1000-8000-00805F9B34FB

 

The advertise data is “ISM43XXX” along with the Primary Service.

The broadcast data is “ISM BLE SPP”

 

BLE AT Commands:

Turn the BLE Radio on or off, and bring up the BLE Stack using the JP at commands.

  1. JP=1 -> Turn on the BLE Radio and bring up the BLE Stack
  2. JP=0 -> Shutdown the BLE Radio. BLE Stack is active

Send Data Over BLE

          

JS=<number of bytes to send>, <ascii message to send>

Received Data Over BLE (Asynchronous Mode (JC=1))

Received data will be sent directly to the Console from the BLE Event Handler.  The data is bracket for easy parsing.

Example:

> [BLE   ] Rx Data

qwerty

>

Report Battery Level Over BLE

JB=<0 to 100> -> which is 0% to 100%

The Lightblue BLE app can be used for interacting with the ISM43341 BLE Radio

The advertise data is “ISM43340”, and the Primary Service. The broadcast data is “ISM BLE SPP”.  Also, currently only a single Primary Service and a single Characteristic is available.  The Characteristic can be used for both writing and reading of Bluetooth Data at up to 256 bytes per message.

 

BLE AT Commands:

 

Turn the BLE Radio on or off, and bring up the BLE Stack (JP)

 

JP=1 → Turn on the BLE Radio and bring up the BLE Stack

JP=0 → Shutdown the BLE Radio. BLE Stack will remain active

 

Send Data Over BLE (JS)

 

JS,<n>,<data> → Send at most <n> bytes of data. <n> can be 1 to 255 bytes.

 

Received Data Over BLE (JR - Synchronous Mode)

 

JR → Read available receive data up to 255 bytes from BLE receive buffer

JR,<n> → Read at most <n> bytes of data from the BLE receive buffer.

            <n> can be 1 to 255 bytes.

 

JA  → Returns the number of bytes available in the BLE receive buffer.

JE → Returns the last BLE receive buffer error.  0 = normal (no errors),

            -1 = overflow (possible data loss)

 

Report Battery Level Over BLE (JB)

 

JB=<0 to 100> → represent the reported battery level value of 0% to 100%.

 

Set BLE Receive Compatible Mode to BLE AT Commands (JC)

 

JC=0 → Set BLE to Synchronous Mode → Default Synchronous Mode

            (JA, JE, JR Supported only when JC=0)

 

JC=1 → Set BLE to Asynchronous Mode

            ([BLE ] Rx Data\r\n<BLE Data>\r\n>)

 

Set BLE GAP Name (J0)

 

J0=<GAP Name> → Default “ISM BLE SPP”

            <Gap Name> is limited to 11 characters

 

Set BLE Advertisement (J1)

 

J1=<Advertisement Name> → Default “ISM4343W” or “ISM4334X”

            <Advertisement Name> is limited to 8 characters

 

Set Product Manufacture Name (J2)

 

J2=<Manufacture Name> → Default “Inventek Systems, LLC”

            <Product Manufacture Name> is limited to 12 characters

 

Set Product Model Number (J3)

 

J3=<Model Number> → Default “ISM4343” or ISM43341”

            <Product Model Number> is limited to 16 characters

 

Set Product Serial Number (J4)

 

J4=<Product Serial Number>

            <Product Serial Number> is limited to 16 characters

 

Set Product Hardware Revision Number (J5)

 

J5=<Product Hardware Revision Number>

            <Product Hardware Revision Number> is limited to 12 characters

 

Set Product Firmware Revision Number (J6)

 

J6=<Product Firmware Revsions Number>

            <Product Firmware Revision Number> is limited to 12 characters

 

Set Product Software Revision Number (J7)

 

J7=<Product Software Revision Number>

            <Product Firmware Revision Number> is limited to 12 characters

 

BLE AT Commands List

 

? - Show Application Information

 

J0 - BT/BLE-Set Device Name <Limit 11 Chars>

J1 - BT/BLE-Set Advertisement Name <Limit 8 Chars>

J2 - BT/BLE-Set Manufacture Name <Limit 12 Chars>

J3 - BT/BLE-Set Model Number <Limit 16 Chars>    

J4 - BT/BLE-Set Serial Number <Limit 16 Chars>

J5 - BT/BLE-Set Hardware Version <Limit 12 Chars>

J6 - BT/BLE-Set Firmware Version <Limit 12 Chars>

J7 - BT/BLE-Set Software Version <Limit 12 Chars>

 

JA - BT/BLE-Return Available Receive Bytes

JB - BT/BLE-Report Battery Level

JC - BT/BLE-Async Read Mode0 = sync(JR), 1 = async

JE - BT/BLE-Return RX Last Error

 

JP - BT/BLE-Start/Stop Device

 

JR - BT/BLE-Receive Data up to 255 bytes, or JR, <1 to 255> bytes

JS - BT/BLE-Send Data, JS,<number bytes>,<data bytes to send>

 

J? - Show BT/BLE Settings

 

 

Teraterm Script Macro Example

 

; Set time out (seconds)

timeout = 30

 

setsync 1

;Get start time

gettime timestr1

 

; Configurate your BLE Setting

 

sendln 'J0=Broadcast'

wait 'OK' 'ERROR'

 

sendln 'J1=Corp Ad'

wait 'OK' 'ERROR'

 

sendln 'J2=Product'

wait 'OK' 'ERROR'

 

sendln 'J3=Model'

wait 'OK' 'ERROR'

 

sendln 'J4=Serial'

wait 'OK' 'ERROR'

 

sendln 'J5=Hardware'

wait 'OK' 'ERROR'

 

sendln 'J6=Firmware'

wait 'OK' 'ERROR'

 

sendln 'J7=Software'

wait 'OK' 'ERROR'

 

; Start BLE

sendln 'JP=1'

wait 'OK' 'ERROR'

 

;Send 4 Bytes

sendln 'JS=4,1234'

wait 'OK' 'ERROR'

 

; Jump to end

goto end

 

; Error

:error

sendln '***** Command Failed *****'

:end

 
Lightblue Testing Tool