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
UUID,就是用来唯一识别一个特征值的ID.
handle,就是对应的attribute的一个句柄。
所有对特征值的操作,都是通过对UUID的搜索得到对应的handle之后,通过handle来操作特征值的。
添加新的特征值CHAR6
下面对主要几个文件进行修改
simpleGATTprofile.h文件添加以下定义
#define SIMPLEPROFILE_CHAR6
#define SIMPLEPROFILE_CHAR6_UUID
#define SIMPLEPROFILE_CHAR6_LEN
SIMPLEPROFILE_CHAR6
在simpleGATTprofile.c
1、
// 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)
/**************#define LO_UINT16(a)
2、
// Simple Profile Characteristic 6 Properties
static
// Characteristic 6 Value
static uint8simpleProfileChar6[SIMPLEPROFILE_CHAR6_LEN] = { 0, 0, 0, 0, 0 };
// Simple Profile Characteristic 6 User Description
static uint8 simpleProfileChar6UserDe
3、
static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED]
这里要把数组改为
#define SERVAPP_NUM_ATTR_SUPPORTED
simpleProfileAttrTbl表中,可读可写属性都是3个数组,只有char4的通知是4组,多了个// Characteristic 4 configuration
并把CHAR6添加进去
// Characteristic Value 6
能列出来了但是 点进去会报错,还没设置读写参数simpleProfile_WriteAttrCB,
simpleProfile_ReadAttrCB
4、设置参数函数
bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value )中:
//即修改SimpleProfile_SetParameter();函数
添加以下代码:
case SIMPLEPROFILE_CHAR6:
4、
在bStatus_tSimpleProfile_GetParameter( uint8 param, void *value )中添加:
case
break;
//读取simpleProfileChar6的值放到*value中,char1是单个字节读取,为
*((uint8*)value) = simpleProfileChar1;
·
·
每当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,
添加
添加单字节char7要在接char1或3后面,不能加break
在simpleProfile_WriteAttrCB()中添加(添加后发送过去就不会提示出错了)
(下面没用到)osal_memset为字符串集体赋同一数值
void
{
Return
}
if ( status == SUCCESS )
uint8 *pCurValue = (uint8 *)pAttr->pValue;
osal_memset(pCurValue, 0, SIMPLEPROFILE_CHAR6_LEN );
VOID osal_memcpy(pCurValue, pValue, SIMPLEPROFILE_CHAR6_LEN );
7 .在simpleBLEperipheral.c添加初始化值
在void SimpleBLEPeripheral_Init( uint8 task_id )函数中初始化参数
现在可以在手机设备中读取CHAR6的值为0x0102030405;
向char6写进0x3344556677
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 :
Click here
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
Features | nRF52805 | nRF52810 | nRF52811 | nRF52820 | nRF52832 | nRF52833 | nRF52840 | |
---|---|---|---|---|---|---|---|---|
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 supply voltage | 1.7 V to 5.5 V supply voltage
|
1.7 V to 5.5 V supply voltage
|
|
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 |
下载链接