2016年6月14日 星期二

Nordic NUS service


Compare to standard UUID 128 bit
The Bluetooth_Base_UUID is: 00000000-0000-1000-8000 00805F9B34FB
 TI base UUID of F000XXXX-0451-4000-B000-000000000000 where XXXX is the initial 16-bit UUID.
=============================================================================
#define NUS_BASE_UUID   {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}}
#define BLE_UUID_NUS_SERVICE   0x0001
#define BLE_UUID_NUS_TX_CHARACTERISTIC   0x0002
#define BLE_UUID_NUS_RX_CHARACTERISTIC   0x0003

#define GATT_MTU_SIZE_DEFAULT   23
Default MTU size. 
#define GATT_RX_MTU   23
Only the default MTU size of 23 is currently supported.

UUIDs used are:

  • 6E400001-B5A3-F393-E0A9-E50E24DCCA9E for the Service
  • 6E400002-B5A3-F393-E0A9-E50E24DCCA9E for the TX Characteristic Property = Write without response
  • 6E400003-B5A3-F393-E0A9-E50E24DCCA9E for the RX Characteristic Property = Notify

Information from Android App description, the notify setting is different from the nordic official doc.
The Bluetooth low energy shield is available from Seeed Studio and Maker Shed
UUIDs used are:
- 6E400001-B5A3-F393-E0A9-E50E24DCCA9E for the Service
- 6E400003-B5A3-F393-E0A9-E50E24DCCA9E for the TX Characteristic
Property = Notify (TX is from pheriperal site sent data to App)
- 6E400002-B5A3-F393-E0A9-E50E24DCCA9E for the RX Characteristic
Property = Write without response (RX is got data from App site)

#define BLE_NUS_MAX_DATA_LEN   (GATT_MTU_SIZE_DEFAULT - 3) ==> 23-3=20


UART configuration:
The application uses the following UART settings:
  • Baud rate: 38.400
  • 8 data bits
  • 1 stop bit
  • No parity
  • HW flow control: RTS/CTS

Notification:
ble_uart_c_rx_notif_enable
uint8_t rx_data[20];
#define SEC_PARAM_BOND 0 /**< Perform bonding. */ #define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**< No I/O capabilities. */

reference:
1. http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk51.v10.0.0%2Fble_sdk_app_nus_c.html&cp=4_0_1_4_2_0_3

2. Old doc
https://devzone.nordicsemi.com/documentation/nrf51/6.0.0/s110/html/a00066.html

3. App: nRF UART app

4. https://github.com/NordicSemiconductor/ble_app_uart_c_S120/commit/f2a82961aba22e3457a3bfdc1bcad3180121075f

5. Demo App from Youtube:
https://www.youtube.com/watch?v=pcuXUIP61IA

6. ANCS NUS code
https://github.com/NordicSemiconductor/nrf51-ble-ancs-nus/blob/master/nrf51-ble-ancs-nus/ble_nus.c


SEO - register your website (chinese)

Baidu web manager - http://zhanzhang.baidu.com
Bing Webmaster Tools - http://www.bing.com/toolbox/webmaster
Google search console - https://www.google.com/webmasters

2016年5月24日 星期二

oximeter - HR monitor concept note - Chinese

光學式心跳量測簡介(PPG, Photoplethysmography)

http://urclazz.blogspot.tw/2015/09/ppg-photoplethysmography.html

基于反射式原理的腕式血氧饱和度采集装置 Wrist Reflection-type Blood Oxygen Detector
http://oaps.lib.sjtu.edu.cn:8000/oaps/bitstream/123456789/334/1/2013-029-071.pdf



2016年5月23日 星期一

Install chromium on old PC

Chromium is open-source as like Chrome OS (closed).
We can't install Chrome OS now, could use Chromim to replace it.
1. Find old desktop or laptop and backup the files to avoid install erasing the files on your device.
2. Download ChromeOS build version, you could refer below link I found from Internet.
3. Download Win32diskimage tool, use this tool could select build Chromium image to write to USB disk.
4. Set up boot sequence to let USB disk priority high then plug in USB and reboot system.
5. After boot up, the system will go into Chromium mode. That could let you install Chromium OS on your device.


links:-
ChromeOs daily builds
http://chromium.arnoldthebat.co.uk/

Win32diskimager:
http://sourceforge.net/projects/win32...

Nordic nRF51 development tutorial

Setting up an example project on the nRF51 DK
https://devzone.nordicsemi.com/tutorials/2/
 nRFgo Studio --> Program software device / program application

Testing and using a simple BLE application
https://devzone.nordicsemi.com/tutorials/4/

BLE Advertising, a beginner's tutorial
https://devzone.nordicsemi.com/tutorials/5

Debugging with Real Time Terminal
https://devzone.nordicsemi.com/tutorials/6/

Development with GCC and Eclipse
https://devzone.nordicsemi.com/tutorials/7/

BLE Services, a beginner's tutorial
https://devzone.nordicsemi.com/tutorials/8/

Setting up device firmware update(DFU) on the nRF51 DK
https://devzone.nordicsemi.com/tutorials/9/

The below information is from Nordic, good reference.
https://devzone.nordicsemi.com/tutorials/

Tutorials

Here you can find tutorials written by Nordic employees. If you have a question about or feedback on a tutorial, please ask a question in the questions section and link to the relevant tutorial.
We are regularly adding new tutorials and will try to cover as many areas as possible. Please give us feedback on which topics you are missing here.
Also have a look at the videos on our Youtube channel.

Getting Started

Covers topics on how to get started.

Bluetooth Low Energy

Covers different features of BLE, and how to implement these features with the SoftDevice.

Software Development Kit

Covers examples, libraries and hardware drivers in our SDK.

Hardware and layout

Covers hardware related topics and guidelines for layout.

Design Examples

Covers how to implement different use cases with the nRF52

IPX - content (Chinese)

http://blog.xuite.net/kiwishih/bloglife/20649195-%E6%88%B6%E5%A4%96%E4%BC%91%E9%96%92%E6%96%B0%E7%9F%A5+-+IPX+%E9%98%B2%E6%B0%B4%E5%AE%9A%E7%BE%A9

2016年5月13日 星期五

Google search tips

https://support.google.com/websearch/answer/2466433?hl=en
Every day I use Google to find information, research and study the new thing. Until now I found the good tips for improve your searching result. If you are like me using Google search every day, recommend you to read about this tip.
For me, I learn about $, -, * symbols, :site.

SymbolHow to use it
+
Search for Google+ pages or blood types
Examples: +Chrome or  AB+
@Find social tags
Example: @agoogler
$Find prices
Example: nikon $400
#
Find popular hashtags for trending topics
Example: #throwbackthursday
-When you use a dash before a word or site, it excludes sites with that info from your results. This is useful for words with multiple meanings, like Jaguar the car brand and jaguar the animal.
Examples: jaguar speed -car or pandas -site:wikipedia.org
"When you put a word or phrase in quotes, the results will only include pages with the same words in the same order as the ones inside the quotes. Only use this if you're looking for an exact word or phrase, otherwise you'll exclude many helpful results by mistake.
Example: "imagine all the people"
*Add an asterisk as a placeholder for any unknown or wildcard terms. .
Example: "a * saved is a * earned"
..Separate numbers by two periods without spaces to see results that contain numbers in a range.
Example: camera $50..$100
OperatorHow to use it
site:Get results from certain sites or domains.
Examples: olympics site:nbc.com and olympics site:.gov
related:Find sites that are similar to a web address you already know.
Example: related:time.com
ORFind pages that might use one of several words.
Example: marathon OR race
info:Get information about a web address, including the cached version of the page, similar pages, and pages that link to the site.
Example: info:google.com
cache:See what a page looks like the last time Google visited the site.
Example: cache:washington.edu