Blue Star

Blue Star

Self-portrait,anti-lost,anti-theft,voice recording device:

Product

Itag is a kind of bluetooth 4.0 low energy products which works through a Itracing App.Itag can chain user's easy-lost & valuable belongs together and works with smart phone to prevent lost.

Itag is also a remote control of your smart phone camera for self-portrait.

Itag can also provide a last seen pin-drop on map to help you recover your items and search your cars in parking site.

Specification:

Bluetooth version:Bluetooth 4.0 low energy consumption

Compatible device:iphone 4S/5/5S/5C/6/6Plus/6C, Ipad Mini, Itouch5,Ipad 3/4 adn android system,Bluetooth 4.0 smart phone(Android 4.3 version and upgrade version)

Working distance:<10 m(outdoor environment)

Battery:CR2032 Lithium Coin Battery,Last about half a year.

Package

User Manual

 

 

simplegattprofile

 

UUID,就是用来唯一识别一个特征值的ID.

handle,就是对应的attribute的一个句柄。

所有对特征值的操作,都是通过对UUID的搜索得到对应的handle之后,通过handle来操作特征值的。

 

添加新的特征值CHAR6

下面对主要几个文件进行修改

simpleGATTprofile.h文件添加以下定义

#define SIMPLEPROFILE_CHAR6                  5

#define SIMPLEPROFILE_CHAR6_UUID           0xFFF6

#define SIMPLEPROFILE_CHAR6_LEN          5(单字节没这句)

 

 

SIMPLEPROFILE_CHAR6 全大写case参数用到case SIMPLEPROFILE_CHAR6

SIMPLEPROFILE CHAR6

 

simpleGATTprofile.c

1、  添加特征值UUID

 

// Characteristic 6 UUID: 0xFFF6

CONST uint8 simpleProfilechar6UUID[ATT_BT_UUID_SIZE] =

LO_UINT16(SIMPLEPROFILE_CHAR6_UUID),   //低八位

HI_UINT16(SIMPLEPROFILE_CHAR6_UUID) }; //高八位

 

/**************#define HI_UINT16(a)   (((a) >> 8) & 0xFF)*******

/**************#define LO_UINT16(a)  ((a) & 0xFF)*******

 

SIMPLEPROFILE CHAR6 uuid

2、  设置属性    

 

// Simple Profile Characteristic 6 Properties 可读可写(声明而已,只是能让lightblue在列表中显示为可读可写或通知,真正要改在属性表那里改。Props= PropertiesDesp=Description

 

static uint8 simpleProfileChar6Props GATT_PROP_READ | GATT_PROP_WRITE;

 

// Characteristic 6 Value   // simpleProfileChar6是个5位数组,接收数据后存在这

static uint8simpleProfileChar6[SIMPLEPROFILE_CHAR6_LEN] = { 0, 0, 0, 0, 0 };

 

// Simple Profile Characteristic 6 User Description

static uint8 simpleProfileChar6UserDesp[17] = "Characteristic 6\0";

                                                                                                                           

4

3、  属性表 Profile Attributes - Table最重要,添加了这个才会在lightblue中列表出来

 

static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED]

这里要把数组改为

#define SERVAPP_NUM_ATTR_SUPPORTED       20 原来是17

                                     //添加了3组结构体数组CHAR6

simpleProfileAttrTbl表中,可读可写属性都是3个数组,只有char4的通知是4组,多了个// Characteristic 4 configuration

 

5

并把CHAR6添加进去

 // Characteristic 6 Declaration (声明,没加这个lightblue属性表找不到)

   {

     { ATT_BT_UUID_SIZE, characterUUID },

     GATT_PERMIT_READ,

     0,

     &simpleProfileChar6Props

   },

// Characteristic Value 6   (特征值)!!!

     

       { ATT_BT_UUID_SIZE, simpleProfilechar6UUID },

       GATT_PERMIT_READ | GATT_PERMIT_WRITE,  //设置可读可写

       0, 

       simpleProfileChar6 //由于值是5位数组,不用&,一个字节就用

     },

 // Characteristic 6 User Description  //描述

     

       { ATT_BT_UUID_SIZE, charUserDescUUID },

       GATT_PERMIT_READ, 

       0, 

       simpleProfileChar6UserDesp 

     },

 

6

能列出来了但是 点进去会报错,还没设置读写参数simpleProfile_WriteAttrCB, 

simpleProfile_ReadAttrCB

 

 

4、设置参数函数 SimpleProfile_SetParameter函数

 

 

bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value )中:

//即修改SimpleProfile_SetParameter();函数

7

 

 

添加以下代码:

case SIMPLEPROFILE_CHAR6:

     if ( len == SIMPLEPROFILE_CHAR6_LEN ) //特征值赋值到数组

     {

       VOID osal_memcpy(simpleProfileChar6, value, SIMPLEPROFILE_CHAR6_LEN );

 //把要改写的数据写到simpleProfileChar6数组来

     }

     else

     {

       ret = bleInvalidRange;

     }

     break;

 

 

8

 

4、  获取参数函数 {SimpleProfile_GetParameterUUID,获取到的值)函数}

                 实际上就是把被新进的值simpleProfileChar6放进value数组

 

bStatus_tSimpleProfile_GetParameter( uint8 param, void *value )中添加:

 

case SIMPLEPROFILE_CHAR6:

     VOID osal_memcpy( value, simpleProfileChar6, SIMPLEPROFILE_CHAR6_LEN );

break;

 

//读取simpleProfileChar6的值放到*value中,char1是单个字节读取,为

*((uint8*)value) = simpleProfileChar1;

9

 

·        6、读写特征值函数2个回调函数

·        这个两个是注册到GATT层的回调函数,GATT初始化的时候注册的.这部分代码封装在库里面.

每当GATT层有数据发过来的时候,会调用simpleProfile_WriteAttrCB, 

每当GATT层收到对方读取数据请求的时候,会调用simpleProfile_ReadAttrCB

这两个函数包含在gattServiceCBs_t类型的结构体里CONST gattServiceCBs_t simpleProfileCBs

simpleProfile_ReadAttrCB

这个设置后就能在lightblue里读出值,值为

simpleProfileChar6[SIMPLEPROFILE_CHAR6_LEN]={数组的数值(16进制显示)}

 

simpleProfile_WriteAttrCB

读取被写进去的值

 

 

 

static uint8 simpleProfile_ReadAttrCB( uint16 connHandle,

                                      gattAttribute_t *pAttr,

                                      uint8 *pValue,  

                                      uint8 *pLen, 

                                      uint16 offset, 

                                      uint8 maxLen )中:

添加 case SIMPLEPROFILE_CHAR6_UUID:

       *pLen = SIMPLEPROFILE_CHAR6_LEN;

       VOID osal_memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR6_LEN );

      break;        //读:pAttr->pValue的内容复制到pValue

      

10

添加单字节char7要在接char13后面,不能加break

11

 

simpleProfile_WriteAttrCB()中添加(添加后发送过去就不会提示出错了)

 case SIMPLEPROFILE_CHAR6_UUID: 

           //Validate the value检测输入数据是否合法

       // Make sure it's not a blob oper

       if ( offset == 0 )//是第一字节

       {

         if ( len != SIMPLEPROFILE_CHAR6_LEN )

         {

           status = ATT_ERR_INVALID_VALUE_SIZE;

         }//若输入长度不对,status

       }

       else

       {

         status = ATT_ERR_ATTR_NOT_LONG;//不是第一字节

       }

    //Write the value一开始定义了status == SUCCESS,若上述条件不符,不会运行到这里。osal_memcpy(目的A,源地址B,长度)复制B内容到A

 

       if ( status == SUCCESS )

        

       VOID osal_memcpy( pAttr->pValue, pValue, SIMPLEPROFILE_CHAR6_LEN );

       notifyApp = SIMPLEPROFILE_CHAR6;

         //写:pValue的内容复制到pAttr->pValue(别弄反了)

       break;

 

 

(下面没用到)osal_memset为字符串集体赋同一数值 return目的存储区地址

void *osal_memset(void *dest, uint8 value , intlen)

{

Return memset(dest,value,len);

}

 

if ( status == SUCCESS )

        

uint8 *pCurValue = (uint8 *)pAttr->pValue;

osal_memset(pCurValue, 0, SIMPLEPROFILE_CHAR6_LEN );

                                         //为新数组pCurValue赋值N0

VOID osal_memcpy(pCurValue, pValue, SIMPLEPROFILE_CHAR6_LEN );

                                   //复制pValue内容到新数组pCurValue                notifyApp = SIMPLEPROFILE_CHAR6;                                                                                           

 }

 break;

 

12

 

7 .simpleBLEperipheral.c添加初始化值

 

void SimpleBLEPeripheral_Init( uint8 task_id )函数中初始化参数

13

 

现在可以在手机设备中读取CHAR6的值为0x0102030405

char6写进0x3344556677 再读取值已经改写为0x3344556677

Wednesday, 12 August 2020 11:50

talent recruitment

Recruit website editors and business development elites.

General Electrical Specification

Absolute Maximum Ratings:  

Ratings  Min.  Max. 
Storage Temperature  -40 +85
Supply Voltage (VCHG)  -0.4V  5.75V 
Supply Voltage (VREG_ENABLE,VBAT_SENSE)  -0.4V  4.2V 
Supply Voltage (LED[2:0])  -0.4V  4.4V 
Supply Voltage (PIO_POWER)  -0.4V  3.6V 

Recommended Operating Condition:

Operating Temperature range  -20 +75
Supply Voltage (VBAT)  2.7V  4.25V 
Supply Voltage (VCHG)  4.75V / 3.10 V  5.25V 
Supply Voltage (VREG_ENABLE,VBAT_SENSE)  0V  4.2V 
Supply Voltage (LED[2:0])  1.10V  4.25V 
Supply Voltage (PIO_POWER)*  1.7V  3.6V

1.8V Switch-mode Regulator :

 

 

 

 

 

 

 

Saturday, 08 August 2015 20:37

Bluetooth controlled BLE RGB LED light strip

Click here

Undersea rescue system based on bionic stretchable nanogenerator.
 
Photograph of undersea rescue system which included (a) integrated energy harvesting diving suit, (b) integrated wireless transmitter and (c) wireless receiver integrated with a red warning light. d Simple circuit diagram of undersea rescue system. e Voltage changes of a 100 μF capacitor charged by BSNG and used to power a wireless transmitter to emit a trigger signal. f Physical map of undersea rescue system sending an alert when swimmer in danger (red LED was lighted up remotely)
 

The nRF52 Series of System-on-Chip (SoC) devices embed a powerful yet low-power Arm® Cortex®-M4 processor with our industry leading 2.4 GHz RF transceivers. In combination with the very flexible orthogonal power management system, and a programmable peripheral interconnect (PPI) event system, the nRF52 Series enables you to make ultra-low power wireless solutions.

The nRF52 Series offers pin-compatible device options for Bluetooth® Low Energy, proprietary 2.4 GHz, and ANT™ solutions giving you the freedom to develop your wireless system using the technology that suits your application the best. Our unique memory and hardware resource protection system allows you to develop applications on devices with embedded protocol stacks running on the same processor without any need to link in the stack or strenuous testing to avoid application and stack from interfering with each other.

nRF52 Series IC comparison

FeaturesnRF52805nRF52810nRF52811nRF52820nRF52832nRF52833nRF52840
CPU Cortex-M4 Cortex-M4 Cortex-M4 Cortex-M4 Cortex-M4 with FPU Cortex-M4 with FPU Cortex-M4 with FPU
64 MHz 64 MHz 64 MHz 64 MHz 64 MHz 64 MHz 64 MHz
 
Memory 192 kB flash 192 kB flash 192 kB flash 256 kB flash 512/256 kB flash 512 kB flash 1 MB flash
- - - - Cache Cache Cache
24 kB RAM 24 kB RAM 24 kB RAM 32 kB RAM 64/32 kB RAM 128 kB RAM 256 kB RAM
 
EasyDMA MAXCNT bit length I2S - - - - 14 14 14
PDM - 15 15 - 15 15 15
PWM - 15 15 - 15 15 15
RADIO 8 8 8 8 8 8 8
SAADC - 15 15 - 15 15 15
SPIM 14 10 14 15 8 16 16
SPIS 14 10 14 15 8 16 16
TWIM 14 10 14 15 8 16 16
TWIS 14 10 14 15 8 16 16
UARTE 10 10 10 15 8 16 16
NFCT - - - - 9 9 9
USBD - - - 7 - 7 7
QSPI - - - - - - 20
 
Crypto AES engine AES engine AES engine AES engine AES engine AES engine AES engine
- - - - - - CryptoCell™310
 
Radio Protocols Bluetooth Low Energy/ANT/2.4 GHz Bluetooth Low Energy/ANT/2.4 GHz Bluetooth Low Energy/ANT/2.4 GHz/IEEE 802.15.4 Bluetooth Low Energy/Bluetooth mesh/Thread/ Zigbee/ANT/2.4 GHz/IEEE 802.15.4 Bluetooth Low Energy/Bluetooth mesh/ANT/2.4 GHz Bluetooth Low Energy/Bluetooth mesh/Thread/ Zigbee/ANT/2.4 GHz/IEEE 802.15.4 Bluetooth Low Energy/Bluetooth mesh/Thread/ Zigbee/ANT/2.4 GHz/IEEE 802.15.4
Bluetooth 5 PHYs 2 Mbps 2 Mbps 2 Mbps/Long range 2 Mbps/Long range 2 Mbps 2 Mbps/Long range 2 Mbps/Long range
Bluetooth 5.1 support - - Yes Yes - Yes -
Output power +4 dBm +4 dBm +4 dBm +8 dBm +4 dBm +8 dBm +8 dBm
Sensitivity -97 dBm (Bluetooth 1 Mbps) -96 dBm (Bluetooth 1 Mbps) -97 dBm (Bluetooth 1 Mbps) -95 dBm (Bluetooth Low Energy 1 Mbps) -96 dBm (Bluetooth Low Energy 1 Mbps) -95 dBm (Bluetooth Low Energy 1 Mbps) -95 dBm (Bluetooth Low Energy 1 Mbps)
 
Clock 32 MHz crystal 32 MHz crystal 32 MHz crystal 32 MHz crystal 32 MHz crystal 32 MHz crystal 32 MHz crystal
64 MHz on chip (PLL) 64 MHz on chip (PLL) 64 MHz on chip (PLL) 64 MHz on chip (PLL) 64 MHz on chip (PLL) 64 MHz on chip (PLL) 64 MHz on chip (PLL)
32.768 kHz crystal (optional) 32.768 kHz crystal (optional) 32.768 kHz crystal (optional) 32.768 kHz crystal (optional) 32.768 kHz crystal (optional) 32.768 kHz crystal (optional) 32.768 kHz crystal (optional)
32.768 kHz on-chip RC 32.768 kHz on-chip RC 32.768 kHz on-chip RC 32.768 kHz on-chip RC 32.768 kHz on-chip RC 32.768 kHz on-chip RC 32.768 kHz on-chip RC
External 32.768 kHz clock External 32.768 kHz clock External 32.768 kHz clock External 32.768 kHz clock External 32.768 kHz clock External 32.768 kHz clock External 32.768 kHz clock
 
Power management 1.7 V to 3.6 V supply voltage 1.7 V to 3.6 V supply voltage 1.7 V to 3.6 V supply voltage 1.7 V to 5.5 V supply voltage
  • 1.7 V to 3.6 V (VDD)
  • 2.5 V to 5.5 V (VDDH)
1.7 V to 3.6 V supply voltage 1.7 V to 5.5 V supply voltage
  • 1.7 V to 3.6 V (VDD)
  • 2.5 V to 5.5 V (VDDH)
1.7 V to 5.5 V supply voltage
  • 1.7 V to 3.6 V (VDD)
  • 2.5 V to 5.5 V (VDDH)
1 stage LDO and DC/DC 1 stage LDO and DC/DC 1 stage LDO and DC/DC 2 stage regulator LDO for high voltage and DC/DC or LDO for low voltage 1 stage LDO and DC/DC 2 stage regulator LDO for high voltage and DC/DC or LDO for low voltage 2 stage LDO and DC/DC
- - - On-chip VBUS 3.3 V reg - On-chip VBUS 3.3 V reg On-chip VBUS 3.3 V reg
- - - - - - Regulated supply for external components
 
Digital interfaces 1 × SPI master and slave 1 × SPI master and slave 2 × SPI master and slave 2 × SPI master and slave 3 × SPI master and slave 4 × SPI master and 3 × SPI slave 4 × SPI master and 3 × SPI slave
1 × TWI master and slave 1 × TWI master and slave 1 × TWI master and slave 2 × TWI master and slave 2 × TWI master and slave 2 × TWI master and slave 2 × TWI master and slave
1 × UARTE 1 × UARTE 1 × UARTE 1 × UARTE 1 × UARTE or UART 2 × UARTE 2 × UARTE
- 1 × PWM 1 × PWM - 3 × PWM 4 × PWM 4 × PWM
- QDEC QDEC QDEC QDEC QDEC QDEC
- PDM PDM - PDM PDM PDM
- - - - I2S I2S I2S
- - - 1 × USB Full-speed device - 1 × USB Full-speed device 1 × USB Full-speed device
- - - - - 1 × high-speed SPI master 1 × high-speed SPI master
- - - - - - 1 × Quad SPI (w.XIP)
 
Analog interfaces - 64-level analog comp 64-level analog comp 64-level analog comp 64-level analog comp 64-level analog comp 64-level analog comp
- - - - 15-level low-power comp 15-level low-power comp 15-level low-power comp
2-channel 12-bit ADC 8-channel 12-bit ADC 8-channel 12-bit ADC - 8-channel 12-bit ADC 8-channel 12-bit ADC 8-channel 12-bit ADC
- - - - NFC Tag NFC Tag NFC Tag
True Random Number Generator True Random Number Generator True Random Number Generator True Random Number Generator True Random Number Generator True Random Number Generator True Random Number Generator
Temperature sensor Temperature sensor Temperature sensor Temperature sensor Temperature sensor Temperature sensor Temperature sensor
 
Timers 3 × 32-bit 16 MHz timers 3 × 32-bit 16 MHz timers 3 × 32-bit 16 MHz timers 4 × 32-bit 16 MHz timers 5 × 32-bit 16 MHz timers 5 × 32-bit 16 MHz timers 5 × 32-bit 16 MHz timers
2 × 32.768 kHz RTC 2 × 32.768 kHz RTC 2 × 32.768 kHz RTC 2 × 32.768 kHz RTC 3 × 32.768 kHz RTC 3 × 32.768 kHz RTC 3 × 32.768 kHz RTC
Watchdog timer (32.768 kHz) Watchdog timer (32.768 kHz) Watchdog timer (32.768 kHz) Watchdog timer (32.768 kHz) Watchdog timer (32.768 kHz) Watchdog timer (32.768 kHz) Watchdog timer (32.768 kHz)
 
Other interfaces SWI debug interface SWI debug interface SWI debug interface SWI debug interface SWI debug interface SWI debug interface SWI debug interface
 
PPI 10 programmable channels 20 programmable channels 20 programmable channels 20 programmable channels 20 programmable channels 20 programmable channels 20 programmable channels
12 fixed channels 12 fixed channels 12 fixed channels 12 fixed channels 12 fixed channels 12 fixed channels 12 fixed channels
6 channel groups 6 channel groups 6 channel groups 6 channel groups 6 channel groups 6 channel groups 6 channel groups
 
Other features BPROT BPROT BPROT BPROT BPROT ACL ACL
6 × SWI 6 × SWI 6 × SWI 6 × SWI 6 × SWI 6 × SWI 6 × SWI
2 × EGU 2 × EGU 2 × EGU 6 × EGU 6 × EGU 6 × EGU 6 × EGU
- - - - MWU MWU MWU
 
Power fail Power fail comparator and brownout Power fail comparator and brownout Power fail comparator and brownout Power fail comparator and brownout Power fail comparator and brownout Power fail comparator and brownout Power fail comparator and brownout
 
GPIO Up to 10 pins Up to 32 pins Up to 32 pins Up to 18 pins Up to 32 pins Up to 42 pins Up to 48 pins
8 × GPIOTEs channels 8 × GPIOTEs channels 8 × GPIOTEs channels 8 × GPIOTEs channels 8 × GPIOTEs channels 8 × GPIOTEs channels 8 × GPIOTEs channels
 
Packages - 6 × 6 QFN48 w/32 GPIOs 6 × 6 QFN48 w/32 GPIOs - 6 × 6 QFN48 w/32 GPIOs 7 × 7 AQFN73 w/42 GPIOs 7 × 7 AQFN73 w/48 GPIOs
- 5 × 5 QFN32 w/17 GPIOs 5 × 5 QFN32 w/17 GPIOs 5 × 5 QFN40 w/18 GPIOs and USB - 5 × 5 QFN40 w/18 GPIOs & USB -
2.5 × 2.5 WLCSP w/10 GPIOs 2.5 × 2.5 WLCSP w/15 GPIOs 2.5 × 2.5 WLCSP w/15 GPIOs - 3.0 × 3.2 WLCSP w/32 GPIOs & USB 3.2 × 3.2 WLCSP w/42 GPIOs & USB 3.5 × 3.5 WLCSP w/48 GPIOs
 
Temperature -40 to 85°C -40 to 85°C -40 to 85°C -40 to 105°C -40 to 85°C -40 to 105°C -40 to 85°C
Friday, 21 August 2020 21:27

Nordic S113 SoftDevice

Memory-optimized Peripheral-only Bluetooth Low Energy protocol stack
The S113 SoftDevice is a Bluetooth® Low Energy peripheral protocol stack solution. It supports up to four peripheral connections with an additional broadcaster role running concurrently. The S113 SoftDevice integrates a Bluetooth Low Energy Controller and Host, and provides a full and flexible API for building Bluetooth Low Energy Nordic nRF52 System on Chip solutions.
SoftDevice S113 is a memory-optimized Bluetooth® Low Energy protocol stack for the Nordic nRF52805, nRF52810, nRF52811, nRF52820, nRF52832, nRF52833 and nRF52840 System-on-Chips (SoCs). It is Bluetooth 5.1 qualified and supports the following Bluetooth features: high-throughput 2 Mbps and channel selection algorithm 2 (CSA #2). The number of connections and bandwidth per connection are configurable, offering memory and performance optimization.
It is a complete stack with GAP, GATT, ATT, SM and Link Layer. Both GATT Server and Client are supported. The broad feature set also includes Privacy 1.2, LE Data Packet Length Extension, L2CAP connection-oriented channels, configurable ATT MTU and LE Secure Connections.
 
脱离枯燥的理论来感受ISO15765-4协议
Monday, 04 May 2020 17:19

ISO 15765 协议下载

下载链接