Author Topic: How To Control Internet Connection From Console?  (Read 2402 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
How To Control Internet Connection From Console?
« on: September 04, 2005, 02:34:29 pm »
Hello,

how can I control the Internet connection (usually controlled via the taskbar applet or via Menu items "Connect" / "Disconnect") from a shell script via console commands?

Thank you

daniel
« Last Edit: September 06, 2005, 03:34:49 pm by daniel3000 »
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
How To Control Internet Connection From Console?
« Reply #1 on: September 04, 2005, 07:11:39 pm »
ifconfig or iwconfig should help you.  

Code: [Select]
ifconfig eth0 down  will bring down your interface for eth0 if that is your wireless interface.

I'm not sure how to do it with iwconfig and iwconfig -h didn't help me.  Niether did the manpage on my linux box.
« Last Edit: September 04, 2005, 07:16:07 pm by bluedevils »
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
How To Control Internet Connection From Console?
« Reply #2 on: September 05, 2005, 07:57:20 am »
Well, I'm rather searching for the actual command which is executed if the taskbar applet is used. I think it is a qcop message.
But I don't know which one.

The Start Menu entries for "connect" and "disconnect" (/opt/Qtopia/apps/__6x0?0*.desktop) have "Embedded=network_connect" and "Embedded=network_disconnect" in the place where other apps have their command line.

But I do not know what this really does.

Thanks

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
How To Control Internet Connection From Console?
« Reply #3 on: September 06, 2005, 07:54:37 am »
doesn't the wizard merely use "cardctl scheme" in some way?
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

zmiq2

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
    • http://
How To Control Internet Connection From Console?
« Reply #4 on: September 06, 2005, 11:34:43 am »
Hi daniel,

you can try somwthing like

# qcop "QPE/Network" "up()"

see more at https://www.oesf.org/index.php?title=Sharp_...a_QCop_Messages

HTH
sl-c750, archos av580, socket cf [bt, wifi, modem], noname cf lan, audiovox rtm800 gsm-gprs cf, rom: sharp -> oz3.5.3 -> cacko -> oz3.5.4.1

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
How To Control Internet Connection From Console?
« Reply #5 on: September 06, 2005, 03:37:05 pm »
Quote
qcop "QPE/Network" "up()"

[div align=\"right\"][a href=\"index.php?act=findpost&pid=94707\"][{POST_SNAPBACK}][/a][/div]

Thanks! That's what I was looking for!

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0