element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Not able to read and write on smart watch
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 1 reply
  • Subscribers 664 subscribers
  • Views 1533 views
  • Users 0 members are here
  • raspberry-pi3
  • gatttool
  • raspberry_pi_space
  • blutooth
  • rasperry-pi
Related

Not able to read and write on smart watch

Former Member
Former Member over 9 years ago

Hi All,

 

I am new to this bluetooth communication world. I need to communicate with a smart watch via bluetooth on raspberry Pi3. I am able to connect smart band with gatttool but if I tried to read data it is giving me error. The error command code is as per the manufacturer document. As per manufacturer document below are the service , TX and RX uuids.

 

Service UUID: 0xFFF0

Feature UUID:
TX UUID:0xFFF6
RX UUID
:
0xFFF7

 

As per my understanding TX uuid will help me to write command onto smart band and I will be able to read data from RX uuid.

 

Below are logs

 

---------------------------------

sudo hcitool lescan

LE Scan ...

DC:CB:35:FC:FB:3F (unknown)

DC:CB:35:FC:FB:3F Avia Touch FCFB3F

C5:12:95:DF:E5:8D (unknown)

C5:12:95:DF:E5:8D Kontakt

FB:5D:13:22:59:24 (unknown)

FB:5D:13:22:59:24 Kontakt

C5:2F:F0:F3:E7:BA (unknown)

C5:2F:F0:F3:E7:BA device 1

F2:D5:CA:8E:08:A4 (unknown)

F2:D5:CA:8E:08:A4 Kontakt

F4:B8:5E:BC:2E:AA (unknown)

F4:B8:5E:BC:2E:AA Sana

^Cpi@raspberrypi:~ $ sudo hcitool inq

Inquiring ...

  B0:05:94:F5:FB:0C clock offset: 0x7f71 class: 0x3e010c

  CC:AF:78:EF:51:DF clock offset: 0x4030 class: 0x3e010c

pi@raspberrypi:~ $ sudo hcidump

HCI sniffer - Bluetooth packet analyzer ver 5.41

device: hci0 snap_len: 1500 filter: 0xffffffff

^X^Cpi@raspberrypi:~ $ gatttool -I F4:B8:5E:BC:2E:AA

[                 ][LE]> connect

Error: Remote Bluetooth address required

[                 ][LE]> connect F4:B8:5E:BC:2E:AA

Attempting to connect to F4:B8:5E:BC:2E:AA

Error: connect error: Transport endpoint is not connected (107)

[F4:B8:5E:BC:2E:AA][LE]> connect F4:B8:5E:BC:2E:AA

Attempting to connect to F4:B8:5E:BC:2E:AA

Connection successful

[F4:B8:5E:BC:2E:AA][LE]> primary

attr handle: 0x0001, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb

attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb

attr handle: 0x0010, end grp handle: 0x0022 uuid: 0000180a-0000-1000-8000-00805f9b34fb

attr handle: 0x0023, end grp handle: 0xffff uuid: 0000fff0-0000-1000-8000-00805f9b34fb

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 0000fff0

[F4:B8:5E:BC:2E:AA][LE]> characteristics

handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb

handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb

handle: 0x0006, char properties: 0x02, char value handle: 0x0007, uuid: 00002a02-0000-1000-8000-00805f9b34fb

handle: 0x0008, char properties: 0x08, char value handle: 0x0009, uuid: 00002a03-0000-1000-8000-00805f9b34fb

handle: 0x000a, char properties: 0x02, char value handle: 0x000b, uuid: 00002a04-0000-1000-8000-00805f9b34fb

handle: 0x000d, char properties: 0x20, char value handle: 0x000e, uuid: 00002a05-0000-1000-8000-00805f9b34fb

handle: 0x0011, char properties: 0x02, char value handle: 0x0012, uuid: 00002a23-0000-1000-8000-00805f9b34fb

handle: 0x0013, char properties: 0x02, char value handle: 0x0014, uuid: 00002a24-0000-1000-8000-00805f9b34fb

handle: 0x0015, char properties: 0x02, char value handle: 0x0016, uuid: 00002a25-0000-1000-8000-00805f9b34fb

handle: 0x0017, char properties: 0x02, char value handle: 0x0018, uuid: 00002a26-0000-1000-8000-00805f9b34fb

handle: 0x0019, char properties: 0x02, char value handle: 0x001a, uuid: 00002a27-0000-1000-8000-00805f9b34fb

handle: 0x001b, char properties: 0x02, char value handle: 0x001c, uuid: 00002a28-0000-1000-8000-00805f9b34fb

handle: 0x001d, char properties: 0x02, char value handle: 0x001e, uuid: 00002a29-0000-1000-8000-00805f9b34fb

handle: 0x001f, char properties: 0x02, char value handle: 0x0020, uuid: 00002a2a-0000-1000-8000-00805f9b34fb

handle: 0x0021, char properties: 0x02, char value handle: 0x0022, uuid: 00002a50-0000-1000-8000-00805f9b34fb

handle: 0x0024, char properties: 0x0a, char value handle: 0x0025, uuid: 0000fff1-0000-1000-8000-00805f9b34fb

handle: 0x0026, char properties: 0x02, char value handle: 0x0027, uuid: 0000fff2-0000-1000-8000-00805f9b34fb

handle: 0x0028, char properties: 0x08, char value handle: 0x0029, uuid: 0000fff3-0000-1000-8000-00805f9b34fb

handle: 0x002a, char properties: 0x10, char value handle: 0x002b, uuid: 0000fff4-0000-1000-8000-00805f9b34fb

handle: 0x002d, char properties: 0x02, char value handle: 0x002e, uuid: 0000fff5-0000-1000-8000-00805f9b34fb

handle: 0x002f, char properties: 0x0a, char value handle: 0x0030, uuid: 0000fff6-0000-1000-8000-00805f9b34fb

handle: 0x0031, char properties: 0x10, char value handle: 0x0032, uuid: 0000fff7-0000-1000-8000-00805f9b34fb

[F4:B8:5E:BC:2E:AA][LE]> char-read-hnd 03

Characteristic value/descriptor: 53 61 6e 61

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x0030 0x41  // to read time

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 0000fff7-0000-1000-8000-00805f9b34fb

Error: Read characteristics by UUID failed: Attribute can't be read

[F4:B8:5E:BC:2E:AA][LE]> char-read-hnd 32

Error: Characteristic value/descriptor read failed: Attribute can't be read

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 30 41000000 00000000 00000000 00000041

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 2902

handle: 0x000f  value: 00 00

handle: 0x002c  value: 00 00

handle: 0x0033  value: 00 00

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x000f 03 00

Error: Characteristic Write Request failed: Attribute value length is invalid

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x000f 0300

Error: Characteristic Write Request failed: Internal application error: I/O

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x000f 0200

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 2902

handle: 0x000f  value: 02 00

handle: 0x002c  value: 00 00

handle: 0x0033  value: 00 00

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x002c 0300

Error: Characteristic Write Request failed: Internal application error: I/O

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x002c 0100

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x0033 0100

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 2902

handle: 0x000f  value: 02 00

handle: 0x002c  value: 01 00

handle: 0x0033  value: 01 00

[F4:B8:5E:BC:2E:AA][LE]> disconnect

[F4:B8:5E:BC:2E:AA][LE]> char-desc

Command Failed: Disconnected

[F4:B8:5E:BC:2E:AA][LE]> connect

Attempting to connect to F4:B8:5E:BC:2E:AA

Connection successful

[F4:B8:5E:BC:2E:AA][LE]> cahr-write-req 0x0030 41000000 00000000 00000000 00000041

Error: cahr-write-req: command not found

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x0030 41000000 00000000 00000000 00000041  // to read time

Characteristic value was written successfully

Notification handle = 0x0032 value: c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c1 // Giving me error as per document.

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 2902

handle: 0x000f  value: 00 00

handle: 0x002c  value: 01 00

handle: 0x0033  value: 01 00

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x00f 0100

Error: Characteristic Write Request failed: Internal application error: I/O

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x00f 0200

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x000f 0100

Error: Characteristic Write Request failed: Internal application error: I/O

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x000f 0200

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x002c 0300

Error: Characteristic Write Request failed: Internal application error: I/O

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x002c 0100

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x0033 0100

Characteristic value was written successfully

[F4:B8:5E:BC:2E:AA][LE]> char-write-req 0x0030 41000000 00000000 00000000 00000041  // Same

Characteristic value was written successfully

Notification handle = 0x0032 value: c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c1

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 2902

handle: 0x000f  value: 02 00

handle: 0x002c  value: 01 00

handle: 0x0033  value: 01 00

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid fff6

handle: 0x0030  value: 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid fff7

Error: Read characteristics by UUID failed: Attribute can't be read

[F4:B8:5E:BC:2E:AA][LE]> primary

attr handle: 0x0001, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb

attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb

attr handle: 0x0010, end grp handle: 0x0022 uuid: 0000180a-0000-1000-8000-00805f9b34fb

attr handle: 0x0023, end grp handle: 0xffff uuid: 0000fff0-0000-1000-8000-00805f9b34fb

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid oxffff

Error: Invalid UUID

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid oxffff0000fff0

Error: Invalid UUID

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 0000fff0     

[F4:B8:5E:BC:2E:AA][LE]> char-read-hnd 0xffff

Error: Characteristic value/descriptor read failed: Invalid handle

[F4:B8:5E:BC:2E:AA][LE]> char-read-hnd 0x0023

Characteristic value/descriptor: f0 ff

[F4:B8:5E:BC:2E:AA][LE]> char-read-hnd f0 ff

Error: Characteristic value/descriptor read failed: Invalid handle

[F4:B8:5E:BC:2E:AA][LE]> char-desc f0 ff

Error: Discover descriptors failed: No attribute found within the given range

[F4:B8:5E:BC:2E:AA][LE]> char-read-hnd 0x0010

Characteristic value/descriptor: 0a 18

[F4:B8:5E:BC:2E:AA][LE]> char-desc 0a 18

handle: 0x000a, uuid: 00002803-0000-1000-8000-00805f9b34fb

handle: 0x000b, uuid: 00002a04-0000-1000-8000-00805f9b34fb

handle: 0x000c, uuid: 00002800-0000-1000-8000-00805f9b34fb

handle: 0x000d, uuid: 00002803-0000-1000-8000-00805f9b34fb

handle: 0x000e, uuid: 00002a05-0000-1000-8000-00805f9b34fb

handle: 0x000f, uuid: 00002902-0000-1000-8000-00805f9b34fb

handle: 0x0010, uuid: 00002800-0000-1000-8000-00805f9b34fb

handle: 0x0011, uuid: 00002803-0000-1000-8000-00805f9b34fb

handle: 0x0012, uuid: 00002a23-0000-1000-8000-00805f9b34fb

handle: 0x0013, uuid: 00002803-0000-1000-8000-00805f9b34fb

handle: 0x0014, uuid: 00002a24-0000-1000-8000-00805f9b34fb

handle: 0x0015, uuid: 00002803-0000-1000-8000-00805f9b34fb

handle: 0x0016, uuid: 00002a25-0000-1000-8000-00805f9b34fb

handle: 0x0017, uuid: 00002803-0000-1000-8000-00805f9b34fb

handle: 0x0018, uuid: 00002a26-0000-1000-8000-00805f9b34fb

[F4:B8:5E:BC:2E:AA][LE]> char-read-uuid 0000180a

[F4:B8:5E:BC:2E:AA][LE]>

 

I will really appreciate if any help will be provided.

 

Thank you in anticipation,

Ankush

  • Sign in to reply
  • Cancel
Parents
  • rahulkumar18
    0 rahulkumar18 over 7 years ago

    Hi Ankush,

    I am also facing the same problem what you have.

    I am able to read the characteristics value of different uuid.

    But don't know which value is useful or I have to decode that value to some meaning full.

    I am using mi band hrx module to read the value.

    How can I read steps count n etc .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • rahulkumar18
    0 rahulkumar18 over 7 years ago

    Hi Ankush,

    I am also facing the same problem what you have.

    I am able to read the characteristics value of different uuid.

    But don't know which value is useful or I have to decode that value to some meaning full.

    I am using mi band hrx module to read the value.

    How can I read steps count n etc .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube