I am looking for a way to initiate a PPP connection with my EVDO modem from the command line instead of having to go to System Preferences -> Network and hit "Connect".
|
To connect a network device, use the
assuming the name of the service is
To disconnect, change
Once you've saved your scripts with names, you can use the terminal |
|||||||||||
|
|
I'm sure there is a more elegant way, but this could be done with UI scripting. I don't have an EVDO modem, so I can't give the specifics of the script that would work, but first you would go to -> System Preferences -> Universal Access and make sure "Enable access for assistive devices" is checked. Then, you could write a script using a text editor. As I said, the specifics of the script would depend on your system and the layout of the screen you're trying to control, but it would look something like this:
You'd save the script, make it executable, and then you could enable your modem from the command line. I'm sure there's a more elegant way that doesn't involve popping up a window and that doesn't involve so much trial and error at the "click button 1" stage, but this is a start. |
|||||
|
|
I think this can be done using pppd. You'll need to find the device name (/dev/tty...) and read through the long list of available options but it looks like that could work. |
|||
|

opensnoop, the otherfs_usage(without your modem, it's hard to guess where your scripts are stored) – bmike♦ Aug 30 '11 at 13:51