This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

two connections available - how to set up the used one?

General support and discussion of Eggdrop bots.
Post Reply
d
desired
Voice
Posts: 31
Joined: Mon Sep 12, 2011 5:17 pm

two connections available - how to set up the used one?

Post by desired »

I have two ways to connect to the internet available (WiFi and GPRS).

How can I tell the eggdrop, which connection it shall use?

At the moment it uses WiFi and GPRS as a fallback if WiFi isn't available. This isn't very good, because I turn off my router while I am not on PC, so the bot always loses connection...

I also dislike to turn off WiFi permanently, because I need it for some other stuff...

Would be better if the bot would always use GPRS. (Data quota is not a problem, I have unlimited GPRS. Connection speed and ping seams also good enough.)

Just need to tell the bot, which connection it shall use. How can I do so?
eggdrop running on Android powered mobile phone - Yes, it is possible! - Very reliable.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Use the "my-ip" setting, and set it to the IP of the interface you'd like to use. Be adviced that your eggdrop will only use this IP, while it's set, regardless of the GPRS-link state.
NML_375
d
desired
Voice
Posts: 31
Joined: Mon Sep 12, 2011 5:17 pm

Post by desired »

I'll show you the output of ifconfig.

Code: Select all

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1331 (1.2 KiB)  TX bytes:1331 (1.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 30:17:c8:be:5c:af
          inet addr:192.168.2.100  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::3217:c8ff:febe:5caf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:47950 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27540 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:27053868 (25.8 MiB)  TX bytes:5472117 (5.2 MiB)
Started eggdrop with -n (this does normally work, with -n and without, -n just for debugging) and set my-ip to 127.0.0.1.

Code: Select all

[20:26] main: entering loop
[20:26] Trying server irc.quakenet.org:6667
[20:26] Failed connect to irc.quakenet.org (Invalid argument)
[20:26] net: connect! sock 11
[20:26] net: eof!(read) socket 11
[20:26] (@) EOF socket 11, not a dcc socket, not anything.
As I expected, set my-ip 127.0.0.1 does not work at all.

set my-ip 192.168.2.100 does work but then it's WiFi with GPRS as fallback, not like I wanted.

My worry is, that the underlying Android system (which is also based on linux) does decide which connection will be used. The rmnet0 adapter, I can only see in ifconfig, if WiFi is disabled.

Any idea?
eggdrop running on Android powered mobile phone - Yes, it is possible! - Very reliable.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'm not that at home with Android, though it sounds reasonable that the system won't bring up the GPRS connection for as long as the WiFi connection is still alive. I don't suppose you could simply "ifup rmnet0" ?
NML_375
d
desired
Voice
Posts: 31
Joined: Mon Sep 12, 2011 5:17 pm

Post by desired »

nml375 wrote:I don't suppose you could simply "ifup rmnet0" ?
Says "ignoring unkown interface rmnet0=rmnet0".

But was a great idea! I wasn't aware of that function.

I guess ifup does not work, because the underlying Android is not debian.

Somehow it must be possible to activate that interface. I just need to find out how.
eggdrop running on Android powered mobile phone - Yes, it is possible! - Very reliable.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, since GPRS/UMTS-connections are established using the standard Point-to-Point Protocol, as long as you can find all the dialling parameters, you could always start pppd manually.
NML_375
d
desired
Voice
Posts: 31
Joined: Mon Sep 12, 2011 5:17 pm

Post by desired »

nml375 wrote:Well, since GPRS/UMTS-connections are established using the standard Point-to-Point Protocol, as long as you can find all the dialling parameters, you could always start pppd manually.
Could you help me with that please?

So far I found no one on google who created his own pppd connection using Android.

I even have no idea how to find out the name of the device (modem), how?
eggdrop running on Android powered mobile phone - Yes, it is possible! - Very reliable.
Post Reply