Home User CP Donate Chat Register Today!  
  Get New posts Faq / Help?
   


Go Back   Hackint0sh > Projects and Hacks > iPhone > Applications & Development > Free Toolchain Software

Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-25-2007, 02:53 AM
cehoffman
Status: Offline
Member
 
Join Date: Sep 2007
Posts: 40
Rep Power: 0
cehoffman is on a distinguished road
Default [Services] Services manager

About
I just recently started coding for the iPhone this weekend. I decided to make an application that would allow for easy access to the different running services for the phone such as Wifi, Bluetooth, EDGE, Calling, and SSH. Hence my first contribution, Services.app.

Currently the Application only supports turning on/off Edge, Bluetooth, Wifi, and OpenSSH.

Requirements
In order for this to all work, your system must have BSD Subsystem installed or at least the BSD/Unix tools grep, launchctl, sh/zsh/some shell, and ifconfig.

Installation
Install through Installer.app, how simple could it be, or to do it manually; copy the unzipped Services.app to /Applications and chmod 755 as usual.

If anyone has some suggestions for things that would also be nice to control from Services, let me know.

Screenshot





Download
Services-0.6.7.zip

What's Next in no particular order
  • Setting of springboard icon to reflect services at a glance <- Not too excited about this now
  • Phone Function on/off
  • srelay on/off control for tethering
  • Store multiple EDGE settings for easy reload
  • Link to a method of choosing a wifi access point <- Although doesn't the phone popup with a choice of access points on its own when you try to access the network with out a configured ap?
  • Scheduled timer to turn services on/off automatically
  • Regroup buttons
  • Add airplane mode button
  • Fix EDGE "Incorrect" alert coming up when it shouldn't.
  • Redo EDGE on detection
  • Make a freakin bug tracker for this, probably use trac

Known Issues
The following appears to be resolved now, let me know if there are still issues
Turning on/off EDGE while turning Bluetooth on/off will sometimes lead to bluetooth being in a non-functioning state. This is signaled by the progress indicator never going away. Rebooting the phone is the only solution I know of so far. It looks like I need to come up with one on my own too because even Apple's bluetooth routines can't recover from it without a reboot.

Changelog
  • 0.6.7
    • Redid EDGE routines to rely on my own routines instead of Apple's Preferences framework.
    • Added some nice graphical error handlers for EDGE - this might get expanded upon even further
    • Added a little more user protection between EDGE/Bluetooth interactions
    • Overall app appears to be quite stable now
  • 0.6.6
    • Did some dynamic library loading to get direct access to one of the wifi power routines, this is the exact one called when airplane mode turned on
    • Setup a little more places to look for dropbear
    • Did some bug squashing that had led to instabilities before
    • Reduce memory consumption by about 35%
    • Changed icon to more graphic one, but original icon is still inside the folder. Just move icon-plain.png to icon.png.
  • 0.6.1
    • Added support for dropbear ssh
  • 0.6
    • Improved memory usage
    • Improved startup time
    • Less access to disk when modifiying services
    • Won't let you turn off bluetooth while it is trying to turn on and vice versa
    • Rewrote listing mechanism for dynamic controls, e.g. ssh appears only when openssh is installed
    • Have an icon! Thanks kurro and XianLi for your effort
  • 0.4 - Initial Release
    • EDGE, Bluetooth, and OpenSSH control

Credits
  • Thanks to Ste for working on Installer.app and helping debug an EDGE issue
  • DeEDGE for the original idea and method for disabling EDGE
  • Ulctl for how to turn on/off SSH from the program
  • rSBT for how to use the UITableCell routines
  • iPhone-Wireless for reference of dynamically loading routines at runtime
  • Kurro & XianLi for Icons

Last edited by cehoffman; 10-03-2007 at 10:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-25-2007, 03:00 AM
peu's Avatar
peu
Status: Offline
Senior Member
 
Join Date: Aug 2007
Location: Buenos Aires Argentina (I like ribs)
Posts: 487
Rep Power: 29
peu will become famous soon enough
Default

How does it disables the services? is it open source?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 09-25-2007, 03:10 AM
cehoffman
Status: Offline
Member
 
Join Date: Sep 2007
Posts: 40
Rep Power: 0
cehoffman is on a distinguished road
Default

Good question, I probably should have mentioned this. It uses the programming interfaces offered by the Preferences framework and the BluetoothManager to enable and disable the edge/bluetooth services. I haven't figured out wifi yet, thats why it is disabled. SSH is done using launchctl load and unload the com.openssh.sshd plist.

I haven't choosen any license for the code yet, but it will be open source. I just want to clean up the code a little bit with some comments before I post it up. I might use googlecode for it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #4 (permalink)  
Old 09-25-2007, 03:29 AM
JSN1's Avatar
JSN1
Status: Offline
Respected Member
 
Join Date: Jul 2007
Location: localhost
Posts: 774
Rep Power: 52
JSN1 has a spectacular aura aboutJSN1 has a spectacular aura aboutJSN1 has a spectacular aura about
Default

Thanks!
Thinking about the icon...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 09-25-2007, 05:01 AM
Former Bender's Avatar
Former Bender
Status: Offline
Guest
 
Join Date: Nov 1970
Posts: 3,501
Rep Power: 0
Former Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud of
Default

I've been playing around making an icon, if you like it you can use it for your app.


Last edited by Former Bender; 09-25-2007 at 05:06 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 09-25-2007, 06:17 AM
kurro
Status: Offline
Senior Member
 
Join Date: Jul 2007
Posts: 148
Rep Power: 11
kurro is on a distinguished road
Default

This one is based off of the OSX System Prefs icon....well, the Tiger one...Leopard's is like the iPhone's. Anywho:

img is here: http://img507.imageshack.us/img507/8496/switcherzc2.png
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #7 (permalink)  
Old 09-25-2007, 06:28 AM
maestropastelero
Status: Offline
Junior Member
 
Join Date: Sep 2007
Posts: 27
Rep Power: 0
maestropastelero is on a distinguished road
Default

thank you cehoffman

this really rocks!!

Kurro: i place your icon at the dock, it look just perfect
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-25-2007, 06:29 AM
kurro
Status: Offline
Senior Member
 
Join Date: Jul 2007
Posts: 148
Rep Power: 11
kurro is on a distinguished road
Default

Well thanks, I think Ill replace my System Prefs icon with this actually. =) I do wish I had a sharper source for the actual switch...its a tad blurry

Last edited by kurro; 09-25-2007 at 06:32 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 09-25-2007, 06:43 AM
maestropastelero
Status: Offline
Junior Member
 
Join Date: Sep 2007
Posts: 27
Rep Power: 0
maestropastelero is on a distinguished road
Default

cehoffman:

could you please explian us how this activate/deactivate works?

it change my APN to DISABLED, but when i enable it nothings happen, remains DISABLED.

thnx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #10 (permalink)  
Old 09-25-2007, 06:55 AM
cehoffman
Status: Offline
Member
 
Join Date: Sep 2007
Posts: 40
Rep Power: 0
cehoffman is on a distinguished road
Default

Hmm, thats odd. There are some interfaces within the Preferences Framework called PSSystemConfiguration which give access to the preferences.plist. I use this to get the current apn and change it to DISABLED, I also then make a new key called apn-orignal that is supposed to be what the apn was originally set to. When you reactivate edge, it is supposed to lookup the apn-original key and replace the apn with your previous settings.

I tested this on my phone, but I haven't unlocked my phone yet. If you have unlocked your phone could you send me your /private/var/root/Library/Preferences/SystemConfiguration/preferences.plist when you have edge working, when you use my utility to turn it off, and when you use my utility to turn it back on in PM. This should help me figure out the problem.

My guess is, if you go into Preferences and are able to look at the EDGE settings, it erases my apn-original key and thats why reactivating doesn't work. I'll try storing the key somewhere else and putting an update out soon.

Last edited by cehoffman; 09-25-2007 at 06:59 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.hackint0sh.org/f126/8177.htm
Posted By For Type Date
簡易iPhone FAQ - iPhone 技術,Q&A及討論區 - PDA & PDA Phone - 香港討論區 discuss.com.hk - 一個香港只得一個香港討論區 This thread Refback 01-14-2009 02:33 PM



All times are GMT +2. The time now is 06:36 AM.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 Ad Management by RedTyger
follow us on Twitter!

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448