webOS Nation Forums >  webOS tablets >  HP TouchPad homebrew > [HP TouchPad] Add Bluetooth DUN/PAN for non-WebOS device-tethering.
[HP TouchPad] Add Bluetooth DUN/PAN for non-WebOS device-tethering.

  Reply
Like Tree4Likes

 
LinkBack Thread Tools Display Modes
Old 11/01/2011, 08:45 AM   #21 (permalink)
Member
 
Join Date: Aug 2011
Location: Sacramento, CA
Posts: 231
Likes Received: 11
Thanks: 12
Thanked 5 Times in 5 Posts
Default

hrm well i did some poking around using novaterm and with the help of the WebOS Internals site particularly the New Bluetooth Page.

Wasn't able to get far though. Here's what I was able to come up with:

First off it seems the known Palm Bluetooth related files in /usr/bin are
PmBtEngine
PmBtStack
PmBtStart

PmBtStart being the bash script that seems to start Bluetooth.
here is the code for those interested:
Code:
#!/bin/sh                                                                      
      
# don't use highspeed UART                                                     
NOHU=/var/log/NOHU                                                             
                                                                               
# Startup script to load CSR stack and start Bluetooth Engine                  
                                                                               
# Use BTid ROM token if available, otherwise btconfig.  If no btconfig,        
# append 2 randomly generated bytes to 'ID' below, and update btconfig.        
ID="00:02:5b:12"                                                               
btid=`cat /dev/tokens/BToADDR`                                                 
if test -z $btid; then                                                         
   btid=`cat /var/log/btconfig`                                                
   if test -z $btid; then                                                      
      # get two random bytes in the right format                               
      btid="$ID:`dd if=/dev/urandom bs=2 count=1 | hexdump -e '1/1 \"%02x:\"'`"
      btid=`expr substr "$btid" 1 17`                                          
      echo $btid > /var/log/btconfig                                           
   fi                                               
fi                                                  
                                                    
STACK_NAME=PmBtStack                                
ENGINE_NAME=PmBtEngine                                       
CONTACTS_NAME=PmBtContacts                                   
STACK_PATH=/usr/bin/$STACK_NAME                              
 
btck=26000      # 26MHz clock                                                  
btbaud=115200 # default 115200 baud rate                                       
PS_PORT=16888                                                                  
                                                                               
# initialize default non-highspeed UART port                                   
DEV=/dev/ttyS2                                                                 
                                                                               
# load CSR stack                                                               
if test -e $STACK_PATH; then                                                   
   echo $PS_PORT > /var/log/btport                                             
                                                                               
   # load and use highspeed UART driver if available                           
   if test -e /dev/bt_uart && ! test -e $NOHU; then                            
      DEV=/dev/bt_uart                                                         
          btbaud=3686400                                                       
   fi                                                                          
                                                    
   killall -w $ENGINE_NAME                          
   killall -w $STACK_NAME                           
   killall -w $CONTACTS_NAME                        
   echo exec $STACK_PATH -C $DEV -X $btid -F $btck -U $btbaud
   exec $STACK_PATH -C $DEV -X $btid -F $btck -U $btbaud     
else                                                         
   logger -t $0 '*** BT stack failed to start.'              
fi
The BT device itself seems to be located at /dev/bt_uart

also it looks like bsl0 is the bluetooth interface in network config(ifconfig -a) as it corresponds to the MAC address of the TouchPads own bluetooth chip.
I'm not sure what the other interfaces are for besides eth0(wifi) and lo(local loopback). There also is a dummy0, gre0, and rmnet0 through rmnet7. I also noticed none of the interfaces correspond to the MAC address of my Blackberry Phone.

That's about as far as I got though. I wasn't able to figure out how to get PmBtStack to run in debug mode or output it either to the shell or logs to see if the PAN profile is actually found and initialized in 3.0.4. I've seen debugging outputs from others showing PAN being registered and initialized assuming those were WebOS 2.x or older though since I couldn't figure out debugging. Killing the two Bluetooth engine related processes and restarting them normally would result in errors or cause it to hang at the shell for myself in 3.0.4.

checking for Palm Bluetooth running processes reveals as follows:
Code:
ps aux | grep PmBt 
root      2191  0.0  0.3  65780  3280 ?        S<Ll 04:22   0:00 /usr/bin/PmBtStack -C /dev/bt_uart -X **:**:**:**:**:** -F 26000 -U 3686400
root      2392  0.0  0.4  58528  4020 ?        SLl  04:22   0:00 /usr/bin/PmBtEngine {"list":["hfp/hsp","hf","a2dp","avrcp","opp","opps","spp","mapc","hid"]}
from there it doesn't look like it PAN is loading and it seems like the Bluetooth Profiles are loaded from within PmBtEngine itself(second line). However maybe its not loading because my Blackberry only supports DUN?

I'm wondering if it may be possible to insert a profile for DUN/PAN into the end of the PmBTStart script? If not it sounds like it needs to be within PmBTEngine itself. The problem with that is its compiled code thus unreadable and Palm hasn't released the source for it. I doubt they will since their Bluetooth engine is supposedly proprietary as well although it cant hurt to bug them by constantly requesting it

Otherwise the only options for getting DUN/PAN support on the TP is to find a way to install a different Bluetooth Engine like that WebOS Internals article talked about, beg HP to add support(again not looking likely), or move to using Android on the TP instead of WebOS(a thought that will probably make many here cringe ).
crucialcolin is offline   Reply With Quote
Old 11/10/2011, 06:59 AM   #22 (permalink)
Member
 
Join Date: Oct 2011
Posts: 8
Likes Received: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

anyone know If the plan on Implementing support for this in the next update
junoty1 is offline   Reply With Quote
Old 11/12/2011, 06:04 PM   #23 (permalink)
Member
 
Join Date: Aug 2011
Location: Sacramento, CA
Posts: 231
Likes Received: 11
Thanks: 12
Thanked 5 Times in 5 Posts
Default

Would be nice but considering webOS has never supported it as a client combined with a move towards just using wifi instead with newer smartphones for tethering I doubt it will ever happen.

I suppose constantly asking HP support for it couldn't hurt though. Just not sure we'd get enough people interested in doing so.
crucialcolin is offline   Reply With Quote
Old 12/01/2011, 03:10 PM   #24 (permalink)
Member
 
Join Date: Jul 2010
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Even if you were able to setup the connection (not a problem because you are _connecting_ to a DUN service which is basically a RFCOMM port, not exposing one), I've always found it hard to confuse WebOS into thinking it has a network connection active.
javispedro is offline   Reply With Quote
Old 12/01/2011, 07:34 PM   #25 (permalink)
Member
 
mauro1's Avatar
 
Join Date: May 2009
Location: Tampa, FL
Posts: 200
Likes Received: 9
Thanks: 21
Thanked 16 Times in 15 Posts
Default

for my money, I have setup tethering between my thinkpad and my pre phone via all three methods (WiFi,BT,USB), and they work reliably. I find myself using the BT transport very seldomly due to bandwidth limitations of the transport. So I only use BT when a) the WiFi spectrum is really crowded and b) I do not have a USB cable handy.
__________________
-----
Palm Pilot -> IBM WorkPad -> Handspring Visor -> Palm VIIx -> Palm T|X -> Palm Pre -> [ Unlocked US GSM Palm Pre 2 and 16GB HP TouchPad ]
mauro1 is offline   Reply With Quote
Old 01/13/2012, 01:47 AM   #26 (permalink)
Member
 
Join Date: Oct 2011
Posts: 8
Likes Received: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

working on tp android BlackBerry + Android Tablet BT Tether Guide - xda-developers
junoty1 is offline   Reply With Quote
Reply

 

Tags
bluetooth, bluez, freetether

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0