08-05-10 02:05 AM
238 ... 45678 ...
tools
  1. csete's Avatar
    Now that it is back to work time, I'm not sure I will get much chance to dig into this until the upcoming weekend. That is probably good since I'm pretty frustrated at this point. My current thinking is that I'm going to try to get the Darwin ppp to compile and try connecting with that. At least with a copy of ppp under my control, I could hack in things like delays to see if that helps.
    04-27-09 07:06 AM
  2. kcofirm's Avatar
    i'm on .266 and manage to use my bold as modem but only on edge. Every time I activate 3g, it wouldnt connect but when I disable 3g and use 2g (edge) it works.

    Tried other settings...never works, only this settings works for me.
    04-30-09 09:43 AM
  3. csete's Avatar
    Just an update. I've been working on and off all week to actually compile a version of pppd that I could then hack on a bit. This has turned out to be much more difficult than I had anticipated... even with a lot of help from the DarwinBuild and PureDarwin projects. I haven't quite given up yet, but I may be approaching a dead end on that path.
    04-30-09 09:11 PM
  4. tomte's Avatar
    Hi all,
    I have good and bad news for you guys.
    here's what i've done so far :
    as samba's ppp official repository does not include darwin files, i had to fire up Xcode and get the sources from apple. For some reason i had to dig a bit in their project to compile it ( at least on my mac ). I patched (*cough*) the sources and managed to compile a pppd binary with a much higher DEFMAXxx values. the whole xcode project was too big to upload here, so i just put the pppd binary, let me know if you want the project too.
    Good news : the new values are working
    Bad news : instead of miserably failing to negociate after 15 attempts, it just goes belly up after 50 .

    It is quite difficult to debug from here because my connections *are* 50% successful, but here's a try :
    i really think csete is on the right track : it is all about timing. As you guys have noticed before, the negociation goes really quick between the client and the server. But guess what : my *working* negociations are actually SLOWER than the failing ones. With the same exact setups. Sometimes it works (with many in a row) sometimes it does not but now i know instantly how it's going to end just by looking the negociation live in the logs.
    Last edited by tomte; 05-01-09 at 03:55 AM.
    05-01-09 03:44 AM
  5. darkone338's Avatar
    holy cow... .247 with the new PPPD and the data services set to off... First time tethering has worked for me since .190 (and ive tried it a lot!) 3 out of 5 times successful connections. Not a bad start...

    Thanks for your work on this guys!

    EDIT: I also get 50% success with data services on.
    Last edited by darkone338; 05-01-09 at 10:18 AM.
    05-01-09 10:13 AM
  6. csete's Avatar
    Success!!!

    Let me start by saying that I have no idea why things work by default for some and not for others. From the beginning, I've wondered if it was a timing issue and I'm now 100% certain that that is the case. After lots of help from the darwinbuild and PureDarwin projects, I've managed to get my own copy of the pppd executable compiled on my laptop. By replacing the system executable with my copy, I was able to get some control over the situation.

    I introduced a 1 second delay into the configure/configure failure loop in fsm.c:

    Code:
    #ifdef __APPLE__
                if (f->reqloops >= f->maxreqloops) {
                    warning("%s: Maximum Config-Requests exceeded\n", PROTO_NAME(f));
                    f->state = STOPPED;
                    if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished )
                        (*f->callbacks->finished)(f);
                }
                else
    #endif
                	info("Configuration request failed, sleeping 1 second");
    				sleep(1);
    
                    fsm_sconfreq(f, 0);		/* Send Configure-Request */
    With that 1 second delay in place, I'm now able to complete negotiation 100% of the time with data services and 3G turned on with firmware .266 on AT&T.

    Code:
    Sat May  2 16:56:17 2009 : Configuration request failed, sleeping 1 second
    Sat May  2 16:56:18 2009 : sent [IPCP ConfReq id=0x8 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
    Sat May  2 16:56:18 2009 : rcvd [IPCP ConfRej id=0x8 <compress VJ 0f 01>]
    Sat May  2 16:56:18 2009 : Configuration request failed, sleeping 1 second
    Sat May  2 16:56:19 2009 : sent [IPCP ConfReq id=0x9 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
    Sat May  2 16:56:19 2009 : sent [LCP EchoReq id=0x1 magic=0x0]
    Sat May  2 16:56:20 2009 : rcvd [IPCP ConfNak id=0x9 <addr 166.203.88.204> <ms-dns1 209.183.33.23> <ms-dns3 209.183.35.23>]
    Sat May  2 16:56:20 2009 : Configuration request failed, sleeping 1 second
    Sat May  2 16:56:21 2009 : sent [IPCP ConfReq id=0xa <addr 166.203.88.204> <ms-dns1 209.183.33.23> <ms-dns3 209.183.35.23>]
    Sat May  2 16:56:21 2009 : rcvd [LCP EchoRep id=0x1 magic=0x0]
    Sat May  2 16:56:21 2009 : rcvd [IPCP ConfAck id=0xa <addr 166.203.88.204> <ms-dns1 209.183.33.23> <ms-dns3 209.183.35.23>]
    Sat May  2 16:56:21 2009 : ipcp: up
    I'm not entirely sure where to go next with this. I have some contacts at RIM that I will talk to about this, but in the meantime I'm not sure what to think about distributing my hacked version. I'm very new to Mac development and I'm afraid to cause issues for other people. What do others think?

    Thanks,
    Craig
    05-02-09 05:06 PM
  7. tomte's Avatar
    Awesome !
    Thank you *so much* for having worked this out. I can't wait to try. I'm in holidays right now with no particular roaming pricing agreement in this part of the world so i'm sticking to local wifi aps to get connected, i don't want to get smashed down by those roaming rip-off charges </rant>.
    Maybe you could just issue a .patch file so people really willing to test this would be able to do it without spreading a dangerous binary in the wild..
    05-03-09 01:21 AM
  8. darkone338's Avatar

    I'm not entirely sure where to go next with this. I have some contacts at RIM that I will talk to about this, but in the meantime I'm not sure what to think about distributing my hacked version. I'm very new to Mac development and I'm afraid to cause issues for other people. What do others think?
    To be honest, anyone savvy enough to replace the ppd binary they currently have, with your one, should be intelligent enough to know several things 1) no warranties 2) backup the original 3) know how to go back to the original in case of problems. Release away I say heheh
    I had been having a crack at this problem in a thread a while back in the Mac OSX subforum, and had narrowed it to either pppd lying about successfull authentication or timings.

    Way to go guys
    05-03-09 06:27 AM
  9. csete's Avatar
    My preference would be a patch, but to be honest it was pain in the *ss to get this thing to compile in the first place. I'm not sure I could walk people through it and I definitely don't want to have a bunch of people asking the darwinbuild guys all of the questions I just finished asking them.

    tomte: If you are willing to be a guinea pig when you get back, maybe I can work with you to walk through "installing" this binary and once you have validated it we could unleash it on the larger world?
    05-03-09 07:27 AM
  10. tomte's Avatar
    ah, i'm willing to help
    I'll be back in europe in a few days, how do we start ?
    Cheers
    05-05-09 11:20 AM
  11. csete's Avatar
    I will put details together this weekend to walk you through it...
    05-06-09 10:32 AM
  12. tomte's Avatar
    perfect, i just can't wait
    Meanwhile, I compiled a new pppd binary with a higher loop number ( but of course nothing as smart as your patch ) to get through.
    If someone's interrested, be as smart as darkone and BACKUP the original one before.
    05-06-09 11:55 PM
  13. Savy's Avatar
    perfect, i just can't wait
    Meanwhile, I compiled a new pppd binary with a higher loop number ( but of course nothing as smart as your patch ) to get through.
    If someone's interrested, be as smart as darkone and BACKUP the original one before.
    Hi, where this file is located on Mac ?

    I'm a niubbie....could you please help me ?

    Thanks....
    05-07-09 01:07 AM
  14. csete's Avatar
    Well geez... If you know how to compile your own pppd, what do you need me for? :-) I will go ahead and just attach mine at this point as well and let people have at it.

    This file needs to replace the version in /usr/sbin. The steps that are necessary are:

    sudo mv /usr/sbin/pppd /usr/sbin/pppd.orig
    unzip pppd.zip
    sudo cp pppd /usr/sbin/pppd
    sudo chmod 4511 /usr/sbin/pppd

    The next time you attempt to use your tethered connection, you will get a warning dialog about the new executable. You should tell the system that the executable is OK. (I forget the text of the message). After that, it should continue as normal.

    I used this new functionality a couple of times on the bus to an away soccer game last night. Worked great and I got reasonable speeds while on the road. As it currently stands, this version always adds a 1 second delay after all PPP configuration failures. The code could certainly be improved and I may do that in the future.

    tomte: How did you go about getting pppd recompiled? If you didn't have to fight with it as much as I did, it may be worth trying to walk people through building from source rather than dealing with binaries which might break from OS release to OS release.
    05-07-09 05:54 AM
  15. Savy's Avatar
    I will try with you file....

    Thanks again....

    Another question : it's possible to make a backup of the origina ppps ?
    05-07-09 06:10 AM
  16. csete's Avatar
    The first line of commands I listed is making a backup of pppd called pppd.orig

    Please be careful if you aren't very savvy with this stuff. I'd hate to have you break your machine completely. Understand that making changes like this is something you do at your own risk and Apple won't be happy trying to fix your machine if you break it.
    05-07-09 07:08 AM
  17. tomte's Avatar
    hah
    i'm not sure you want to know what ugly tricks i used to make it work. First of all : i'm _not_ a developer, but i do poke this species with a stick sometimes.
    So here's what I tried :
    1. compiled the opensource ppp tarball from samba's official rep, to no avail (no darwin support).
    2. Got the xcode project from apple's dev site.
    3. Opened the project, changed the loop values in fsm.h and tried to compile the pppd(tool) target : it miserably failed.
    4. some header files were needed to make the compilation work, so i (don't shout) found them and edited the paths where the source was looking for it or even worse, discarded it ( just one, in sysMacOSX.C l 80 : /* #include <SystemConfiguration/SCPrivate.h> */)
    Then the target built successfully, put the newly compiled pppd binary in place and voil.
    I've been using it since this morning as i'm now back in a flat-rate roaming area. With my binary the NaKs in the negociation can go up to id=0x1c (starting from id=0x1) but eventually got a ConfRej that let the negociation go on. I've tried 10 times in a row, 100% success so far.
    05-07-09 08:15 AM
  18. darkone338's Avatar
    Just wanted to say that I installed the latest pppd from csete and it has worked 100% of the time. 3G, 2G and with data services enabled.

    Once again a big thanks to Csete and Tomte for their hard work on this!
    05-07-09 09:49 AM
  19. rush0's Avatar
    Man that sucks, OP's original instructions worked without a hitch for me... (.247)
    05-07-09 09:53 AM
  20. Savy's Avatar
    Xcuse me..... I need to compile the pppd or you file its already compiled..?.. I know, with mac I'm a dummy....
    Last edited by Savy; 05-07-09 at 10:04 AM.
    05-07-09 10:02 AM
  21. tomte's Avatar
    savy : those are binaries : both are compiled programs. You should stick to Csete's instructions in post #139 to install one of those alt. pppd. Btw Csete's lines should be typed in Terminal, but if you did not know this before it is maybe too risky for you to try this out until you are familiar with at least the basic commands of Terminal.
    05-07-09 12:05 PM
  22. Savy's Avatar
    HI tomte, thanks for your help....
    I know how terminal works, I'm not very familiar with binaries that's why I asked...

    Thanks again
    05-07-09 12:13 PM
  23. Fabmaclover's Avatar
    OMFG. tyroleanarcher, you are the king! That last step did the trick!

    I'm on my mac right now, tethering from my berry on bluetooth.
    OS 10.5.6
    BlackBerry Bold 4.6.0.266

    Speedtest to prove it:


    hey Xcist i need some help here

    i got the same gears than you: bold with os 266 and i am with rogers as well with a macbook 10.5.6 but no luck for me

    can you share your settings and the steps please ?
    05-07-09 04:13 PM
  24. 328iGuy's Avatar
    Another newbie question guy's. Where do we drop the PPPD file?

    I Am on Bold 9000 with .266 and Macbook Pro 10.5.6
    05-07-09 10:02 PM
  25. Savy's Avatar
    doesn't work for me.... When I click connect nothing happen... Appears only "Calling..." on the status bar for a second then nothing.

    I will try to do again.
    I'm am on tiger.....!

    ps. after I did as csete wrote I had no warning dialog! :|
    ...but now I'm unable to restore the original file. It's possible to find It on the internet ?


    Thanks
    Last edited by Savy; 05-08-09 at 01:35 AM.
    05-08-09 01:32 AM
238 ... 45678 ...
LINK TO POST COPIED TO CLIPBOARD