author | aquadran <aquadran> | 2006-01-08 12:35:44 (UTC) |
---|---|---|
committer | aquadran <aquadran> | 2006-01-08 12:35:44 (UTC) |
commit | 2664267708d5ed695151bf0ec9376080e7bf617e (patch) (unidiff) | |
tree | a3f7b8b7164478d70e70258363e828f8bedfb341 | |
parent | d795d596af30d2856544b960d37e779659c324a6 (diff) | |
download | opie-2664267708d5ed695151bf0ec9376080e7bf617e.zip opie-2664267708d5ed695151bf0ec9376080e7bf617e.tar.gz opie-2664267708d5ed695151bf0ec9376080e7bf617e.tar.bz2 |
added support for asus mypal 716 in bluepingplugin
-rw-r--r-- | noncore/securityplugins/blueping/bluepingplugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/securityplugins/blueping/bluepingplugin.cpp b/noncore/securityplugins/blueping/bluepingplugin.cpp index 1c514e5..05c26ba 100644 --- a/noncore/securityplugins/blueping/bluepingplugin.cpp +++ b/noncore/securityplugins/blueping/bluepingplugin.cpp | |||
@@ -158,48 +158,52 @@ int BluepingPlugin::authenticate() { | |||
158 | 158 | ||
159 | /* let's start Bluetooth if it's not running | 159 | /* let's start Bluetooth if it's not running |
160 | */ | 160 | */ |
161 | OProcess checkB; | 161 | OProcess checkB; |
162 | checkB << "pidof" << "hciattach"; | 162 | checkB << "pidof" << "hciattach"; |
163 | odebug << "checking if Bluetooth is running..." << oendl; | 163 | odebug << "checking if Bluetooth is running..." << oendl; |
164 | // now we start bluetooth *only* if the previous command works, exits normally, and | 164 | // now we start bluetooth *only* if the previous command works, exits normally, and |
165 | // it returns a non-null exit code (which means hciattach is not running) | 165 | // it returns a non-null exit code (which means hciattach is not running) |
166 | if ( checkB.start(OProcess::Block) && checkB.normalExit() && (checkB.exitStatus() != 0) ) | 166 | if ( checkB.start(OProcess::Block) && checkB.normalExit() && (checkB.exitStatus() != 0) ) |
167 | { | 167 | { |
168 | // remember to switch off Bluetooth once we're finished... | 168 | // remember to switch off Bluetooth once we're finished... |
169 | bluetoothWasOff = true; | 169 | bluetoothWasOff = true; |
170 | odebug << "Bluetooth is not running, we must start it now" << oendl; | 170 | odebug << "Bluetooth is not running, we must start it now" << oendl; |
171 | 171 | ||
172 | OProcess startB; | 172 | OProcess startB; |
173 | switch ( ODevice::inst()->model() ) { | 173 | switch ( ODevice::inst()->model() ) { |
174 | case Model_iPAQ_H39xx: | 174 | case Model_iPAQ_H39xx: |
175 | startB << "/sbin/hciattach" << "/dev/tts/1" << "bcsp" << "921600"; | 175 | startB << "/sbin/hciattach" << "/dev/tts/1" << "bcsp" << "921600"; |
176 | break; | 176 | break; |
177 | 177 | ||
178 | case Model_iPAQ_H5xxx: | 178 | case Model_iPAQ_H5xxx: |
179 | startB << "/sbin/hciattach" << "/dev/tts/1" << "any" << "921600"; | 179 | startB << "/sbin/hciattach" << "/dev/tts/1" << "any" << "921600"; |
180 | break; | 180 | break; |
181 | 181 | ||
182 | case Model_MyPal_716: | ||
183 | startB << "/sbin/hciattach" << "/dev/ttyS1" << "bcsp" << "921600"; | ||
184 | break; | ||
185 | |||
182 | default: | 186 | default: |
183 | startB << "/sbin/hciattach" << "/dev/ttySB0" << "bcsp" << "230400"; | 187 | startB << "/sbin/hciattach" << "/dev/ttySB0" << "bcsp" << "230400"; |
184 | break; | 188 | break; |
185 | } // end switch on device models | 189 | } // end switch on device models |
186 | 190 | ||
187 | if ( !startB.start(OProcess::Block) ) { | 191 | if ( !startB.start(OProcess::Block) ) { |
188 | oerr << "could not start Bluetooth" << oendl; | 192 | oerr << "could not start Bluetooth" << oendl; |
189 | return MultiauthPluginObject::Skip; | 193 | return MultiauthPluginObject::Skip; |
190 | } | 194 | } |
191 | else | 195 | else |
192 | { | 196 | { |
193 | if ( (startB.normalExit()) && (startB.exitStatus() == 0) ) | 197 | if ( (startB.normalExit()) && (startB.exitStatus() == 0) ) |
194 | { | 198 | { |
195 | odebug << "hciattach exited normally, Bluetooth is probably on now, let's wait 500 ms and ping" << oendl; | 199 | odebug << "hciattach exited normally, Bluetooth is probably on now, let's wait 500 ms and ping" << oendl; |
196 | // 500 ms timer, so l2ping won't try to find a route before bluetooth has \em really started | 200 | // 500 ms timer, so l2ping won't try to find a route before bluetooth has \em really started |
197 | QTimer::singleShot( 500, this, SLOT(ping()) ); | 201 | QTimer::singleShot( 500, this, SLOT(ping()) ); |
198 | } | 202 | } |
199 | else | 203 | else |
200 | { | 204 | { |
201 | owarn << "hciattach exited anormally (normalExit: " << startB.normalExit() << ", exit status: " << startB.exitStatus() << ")" << oendl; | 205 | owarn << "hciattach exited anormally (normalExit: " << startB.normalExit() << ", exit status: " << startB.exitStatus() << ")" << oendl; |
202 | return MultiauthPluginObject::Skip; | 206 | return MultiauthPluginObject::Skip; |
203 | } // end if startB exited normaly | 207 | } // end if startB exited normaly |
204 | } // end if startBluetooth started | 208 | } // end if startBluetooth started |
205 | } | 209 | } |