LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-09-2010, 04:38 PM   #1
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Rep: Reputation: 44
tethering from android phone to slackware


Hi,

I've just got a nice HTC Desire (ie almost the same model as the Nexus One), and it can work as a modem for accessing the internet. After googling this, I've found out that on debian it works straight without adding any package, just as the pjone is connected. This is not the case on slackware 13... Has anyone got this to work already? What am I missing?
 
Old 04-09-2010, 10:59 PM   #2
mdek
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Rep: Reputation: 0
If you're using the "Wired Tether for Root Users" android app, then upon activation and plugging it in, slackware should automagically create a network interface named usb0. You can "activate" it with 'dhclient usb0' and it should work. If you're using Wireless tether, then you need to connect to the phone AP. I'm not sure how Pdanet works as I haven't needed to use it on android.
 
Old 04-10-2010, 07:13 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I have received a HTC Desire yesterday and have had a lot of fun with it already.
When I connect it through the USB cable with my Slackware laptop, the HTC pops up a dialog what I want with that USB connection: power the phone over USB, or make the CF card available as USB storage, or provide USB tethering (they call it "network sharing" - acting as a modem to the Slackware box).

Indeed, a usb0 network device will become available if I choose network sharing and "dhcpcd usb0" was enough to type this message using the phone as a gateway to the internet :-)

Eric
 
Old 04-10-2010, 07:16 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
As a side note, I assume that theless liberal telephony market in the US will prevent HTC from offering this easy way to use the phone as a USB network device. There aren't even tethering apps available in the Android Market in US/Canada I heard. So, YMMV.

Eric (again, sent through the Android phone)
 
Old 04-11-2010, 02:27 AM   #5
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Original Poster
Rep: Reputation: 44
must be missing kernel option...

Quote:
Originally Posted by Alien Bob View Post
Indeed, a usb0 network device will become available if I choose network sharing and "dhcpcd usb0" was enough to type this message using the phone as a gateway to the internet :-)
Eric
Ok, I've tried this also (my plan is with vodafone uk) but no luck with a usb0 network device. I have a custom kernel so most likely I have some crucial option missing. Will look into this and report here.

I'm loving the HTC desire, except the battery life that is not great...

Metageek
 
Old 04-11-2010, 10:08 AM   #6
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Original Poster
Rep: Reputation: 44
modules needed for usb0 with android phone

Ok, so I checked with hugesmp kernel and found out which modules are needed so that I could add them to my customized kernel (2.6.32). These are the options needed:
Code:
-> Device Drivers
 -> Network device support (NETDEVICES [=y])
  -> USB Network Adapters
  <M> Multi-purpose USB Networking Framework   
  -M- CDC Ethernet support (smart devices such as cable modems)
  <M> CDC EEM support  
  <M> Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
  <M> Simple USB Network Links (CDC Ethernet subset) (NEW)   

-> Device Drivers
 -> Network device support (NETDEVICES [=y])
  -> Wireless LAN (WLAN [=y])
   -> Wireless LAN (IEEE 802.11) (WLAN_80211 [=y]) 
    <M>   Wireless RNDIS USB support
with these modules the usb0 network device is added automatically as I select the option for Internet sharing when I plug in the phone. Now I just need to create some rules for udev (or hal) to automatically do a dhcpcd usb0 when this is connected, and it will work fully automatically.

metageek
 
Old 05-03-2010, 10:36 AM   #7
sub501
LQ Newbie
 
Registered: May 2010
Distribution: always... slackware current
Posts: 2

Rep: Reputation: 0
A simple udev rule which call dhcpcd, paste it in /etc/udev/rules.d/51-htc_desire.rules :

# ---
# Htc Desire USB tethering
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0ffe", MODE="0666", RUN+="/sbin/dhcpcd $env{INTERFACE}"
# ---

idVendor 0bb4 is HTC
idProduct is for HTC Desire, replace with your product id in case you have a Legend for example.

Reload udev: "/etc/rc.d/rc.udev reload"

and enjoy.

Last edited by sub501; 05-03-2010 at 10:42 AM.
 
Old 05-03-2010, 11:05 AM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by sub501 View Post
A simple udev rule which call dhcpcd, paste it in /etc/udev/rules.d/51-htc_desire.rules :

# ---
# Htc Desire USB tethering
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0ffe", MODE="0666", RUN+="/sbin/dhcpcd $env{INTERFACE}"
# ---

idVendor 0bb4 is HTC
idProduct is for HTC Desire, replace with your product id in case you have a Legend for example.

Reload udev: "/etc/rc.d/rc.udev reload"

and enjoy.
Why not also de-configure the interface when you remove the Android phone?
Code:
# ---
# Htc Desire USB tethering
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0ffe", MODE="0666", ACTION=="add", RUN+="/sbin/dhcpcd $env{INTERFACE}"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0ffe", MODE="0666", ACTION=="remove", RUN+="/sbin/dhcpcd -k $env{INTERFACE}"
# ---
I would also not use a mode of "666". That is too insecure.

Eric
 
Old 05-05-2010, 12:31 PM   #9
sub501
LQ Newbie
 
Registered: May 2010
Distribution: always... slackware current
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by Alien Bob View Post
Why not also de-configure the interface when you remove the Android phone?
Code:
# ---
# Htc Desire USB tethering
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0ffe", MODE="0666", ACTION=="add", RUN+="/sbin/dhcpcd $env{INTERFACE}"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0ffe", MODE="0666", ACTION=="remove", RUN+="/sbin/dhcpcd -k $env{INTERFACE}"
# ---
I would also not use a mode of "666". That is too insecure.

Eric
Yep, Alien Bob is right.
 
  


Reply

Tags
android, modules



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
android phone at&t Polanski Linux - Mobile 5 03-31-2010 08:51 PM
LXer: Google bans tethering app from Android Market LXer Syndicated Linux News 0 04-01-2009 02:10 PM
LXer: Jailbreaking the Google Android G1 Phone LXer Syndicated Linux News 0 11-07-2008 07:50 PM
LXer: Everything You Wanted to Know about the New Android Cell Phone LXer Syndicated Linux News 0 09-17-2008 03:50 AM
LXer: Android phone could come in November LXer Syndicated Linux News 0 08-19-2008 06:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration