Discuss [Services] Services manager at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; About
I just recently started coding for the iPhone this weekend. I decided to make ...
[Services] Services manager
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.
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.
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.
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
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.
- 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
- 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.
- Added support for dropbear ssh
- 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
- 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.
How does it disables the services? is it open source?
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.
Thinking about the icon...
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
thank you cehoffman
this really rocks!!
Kurro: i place your icon at the dock, it look just perfect
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.
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.
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.
By jeanmib in forum Free Toolchain Software (Cydia App's)
Last Post: 11-03-2007, 10:27 AM
By hidehide in forum Free Toolchain Software (Cydia App's)
Last Post: 10-26-2007, 07:35 AM
By t0n3dawgg in forum General
Last Post: 09-14-2007, 07:49 PM