I'm trying to get the attributes of my bluetooth device (Bluetooth Smart LED Bulb) so that I can control it using Raspberry pi 3 model B, but I got this Invalid File descriptor.
gatttool -b 00:E0:4C:EF:9D:52 -I
[00:E0:4C:EF:9D:52][LE]> connect
Attempting to connect to 00:E0:4C:EF:9D:52
Connection successful
[00:E0:4C:EF:9D:52][LE]>
(gatttool:4006): GLib-WARNING **: Invalid file descriptor.
[00:E0:4C:EF:9D:52][LE]> primary
Command Failed: Disconnected
[00:E0:4C:EF:9D:52][LE]>