Go Back   MacRumors Forums > iPhone, iPod and iPad > iPhone > iPhone Tips, Help and Troubleshooting

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 3, 2008, 03:13 PM   #76
Wigo
macrumors newbie
 
Join Date: Sep 2008
New update guys!

I contacted ZodTTD author of Quake4iphone and he responded :
-----------------------------------------------------------------
Hi!

Quake4iphone may have some init code for a gamepad controller add-on I'm working to get up and going. The controller addon uses the dock connector. I will see about getting that code to you, if you're interested in it. I have some open sourced version of the code I can share. If it is what Im thinking, it could be as simple as opening a bsd device serial port connection properly. If not, it's something more complex in my code.

Which thread should I respond to?

Keep in touch,ZodTTD
-------------------------------------------------------------------

I directed him to respond to this thread so hopefully we'll hear from him soon. Please note that I'm not very savvy when it comes to code, so if anyone here could help out with ZodTTD that would be great!
Wigo is offline   0 Reply With Quote
Old Oct 3, 2008, 03:18 PM   #77
romeoyankee
macrumors member
 
Join Date: Aug 2008
man i cant wait.. haha

been waiting for this for a long time!
romeoyankee is offline   0 Reply With Quote
Old Oct 3, 2008, 03:23 PM   #78
aaquib
macrumors 65816
 
aaquib's Avatar
 
Join Date: Sep 2007
Location: Toronto, Canada
I exchanged my dock back to Apple and the new one seemed to work fine for about 2 weeks, not its on/off. Sometimes it gives me the error message, sometimes I do without it. I haven't let any water get inside, nor have I put on any unauthorized devices. Just my iPhone.
__________________
13.3" MacBook Air 1.86GHz, 128GB SSD; 20" Cinema Display
iPad 16GB Wifi
aaquib is offline   0 Reply With Quote
Old Oct 3, 2008, 09:47 PM   #79
Bensonious
macrumors newbie
 
Join Date: Oct 2008
So I also message zodttd and his response hinted at a fix. I'm guessing that was is happening is that there is in fact an hardware issue, and there for the phone thinks something is connected and hence locking the serial port.

I ssh'd into my phone and did a simple "touch" on the serial block device. Nothing happened and in fact the command was being blocked. So I killed the process and voila, my sound was back.

Next I had to get this to happen every time the phone was unlocked. I'd explain it but its easier to jsut tell you how to do it.

I created a file called "com.SoundFix.plist" with these contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.SoundFix</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/ResetAudio.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>UserName</key>
<string>root</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>1</integer>
</dict>
</dict>
</plist>

I placed that file in /Library/LaunchDaemon

After that I had to create this script: /Library/Scripts/ResetAudio.sh

looks like this.

#!/bin/sh

touch /dev/tty.iap&
sleep 1
killall touch



And make sure that the permissions are set to be executable.


Restart your phone and you are done.

*** The script isn't perfect, so you might get the pop up once after unlocking, but you will have sound immediately after that. I'm working the kinks out.

Spread the word,

Ben
Bensonious is offline   0 Reply With Quote
Old Oct 3, 2008, 09:52 PM   #80
Wigo
macrumors newbie
 
Join Date: Sep 2008
Way to go Ben!

Looks like we're on the right track. I wish I could help out in terms of coding and scripting but I have no clue with that stuff. I hope others who have knowledge in this can help you out!

Hopefully in the end, we can find a fix and package it onto Cydia or something so that we have a one-click solution for all us coding newbies.
Wigo is offline   0 Reply With Quote
Old Oct 4, 2008, 11:35 PM   #81
dynaxfl
macrumors newbie
 
Join Date: Oct 2008
Thanks, Ben! This worked really well. It occasionally has pop up but it immediately disappears and I have the sound!
dynaxfl is offline   0 Reply With Quote
Old Oct 5, 2008, 12:26 AM   #82
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
Quote:
Originally Posted by Bensonious View Post
So I also message zodttd and his response hinted at a fix. I'm guessing that was is happening is that there is in fact an hardware issue, and there for the phone thinks something is connected and hence locking the serial port.

I ssh'd into my phone and did a simple "touch" on the serial block device. Nothing happened and in fact the command was being blocked. So I killed the process and voila, my sound was back.

Next I had to get this to happen every time the phone was unlocked. I'd explain it but its easier to jsut tell you how to do it.

I created a file called "com.SoundFix.plist" with these contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.SoundFix</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/ResetAudio.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>UserName</key>
<string>root</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>1</integer>
</dict>
</dict>
</plist>

I placed that file in /Library/LaunchDaemon

After that I had to create this script: /Library/Scripts/ResetAudio.sh

looks like this.

#!/bin/sh

touch /dev/tty.iap&
sleep 1
killall touch



And make sure that the permissions are set to be executable.


Restart your phone and you are done.

*** The script isn't perfect, so you might get the pop up once after unlocking, but you will have sound immediately after that. I'm working the kinks out.

Spread the word,

Ben


can anyone make a real noobie step by step for this fix???

its the only thing i can find that really works for this problem that many ppl are having with the iphone
AlexiFortuni is offline   0 Reply With Quote
Old Oct 5, 2008, 05:42 AM   #83
Wigo
macrumors newbie
 
Join Date: Sep 2008
Yes, can anyone write a guide on how to do this? Maybe even package it onto Cydia as a one-click solution?
Wigo is offline   0 Reply With Quote
Old Oct 5, 2008, 09:58 AM   #84
romeoyankee
macrumors member
 
Join Date: Aug 2008
My question is that the Library/Scripts/ folder isnt there....

So I have to create it or did you just accidently give the wrong destination?

Thanks!
romeoyankee is offline   0 Reply With Quote
Old Oct 5, 2008, 10:40 AM   #85
romeoyankee
macrumors member
 
Join Date: Aug 2008
Ok so I did what I posted earlier and created the scripts folder and it does work!! (sometimes) lol


*edit* Ok it doesnt seem to be working for me...

I cant get the message to go away majority of the time and when it does I only get my system sounds back. I still cant play audio through the speakers from my ipod.

any idea why?

Last edited by romeoyankee; Oct 5, 2008 at 11:30 AM.
romeoyankee is offline   0 Reply With Quote
Old Oct 5, 2008, 04:32 PM   #86
dynaxfl
macrumors newbie
 
Join Date: Oct 2008
Quote:
Originally Posted by romeoyankee View Post
My question is that the Library/Scripts/ folder isnt there....

So I have to create it or did you just accidently give the wrong destination?

Thanks!
Yes, you need to create a folder called Scripts. I set permission to 777 for all the new folders and files just created. Reboot the phone, it works.

NOTE if I put the phone in the charger, the message will come up more often than it's not in the charger.
dynaxfl is offline   0 Reply With Quote
Old Oct 5, 2008, 04:40 PM   #87
Bensonious
macrumors newbie
 
Join Date: Oct 2008
Sorry to hear that it isn't working for you correctly. But you were right, you didn't have to create the scripts folder, I forgot to mention that.

As for your music not working, I haven't seen that problem. Try plugging and unplugging your earphones a few times. That always works for me.

Also, I have tried some different scripts, but none have worked as well as the one I posted. It all seems to be a timing issue. That is why you will see the popup every once and a while. Unfortunately the way launchd works, its not possible to have a script run periodically less than 1 minute. Although the script should be run immediately after you unlock, it just seems that the popup happens before the script can run every once and awhile.

This is what I believe the scenario is when you do see the popup:

script is run ->
touch /dev/tty.iap
sleep 1
(at this point the file is still locked and the popup is shown)
killall touch
(the popup automatically dissapears)

If anyone has any better knowledge of writing shell script, feel free to say something.
Bensonious is offline   0 Reply With Quote
Old Oct 6, 2008, 12:52 AM   #88
llcooljayce
macrumors newbie
 
Join Date: Sep 2008
Quote:
Originally Posted by Bensonious View Post
So I also message zodttd and his response hinted at a fix. I'm guessing that was is happening is that there is in fact an hardware issue, and there for the phone thinks something is connected and hence locking the serial port.

I ssh'd into my phone and did a simple "touch" on the serial block device. Nothing happened and in fact the command was being blocked. So I killed the process and voila, my sound was back.

Next I had to get this to happen every time the phone was unlocked. I'd explain it but its easier to jsut tell you how to do it.

I created a file called "com.SoundFix.plist" with these contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.SoundFix</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/ResetAudio.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>UserName</key>
<string>root</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>1</integer>
</dict>
</dict>
</plist>

I placed that file in /Library/LaunchDaemon

After that I had to create this script: /Library/Scripts/ResetAudio.sh

looks like this.

#!/bin/sh

touch /dev/tty.iap&
sleep 1
killall touch



And make sure that the permissions are set to be executable.


Restart your phone and you are done.

*** The script isn't perfect, so you might get the pop up once after unlocking, but you will have sound immediately after that. I'm working the kinks out.

Spread the word,

Ben
This works perfectly for me! Thanks so much Ben.

Maybe you could explain how you know where to put everything and how to write the actual xml ... I would be curious to understand the inner workings of the phone. Cheers
llcooljayce is offline   0 Reply With Quote
Old Oct 6, 2008, 11:29 AM   #89
romeoyankee
macrumors member
 
Join Date: Aug 2008
Soft Fix Newbie Guide

Hey Ben,

So just to clarify.. You wrote

"But you were right, you didn't have to create the scripts folder, I forgot to mention that."

Im assuming you meant "DID"

anyways...

So it wasnt working for me.. I checked and I had everything set correctly and all permissions set to 0777. So I deleted everything and started over. Did everything step by step and now it works.. lol

For newbie steps do this...

1: If you havent jailbroken your iphone then you have to do that.. If you dont know how to then google is your friend. http://blog.iphone-dev.org/

2: Open Notepad and paste this into the body

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.SoundFix</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/ResetAudio.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>UserName</key>
<string>root</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>1</integer>
</dict>
</dict>
</plist>
Save this file as

com.SoundFix.plist

and make sure that when it saves that notepad doesnt automatically add the .txt extension. you should only have the .plist extension. It is case sensitive as well

3: Open a blank page with notepad and add this to the body

Code:
#!/bin/sh

touch /dev/tty.iap&
sleep 1
killall touch

Save this file as

ResetAudio.sh

again make sure that the extension is .sh and not .txt and also it is case sensitive.

4: Ssh into your iphone http://www.youtube.com/watch?v=4ryiOUzgNfY

5: find folder

<root>/Library/LaunchDaemons/

6: Copy the com.SoundFix.plist file into this folder and then right click on it and go to properties. Set the permissions to 777 and click Ok.

7: find folder

<root>/Library/

and create a new folder called Scripts. Set the permissions on the scripts folder to 777 as well.

8: find folder

<root>/Library/Scripts/

9: Copy the ResetAudio.sh file into this folder and then right click on it and go to properties. Set the permissions to 777 and click Ok.

10: Press the home and power buttons together and hold until the screen turns off and you see the apple logo at startup. Release them both.

11: The pop up will come back when you "slide to unlock" and then will almost immediately disappear. Your sounds should all work correctly!

Thanks so much Ben for this as many of us have been waiting for a LONG time for this fix. Would you be interested in putting this up in Cydia?
romeoyankee is offline   0 Reply With Quote
Old Oct 6, 2008, 05:23 PM   #90
Bensonious
macrumors newbie
 
Join Date: Oct 2008
Talking

Quote:
Originally Posted by romeoyankee View Post
Hey Ben,

So just to clarify.. You wrote

"But you were right, you didn't have to create the scripts folder, I forgot to mention that."

Im assuming you meant "DID"

anyways...

So it wasnt working for me.. I checked and I had everything set correctly and all permissions set to 0777. So I deleted everything and started over. Did everything step by step and now it works.. lol

For newbie steps do this...

1: If you havent jailbroken your iphone then you have to do that.. If you dont know how to then google is your friend. http://blog.iphone-dev.org/

2: Open Notepad and paste this into the body

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.SoundFix</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/ResetAudio.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>UserName</key>
<string>root</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>1</integer>
</dict>
</dict>
</plist>
Save this file as

com.SoundFix.plist

and make sure that when it saves that notepad doesnt automatically add the .txt extension. you should only have the .plist extension. It is case sensitive as well

3: Open a blank page with notepad and add this to the body

Code:
#!/bin/sh

touch /dev/tty.iap&
sleep 1
killall touch

Save this file as

ResetAudio.sh

again make sure that the extension is .sh and not .txt and also it is case sensitive.

4: Ssh into your iphone http://www.youtube.com/watch?v=4ryiOUzgNfY

5: find folder

<root>/Library/LaunchDaemons/

6: Copy the com.SoundFix.plist file into this folder and then right click on it and go to properties. Set the permissions to 777 and click Ok.

7: find folder

<root>/Library/

and create a new folder called Scripts. Set the permissions on the scripts folder to 777 as well.

8: find folder

<root>/Library/Scripts/

9: Copy the ResetAudio.sh file into this folder and then right click on it and go to properties. Set the permissions to 777 and click Ok.

10: Press the home and power buttons together and hold until the screen turns off and you see the apple logo at startup. Release them both.

11: The pop up will come back when you "slide to unlock" and then will almost immediately disappear. Your sounds should all work correctly!

Thanks so much Ben for this as many of us have been waiting for a LONG time for this fix. Would you be interested in putting this up in Cydia?
Hey, Great re-write up. And yes I did mean "did"; I was probably trying to type to fast. Anyways, I'm not really familiar with cydia and I'm currently busying writing another iPhone app. But if I have some spare time, I'll try looking into it.

Hopefully this write up will bring relief to others who jumped into a pool with their phone in their pocket
Bensonious is offline   0 Reply With Quote
Old Oct 6, 2008, 06:28 PM   #91
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
Unhappy

i was soo excited to get home today and try this fix....

but it didnt work... i even did it twice..


what could have gone wrong here??
AlexiFortuni is offline   0 Reply With Quote
Old Oct 6, 2008, 06:34 PM   #92
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
great now my sms keeps crashing lol ahh i hate all this code stuff >.<
AlexiFortuni is offline   0 Reply With Quote
Old Oct 6, 2008, 08:46 PM   #93
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
now i ssh'd back in erased all the code i had put in before and my sms was fine again...


then i tryed it all again

still dosnt work i still get the messege and sound turns off..

and now i cant for some reason ssh back into my iphone it says network error: connection times out

gggrrrrrrrrrrrr
AlexiFortuni is offline   0 Reply With Quote
Old Oct 7, 2008, 12:22 AM   #94
Wigo
macrumors newbie
 
Join Date: Sep 2008
Quote:
Originally Posted by Bensonious View Post
Hey, Great re-write up. And yes I did mean "did"; I was probably trying to type to fast. Anyways, I'm not really familiar with cydia and I'm currently busying writing another iPhone app. But if I have some spare time, I'll try looking into it.
Please Ben. All this coding and scripts is overwhelming. I'm afraid I might make my iphone worse!
Wigo is offline   0 Reply With Quote
Old Oct 7, 2008, 03:49 PM   #95
Bensonious
macrumors newbie
 
Join Date: Oct 2008
Quote:
Originally Posted by AlexiFortuni View Post
now i ssh'd back in erased all the code i had put in before and my sms was fine again...


then i tryed it all again

still dosnt work i still get the messege and sound turns off..

and now i cant for some reason ssh back into my iphone it says network error: connection times out

gggrrrrrrrrrrrr
Sounds like you deleted all the files in the LaunchDaemons folder. There is a file in there that is used to launch the ssh service. You can probably uninstall ssh via cydia and reinstall it. Start the service with either boss prefs or sshtoggle and youre good to go.
Bensonious is offline   0 Reply With Quote
Old Oct 7, 2008, 06:09 PM   #96
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
got it thanks


but this fix still dosnt work for me... im trying my best to follow each step exactly but something is going wrong...
AlexiFortuni is offline   0 Reply With Quote
Old Oct 8, 2008, 04:05 PM   #97
subbetica
macrumors newbie
 
Join Date: Oct 2008
donīt works

another failure, Ii also didnīt worked to me, and It also fault the ssh then, it resolved by reinstalling the openssh.
where is the failure? in the code, in the firmware version,...
subbetica is offline   0 Reply With Quote
Old Oct 9, 2008, 10:05 AM   #98
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
bump for some heellpp!!!! haha

i wanna fix this damn problem.. >.<
AlexiFortuni is offline   0 Reply With Quote
Old Oct 9, 2008, 04:53 PM   #99
mryder66
macrumors newbie
 
Join Date: Oct 2008
Replacement the only fix?

I have tried for several days to fix this issue on my 3G, but eventually gave up and took it to the geius bar. The guy there, took one look and said that the fault is not repairable, and immediately swapped out the phone for me. Now I am doing a restore and will be oon my way.


I know this is cold comfort for those not under warranty.
mryder66 is offline   0 Reply With Quote
Old Oct 9, 2008, 08:51 PM   #100
AlexiFortuni
macrumors newbie
 
Join Date: Mar 2008
very cold... >.<

enjoy your "working" 3g :-)
AlexiFortuni is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iPhone > iPhone Tips, Help and Troubleshooting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Help! "iTunes could not back up the iPhone "iPhone" because an error occurred." cooky94 iPhone Tips, Help and Troubleshooting 3 Apr 14, 2013 07:35 PM
The iPhone "iPhone" could not be restored. An unknown error occurred (3014). BMX-Casey iPhone Tips, Help and Troubleshooting 2 Apr 13, 2013 02:37 PM
"Charge is not allowed with this accessory" on iPhone 3GS. Charger, cable are ok??. Cubytus iPhone 4 Mar 20, 2013 04:34 PM
OS X: Can the PC "Rage" Texture Pop fix be Made to work for Mac? Irishman Mac and PC Games 10 Feb 7, 2013 09:43 PM
iPhone keeps telling me that "Charging is not compatible with this accessory." Sarahshiloh iPhone Tips, Help and Troubleshooting 1 Jul 8, 2012 01:34 AM

Forum Jump

All times are GMT -5. The time now is 06:48 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC