Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTInquiry.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTInquiry.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp b/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp index 8e94bbc..2bc63c7 100644 --- a/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp | |||
@@ -58,9 +58,9 @@ OTInquiry::~OTInquiry() { | |||
58 | } | 58 | } |
59 | 59 | ||
60 | void OTInquiry::stopInquiring( void ) { | 60 | void OTInquiry::stopInquiring( void ) { |
61 | if( Socket ) { | 61 | if( Socket ) { |
62 | owarn << "Stop inquiry" << oendl; | 62 | odebug << "Stop inquiry" << oendl; |
63 | Driver->closeSocket(); | 63 | Driver->closeSocket(); |
64 | Socket = 0; | 64 | Socket = 0; |
65 | } | 65 | } |
66 | } | 66 | } |
@@ -74,9 +74,9 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { | |||
74 | cmdBuf[2] = (lap >> 16) & 0xFF; | 74 | cmdBuf[2] = (lap >> 16) & 0xFF; |
75 | cmdBuf[3] = max(0x01, min(0x30, int(timeout/1.28))); | 75 | cmdBuf[3] = max(0x01, min(0x30, int(timeout/1.28))); |
76 | cmdBuf[4] = (unsigned char)numResponses; | 76 | cmdBuf[4] = (unsigned char)numResponses; |
77 | 77 | ||
78 | owarn << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl; | 78 | odebug << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl; |
79 | 79 | ||
80 | Socket->sendCommand(0x01, 0x0001, cmdBuf); | 80 | Socket->sendCommand(0x01, 0x0001, cmdBuf); |
81 | 81 | ||
82 | int status; | 82 | int status; |
@@ -88,14 +88,14 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { | |||
88 | return true; | 88 | return true; |
89 | } | 89 | } |
90 | else { | 90 | else { |
91 | QString S =QString().sprintf( "%x", status ); | 91 | QString S =QString().sprintf( "%x", status ); |
92 | owarn << "OTInquiry::inquiry() failed: 0x" << S << oendl; | 92 | odebug << "OTInquiry::inquiry() failed: 0x" << S << oendl; |
93 | emit finished(); | 93 | emit finished(); |
94 | return false; | 94 | return false; |
95 | } | 95 | } |
96 | } else { | 96 | } else { |
97 | owarn << "OTInquiry::inquiry(): Timeout." << oendl; | 97 | odebug << "OTInquiry::inquiry(): Timeout." << oendl; |
98 | return false; | 98 | return false; |
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
@@ -125,9 +125,9 @@ void OTInquiry::slotInquiryTimeout() { | |||
125 | } | 125 | } |
126 | 126 | ||
127 | void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | 127 | void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { |
128 | 128 | ||
129 | owarn << "OTInquiry: hci packet received: eventCode=" | 129 | odebug << "OTInquiry: hci packet received: eventCode=" |
130 | << (unsigned int)eventCode | 130 | << (unsigned int)eventCode |
131 | << " packetLength=" | 131 | << " packetLength=" |
132 | << (unsigned int)buf.size() | 132 | << (unsigned int)buf.size() |
133 | << oendl; | 133 | << oendl; |
@@ -135,13 +135,13 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
135 | unsigned char *data = (unsigned char*)buf.data(); | 135 | unsigned char *data = (unsigned char*)buf.data(); |
136 | switch (eventCode) { | 136 | switch (eventCode) { |
137 | case EVT_INQUIRY_COMPLETE: | 137 | case EVT_INQUIRY_COMPLETE: |
138 | { unsigned char status = data[0]; | 138 | { unsigned char status = data[0]; |
139 | owarn << "EVT_INQUIRY_COMPLETE status=" << status << oendl; | 139 | odebug << "EVT_INQUIRY_COMPLETE status=" << status << oendl; |
140 | InquiryTimeoutTimer->stop(); | 140 | InquiryTimeoutTimer->stop(); |
141 | if (status == 0) { | 141 | if (status == 0) { |
142 | if( SuccessfullyStarted == true) { | 142 | if( SuccessfullyStarted == true) { |
143 | owarn << "OTInquiry ended successfully" << oendl; | 143 | odebug << "OTInquiry ended successfully" << oendl; |
144 | SuccessfullyEnded = true; | 144 | SuccessfullyEnded = true; |
145 | } | 145 | } |
146 | emit finished(); | 146 | emit finished(); |
147 | } | 147 | } |
@@ -162,9 +162,9 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
162 | 162 | ||
163 | for (int n=0; n<numResults; n++) { | 163 | for (int n=0; n<numResults; n++) { |
164 | Addr.setBDAddr( results[n].bdaddr ); | 164 | Addr.setBDAddr( results[n].bdaddr ); |
165 | 165 | ||
166 | owarn << "INQUIRY_RESULT: " | 166 | odebug << "INQUIRY_RESULT: " |
167 | << Addr.toString() | 167 | << Addr.toString() |
168 | << oendl; | 168 | << oendl; |
169 | 169 | ||
170 | P = Driver->gateway()->findPeer( Addr ); | 170 | P = Driver->gateway()->findPeer( Addr ); |
@@ -202,9 +202,9 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
202 | case EVT_CMD_STATUS : | 202 | case EVT_CMD_STATUS : |
203 | { int status = data[0]; | 203 | { int status = data[0]; |
204 | int numHciCmdPkts = data[1]; | 204 | int numHciCmdPkts = data[1]; |
205 | int cmdOpcode = *((uint16_t*)(data+2)); | 205 | int cmdOpcode = *((uint16_t*)(data+2)); |
206 | owarn << "EVT_CMD_STATUS status=" | 206 | odebug << "EVT_CMD_STATUS status=" |
207 | << status | 207 | << status |
208 | << " numPkts=" | 208 | << " numPkts=" |
209 | << numHciCmdPkts | 209 | << numHciCmdPkts |
210 | << " cmdOpcode=" | 210 | << " cmdOpcode=" |