schueppi
02-11-2008, 01:06 PM
Hi all,
I took my bricked Iphone and checked the source code of Geohots hw upgrade tools.
My symptoms are the following:
ienew stuck at waiting for data
iunew stuck at Spamming AT, Waiting for response
Now I checked the source code and found two possible reasons for this:
Eather a write call is blocking, or the select call is only returning 0 or blocking.
iunew (iunlocker):
void getheader()
{
fd_set nfp;
FD_ZERO(&nfp);
FD_SET(fp, &nfp);
struct timeval tv;
tv.tv_sec=0;
tv.tv_usec=10000;
hlen=0;
while(select(fp+1,&nfp,0,0,&tv)>0)
{
hlen+=read(fp,data+hlen, 0x1000-hlen);
printf("Attempting to read[%d]...%x\n",hlen,data[0]);
}
}
And in main:
printf("Spamming AT, waiting for a response\n");
do {
data[0]='A'; data[1]='T';
if(write(fp,data,2)==-1) {printf("Can't write\n"); return -1; }
//else printf("W\n");
getheader();
}while(hlen==0||data[0]!=0xc0);
I guess that those calls are pretty close to the hardware and I assume that
the reason for those calls could be a broken trace (A17 ? ), I'm going to check that and maybe try to fix it then ....
Maybe somebody has another idea why those calls fail ...
schueppi
I took my bricked Iphone and checked the source code of Geohots hw upgrade tools.
My symptoms are the following:
ienew stuck at waiting for data
iunew stuck at Spamming AT, Waiting for response
Now I checked the source code and found two possible reasons for this:
Eather a write call is blocking, or the select call is only returning 0 or blocking.
iunew (iunlocker):
void getheader()
{
fd_set nfp;
FD_ZERO(&nfp);
FD_SET(fp, &nfp);
struct timeval tv;
tv.tv_sec=0;
tv.tv_usec=10000;
hlen=0;
while(select(fp+1,&nfp,0,0,&tv)>0)
{
hlen+=read(fp,data+hlen, 0x1000-hlen);
printf("Attempting to read[%d]...%x\n",hlen,data[0]);
}
}
And in main:
printf("Spamming AT, waiting for a response\n");
do {
data[0]='A'; data[1]='T';
if(write(fp,data,2)==-1) {printf("Can't write\n"); return -1; }
//else printf("W\n");
getheader();
}while(hlen==0||data[0]!=0xc0);
I guess that those calls are pretty close to the hardware and I assume that
the reason for those calls could be a broken trace (A17 ? ), I'm going to check that and maybe try to fix it then ....
Maybe somebody has another idea why those calls fail ...
schueppi