Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477560 - app-mobilephone/easytether - Helper utility to tether Android-powered smartphone with EasyTether
Summary: app-mobilephone/easytether - Helper utility to tether Android-powered smartph...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://www.mobile-stream.com/easyteth...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 09:02 UTC by A. Person
Modified: 2023-03-30 13:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A. Person 2013-07-21 09:02:53 UTC
easytether is an Android app for tethering your computer to your phone.  It disguises the fact that it's tethering so carriers can't prevent you from tethering.  It requires an executable and udev rule on the client computer:

http://www.mobile-stream.com/easytether/drivers.html
Comment 1 A. Person 2013-07-21 09:03:10 UTC
Also, it works great.
Comment 2 Fletch Hasues 2014-02-02 20:39:32 UTC
Just a note.  Gentoo provides the tools for a user to make this work.  It would be nice however, or Gentoo to perhaps package the logic for making this work in an ebuild (deploying the easytether application, creating the network rules to make this work).

To make this work for me, I did the following:

Install the easy tether application in /usr/local/bin (/usr/local/bin/easytether)
ln -s /etc/init.d/net.lo /etc/init.d/net.easytether0

In /etc/conf.d/net add the following:


up_before_preup_easyconnect0="YES"

preup() {
        # Attempt to detect the easyconnect0 interface and start it's programs
        /usr/local/bin/easytether connect > /dev/null 2>&1 &

        # I hate using sleep statements, but there needs to be a duration before
        #  the link is displayed correctly.
        sleep 3
        # Using iproute2, see if the link now exists.
        ip link show easytether0 > /dev/null 2>&1
        # Ensure the above check worked correctly and an interface exists.
        #  of an interface existing.
        if [ $? -eq 0 ]
        then
                # The interface exists.  Trap the pid so it can be killed later
                ps -fC easytether h |awk {'print $2'} > /var/run/easytether.pid
                # Successful creation of interface.
                return 0
        else
                # Interface was not created.  Inform user.
                echo "Unable to connecto EasyTether"
                return 1
        fi

}


postdown() {

        # First, see if a pid file was recorded...
        if [ -f /var/run/easytether.pid ]
        then
          # If a pid file was recorded, attempt to see if the process is
          # running that is recorded in the pid file.
          if [ "$(ps -p $(cat /var/run/easytether.pid) -o comm=)" == "easytether" ]
          then
            # If easytether is running.. kill its process.
            kill -15 $(cat /var/run/easytether.pid)
 
            if [ $? -eq 0 ]
            then
              # If the process was killed correctly, remove the pid file.
              rm /var/run/easytether.pid
            else
              # Otherwise inform the user that the PID can't be killed and
              #  flag an error.
              echo "Error:  Could not kill the PID of /var/run/easytether.pid"
              return 1
            fi
          # If the easytether process is not recorded that was in the pid file..
          else
            # Looks like the easytether process is gone (abruptly shut down or
            # disconnected.  Just remove the pidfile and clean up.
            echo "Easytether process not found.  Cleaning up."
            rm /var/run/easytether.pid
          fi
        # Otherwise, if there was no pid file, just ensure service is stopped.
        else
          kill -15 $(ps -C easytether h -o pid=) > /dev/null 2>&1
          # Make sure to state success if no error is reported.
        fi

        # Successful shutdown
        return 0
}

Some givens are that dhcp and ifplug run on this interface when it is created.
Anyway, the added configuration allows easytether to work.  How Gentoo wishes to incorporate it if desired is their choice.
Comment 3 A. Person 2014-02-02 22:52:34 UTC
Thanks Fletch.  I'm not traveling anymore so I'm not using easytether but this is great to have for the future.  Maybe Gentoo will even incorporate it.
Comment 4 Fletch Hasues 2014-02-03 01:16:48 UTC
No problem.  I have seen an ebuild for easytether somewhere, so one could add the overlay that contains it.

Additionally, I might add that the preup and postup statements above need if conditions that use the IFACE variable to check if easytether0 is the interface being configured.  Otherwise, the above code runs for every interface.
Comment 5 nncyx 2023-03-30 13:20:30 UTC
I'm still new to Gentoo. How did you install easytether application in /usr/local/bin ?