1b73d Tethering FreeBSD with Android - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Networking

Networking Network related discussions (including general TCP/IP stuff, routing, etc).

Reply
 
Thread Tools Display Modes
  #1  
Old July 29th, 2012, 16:01
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tethering FreeBSD with Android

Hi all, I've used FreeBSD in the past but struggled with mobile broadband, so I have mainly been using Linux. As anyone had experience with tethering FreeBSD with an Android phone, I've googled around but I haven't found a lot and wondered if FreeBSD supports it.

Thanks...
Reply With Quote
  #2  
Old July 30th, 2012, 10:35
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,713
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

It shouldn't be difficult but it does take a bit of fiddling. I've done it in the past.

First you'll need to get a bluetooth connection using RFCOMM. You can then use the 'standard' PPP connection. Usually you need to dial a special phonenumber; *99#.

32.4 Bluetooth
Chapter 28 PPP and SLIP
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old July 30th, 2012, 11:05
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply SirDice, when I was using my Android to tether my Linux laptop I used a cable from my Phone to may laptop connected to usb. Which once connected created /dev/usb0, then I used dhcpcd to get an ip and was wondering if the would apply with FreeBSD.
Reply With Quote
  #4  
Old July 30th, 2012, 11:23
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,713
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

I've done it with Bluetooth and a Nokia phone. I haven't tried it yet with my new Android phone though.

The idea would be the same. Instead of a Bluetooth connection, it'll be a (serial) USB connection. Setting up PPP should be the same.

I haven't done this as setting up a temporary Wifi hotspot with my Android phone was a lot easier to do.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #5  
Old August 15th, 2012, 15:20
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've just installed FreeBSD 9 and tried to plug in usb cable to attempt to tether. Here is some output.

lsub
http://zlin.dk/p/?MWQwZWRl

dmesg
http://zlin.dk/p/?MDZiZWNl

I'm not sure if FreeBSD is seeing my phone as a storage device, with linux it creates usb0. Whether I need to load a module manually, kldstat shows kernel and modem.ko modules loaded.
Reply With Quote
  #6  
Old August 15th, 2012, 15:47
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 589
Thanks: 44
Thanked 181 Times in 90 Posts
Default

It should be very easy. On the phone you need to set the connection sharing method to "Mac OS X" (I don't know if "Windows" would also work) and then connect your phone to the notebook and share the connection.
On FreeBSD you should have a "ue0" network device then and just run # dhclient ue0.
Reply With Quote
  #7  
Old August 15th, 2012, 18:15
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ime@, it doesn't create a device when the cable is plugged in and I can't find any option for sharing method with "Mac OS X" on my phone. I was wondering if I used a USB to Ethernet adapter, which would mean I would be plugging it into a physical device(fxp0)?
Then I could use dhclient, don't know if that would work until I figured this out.
Reply With Quote
  #8  
Old August 16th, 2012, 13:38
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 589
Thanks: 44
Thanked 181 Times in 90 Posts
Default

Maybe you need to load the if_cdce kernel module first. Does # kldstat -v | grep cdce return anything? If not issuse # kldload if_cdce and plug in your phone.
Reply With Quote
  #9  
Old August 16th, 2012, 16:15
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ime@ when i run

I get "317 uhub/cdce", so i presume the module is already loaded?
Reply With Quote
  #10  
Old August 16th, 2012, 16:28
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 589
Thanks: 44
Thanked 181 Times in 90 Posts
Default

Yes, it's loaded. Hmm, and I guess on your phone you chose to share your connection via USB?
Reply With Quote
  #11  
Old August 16th, 2012, 16:48
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, i've chosen USB to tether on my phone. Here is the output from dmesg, I get nothing about ue0 but something of da0?

http://zlin.dk/p/?ZGZhMDFh
Reply With Quote
  #12  
Old August 17th, 2012, 08:26
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 589
Thanks: 44
Thanked 181 Times in 90 Posts
Default

Code:
umodem0: <CDC Abstract Control Model ACM> on usbus1
umodem0: data interface 2, has no CM over data, has no break
But you have a umodem device.
Can you show the output of ifconfig(8)?
Reply With Quote
  #13  
Old August 17th, 2012, 09:01
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the output of "ifconfig -a" when my phone is plugged into USB.

http://zlin.dk/p/?YjI4NmUx
Reply With Quote
  #14  
Old August 17th, 2012, 09:42
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 589
Thanks: 44
Thanked 181 Times in 90 Posts
Default

Hummm.... strange...
What Android phone do you have?
Reply With Quote
  #15  
Old August 17th, 2012, 10:00
vermaden's Avatar
vermaden vermaden is offline
Giant Locked
 
Join Date: Nov 2008
Location: pl_PL.lodz
Posts: 2,192
Thanks: 59
Thanked 633 Times in 349 Posts
Default

@Harry_the_rat

I am using it from time to time, with WiFi Hotspot from Android phone. FreeBSD works/connects to it as to any other Access Point. I haven't tried USB tethering thought.
__________________
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
http://vermaden.blogspot.com
Reply With Quote
  #16  
Old August 17th, 2012, 10:44
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 589
Thanks: 44
Thanked 181 Times in 90 Posts
Default

The hotspot method should work, but it sucks a lot more of power of your phone's battery.
Reply With Quote
  #17  
Old August 17th, 2012, 11:51
Harry_the_rat Harry_the_rat is offline
Junior Member
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ime@, I have Samsung Galaxy Y phone, I have also tried this on Vodafone 858 Smart this morning with same effect, which are both Android phones.
@vermaden, I haven't tried wifi yet with FreeBSD but have a few wireless cards to try. I'd prefer to use tethering with a cable though.
Reply With Quote
  #18  
Old August 17th, 2012, 12:04
vermaden's Avatar
vermaden vermaden is offline
Giant Locked
 
Join Date: Nov 2008
Location: pl_PL.lodz
Posts: 2,192
Thanks: 59
Thanked 633 Times in 349 Posts
Default

Quote:
Originally Posted by lme@ View Post
The hotspot method should work, but it sucks a lot more of power of your phone's battery.
Yup, its best to attach the phone to USB (for battery charging) for the time of WiFi Hotspot use
__________________
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
http://vermaden.blogspot.com
Reply With Quote
  #19  
Old March 14th, 2013, 16:16
FBI_Guy FBI_Guy is offline
Junior Member
 
Join Date: Mar 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry if this thread is considered dead and I shouldn't be reviving it, but I'm having the same problem as described here. I'm wondering if anyone else knows anything about this and would be willing to give some advice.

Thank you.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Android app? kr651129 Feedback 3 June 27th, 2012 00:02
Why doesn't Android use FreeBSD? bleakwind Off-Topic 23 February 13th, 2011 21:15
Android+FreeBSD venjun2000 FreeBSD Development 3 December 25th, 2010 08:03
iPhone usb tethering andrnils Peripheral Hardware 8 August 19th, 2010 22:34
eclipse + subversion + android sdk? mathuin Installation and Maintenance of FreeBSD Ports or Packages 1 July 15th, 2009 19:04


All times are GMT +1. The time now is 07:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0