SANTVEND: Add Bluetooth LE support
SANTVEND v1.2
BLE module: ISP091201
datasheet
This module is based on Nordic Semiconductor nRF8001 μBlue Bluetooth Low Energy Platform.
Product Specification
root@192:~# /opt/ltp/testcases/bin/spi -m 0x1,0x09 -r 9 /dev/spidev2.0
/dev/spidev2.0: spi mode 0x8, 8 bits (lsb first) per word, 5000000 Hz max
send 2 bytes: 01 09
response (9 bytes): 81 02 00 02 00 00 00 00 00
root@192:~# /opt/ltp/testcases/bin/spi -m 0x1,0x09 -r 9 /dev/spidev2.0
/dev/spidev2.0: spi mode 0x8, 8 bits (lsb first) per word, 5000000 Hz max
send 2 bytes: 01 09
response (9 bytes): 84 09 00 41 00 02 00 ff ff
root@192:~#
The return values are the same as the values returned in Jethro BSP (linux-imx-4.1.15).
SANTVEND v1.3
BLE module: Proteus-III-SPI
User manual
Read the chip type and OS version
root@localhost:~# /opt/ltp/testcases/bin/spi -m 0x02,0x10,0x01,0x00,0x0F,0x01C -r 12 /dev/spidev2.0
/dev/spidev2.0: spi mode 0x0, 8 bits per word, 5000000 Hz max
send 6 bytes: 02 10 01 00 0f 1c
response (12 bytes): 41 ff ff ff ff ff ff ff ff ff ff ff
root@localhost:~# /opt/ltp/testcases/bin/spi -m 0x02,0x10,0x01,0x00,0x0F,0x01C -r 12 /dev/spidev2.0
/dev/spidev2.0: spi mode 0x0, 8 bits per word, 5000000 Hz max
send 6 bytes: 02 10 01 00 0f 1c
response (12 bytes): 00 30 44 41 41 05 20 40 28 05 00 a9
root@localhost:~#
response (12 bytes): 00 30 44 41 41 05 20 40 28 05 00 a9
Chip ID = 0x00052840 (nRF52840)
Please note that LSB is transmitted first in case of parameters with more than 1 Byte length
Reset
To reset Bluetooth module, set GPIO line to low for 1 second:
root@localhost:~# gpiofind ble_reset
gpiochip5 5
root@localhost:~# gpioset 5 5=0; sleep 1; gpioset 5 5=1
root@localhost:~#
Edited by Dmitry Petrov