1075 Public method to get Bluetooth status data of the connected board. |
1076 Public method to get Bluetooth status data of the connected board. |
1076 |
1077 |
1077 @return list of tuples containing the translated status data label and |
1078 @return list of tuples containing the translated status data label and |
1078 the associated value |
1079 the associated value |
1079 @rtype list of tuples of (str, str) |
1080 @rtype list of tuples of (str, str) |
|
1081 @exception OSError raised to indicate an issue with the device |
1080 """ |
1082 """ |
1081 command = """ |
1083 command = """ |
1082 def ble_status(): |
1084 def ble_status(): |
1083 import bluetooth |
1085 import bluetooth |
1084 import ubinascii |
1086 import ubinascii |
1123 ) |
1125 ) |
1124 ) |
1126 ) |
1125 status.append( |
1127 status.append( |
1126 (self.tr("Rx-Buffer"), self.tr("{0} Bytes").format(bleStatus["rxbuf"])) |
1128 (self.tr("Rx-Buffer"), self.tr("{0} Bytes").format(bleStatus["rxbuf"])) |
1127 ) |
1129 ) |
1128 status.append( |
1130 status.append((self.tr("MTU"), self.tr("{0} Bytes").format(bleStatus["mtu"]))) |
1129 (self.tr("MTU"), self.tr("{0} Bytes").format(bleStatus["mtu"])) |
|
1130 ) |
|
1131 |
1131 |
1132 return status |
1132 return status |
1133 |
1133 |
1134 def activateBluetoothInterface(self): |
1134 def activateBluetoothInterface(self): |
1135 """ |
1135 """ |
1136 Public method to activate the Bluetooth interface. |
1136 Public method to activate the Bluetooth interface. |
1137 |
1137 |
1138 @return flag indicating the new state of the Bluetooth interface |
1138 @return flag indicating the new state of the Bluetooth interface |
1139 @rtype bool |
1139 @rtype bool |
|
1140 @exception OSError raised to indicate an issue with the device |
1140 """ |
1141 """ |
1141 command = """ |
1142 command = """ |
1142 def activate_ble(): |
1143 def activate_ble(): |
1143 import bluetooth |
1144 import bluetooth |
1144 |
1145 |