Don't read sendNotification()


#1

I connect with blutooth BLE but I can’t read data. I want read data all the time. My response from sensor is:

"characteristics": [ 
				{ 
					"service": "1800", 
					"characteristic":"2a00", 
					"properties": [ "Read", "Write" ] 
				},
				{ 
					"service": "1800",
					"characteristic": "2a01",
					"properties": ["Read" ] 
				}, 
				{ 
					"service": "1800",
					"characteristic": "2a04",
					"properties": [ "Read" ]
				},
				{ 	"service": "1801",
					"characteristic": "2a05",
					"properties": [ "Indicate" ],
					"descriptors": [ { "uuid": "2902" } ] 
				}, 
				{
					"service": "180a", 
					"characteristic": "2a29",
					"properties": [ "Read" ] 
				},
				{ 
					"service": "180f",
					"characteristic": "2a19", 
					"properties": [ "Read", "Notify" ],
					"descriptors": [ { "uuid": "2902" } ] 
				}, 
				{
					"service": "d5060001-a904-deb9-4748-2c7f4a124842",
					"characteristic": "d5060101-a904-deb9-4748-2c7f4a124842",
					"properties": [ "Read" ] 
				},
				{ 	"service": "d5060001-a904-deb9-4748-2c7f4a124842",
					"characteristic":"d5060201-a904-deb9-4748-2c7f4a124842",
					"properties": [ "Read" ] 
					}, 
				{ 	"service":"d5060001-a904-deb9-4748-2c7f4a124842",
					"characteristic": "d5060401-a904-deb9-4748-2c7f4a124842",
					"properties": [ "Write" ] 
					}, 
				{ 	"service": "d5060002-a904-deb9-4748-2c7f4a124842",
					"characteristic":"d5060402-a904-deb9-4748-2c7f4a124842",
					"properties": [ "Notify" ], 
					"descriptors": [ { "uuid": "2902" } ] 
				},
				{ "service": "d5060002-a904-deb9-4748-2c7f4a124842",	
				  "characteristic":"d5060502-a904-deb9-4748-2c7f4a124842",
				  "properties": [ "Indicate" ],
				  "descriptors": [ { "uuid": "2902" } ]
				}, 
				{ "service": "d5060003-a904-deb9-4748-2c7f4a124842", 
				  "characteristic":"d5060103-a904-deb9-4748-2c7f4a124842", 
				  "properties": [ "Indicate" ],
				  "descriptors": [ { "uuid": "2902" } ]
				}, 
				{ "service": "d5060004-a904-deb9-4748-2c7f4a124842",
				  "characteristic":"d5060104-a904-deb9-4748-2c7f4a124842",
				  "properties": [ "Notify" ],
				  "descriptors": [ { "uuid": "2902" } ] },
				{ 
					"service": "d5060005-a904-deb9-4748-2c7f4a124842",
					"characteristic":"d5060105-a904-deb9-4748-2c7f4a124842", 
					"properties": [ "Notify" ],
					"descriptors": [ { "uuid": "2902" } ] 
					},
            { 
				"service": "d5060005-a904-deb9-4748-2c7f4a124842", 
				"characteristic":
					"d5060205-a904-deb9-4748-2c7f4a124842", 
				"properties": [ "Notify" ],
				"descriptors": [ { "uuid": "2902" } ] },
            { 
				"service": "d5060005-a904-deb9-4748-2c7f4a124842", 
				"characteristic":
					"d5060305-a904-deb9-4748-2c7f4a124842", 
				"properties": [ "Notify" ], 
				"descriptors": [ { "uuid": "2902" } ] },
            { 	"service": "d5060005-a904-deb9-4748-2c7f4a124842",
				"characteristic":
					"d5060405-a904-deb9-4748-2c7f4a124842",
				"properties": [ "Notify" ], 
				"descriptors": [ { "uuid": "2902" } ] },
            { 
				"service": "d5060006-a904-deb9-4748-2c7f4a124842",
				"characteristic":
					"d5060602-a904-deb9-4748-2c7f4a124842", 
				"properties": [ "Indicate" ], 
				"descriptors": [ { "uuid": "2902" } ]
            } 
		]

and I write:

  this.ble.startNotification(peripheral.id,
        "180f", "2a19").subscribe(

        data => console.log("startNotification"),
        error => console.log("error "+error),
        () => console.log('Unexpected Error', 'Failed to subscribe for button state changes')
      );
    this.ble.read(peripheral.id, "180f","2a19").then
    (
      buffer => {
        console.log(" READ");
        let data = new Uint8Array(buffer);
        console.log('Switch characteristics '+data[0]+" "+data.length);
        },
      (err) => {console.log("Read err = "+err);}

     )

I receive only “READ” “Switch characteristics”. What am I doing wrong? How can i read data all the time?