View previous topic :: View next topic |
Author |
Message |
ozonator Guru
Joined: 11 Jun 2003 Posts: 591 Location: Ontario, Canada
|
Posted: Sat Oct 16, 2004 7:20 pm Post subject: Re: [HOWTO] Bluetooth and Palm (or PocketPC) Network and Syn |
|
|
meulie wrote: | A newbie-question: the Host IP Address, should that be the same as the IP address of the machine that has the bluetooth unit connected, or should '<Host IP Address>:<Client IP Address>' be its own little 2-node network? |
It's its own little 2-node network. I've set mine to be two otherwise unused IPs on my home net -- e.g., with a home net of 192.168.0.0/24, I would use 192.168.0.100:192.168.0.101 for host:client, assuming neither is already in use on your subnet. I'm not completely sure, but I don't think you have to use IPs on an existing subnet, since I assume ppp will handle routing through the host computer appropriately; I did it that way just to make things a bit simpler to remember. |
|
Back to top |
|
|
rcxAsh Guru
Joined: 03 Jul 2003 Posts: 457 Location: /etc/localtime
|
Posted: Thu Jan 06, 2005 3:40 pm Post subject: |
|
|
Thanks for the guide!
Still can't hotsync, but even before that, I'm trying to get the network connection going.
I have to continually do the:
Code: | mknod /dev/rfcomm0 c 216 0 |
Before I can ever connect (else I get the PPP timeout). Interestingly... I think that when I first start the daemons, rfcomm0 is created. However, I can't connect initially. After failing the first time, the node disappears. Then I create it manually and I can connect. Disconnecting will cause the node rfcomm0 to disappear again. The next time when I try to connect again, rfcomm0 is created automagically again. However, the connection times out and rfcomm0 disappears again. I must create rfcomm0 before initializing a connection, or the connection will timeout.
But anyways. I can connect. The problem is that the only connection I get is between my PDA (Sony Clie UX40) and my computer. I can ping my computer and ssh into it. However, once I try to ping anything outside of my network from my Clie, I get nothing.
And for later, regarding the hotsyncing. It seems like the way described in the howto is more of a network sync. However, is there no way to do it directly like in Windows? Eg, in Windows, the Hotsync manager will listen on a bluetooth serial port. I tried setting pilot-link (jpilot) to listen to /dev/rfcomm0, but it didn't work. It would fail to bind as follows:
Code: | ****************************************
Syncing on device /dev/rfcomm0
Press the HotSync button now
****************************************
pi_bind Permission denied
Check your serial port and settings
Exiting with status SYNC_ERROR_BIND
Finished |
Incidentally, I couldn't get the method described in the howto working either. My Clie just gives me a Fatal Exception when I tap the hotsync button. (It seems that my Clie doesn't like network syncs.. I tried to use a WiFi memory stick connection to sync using pilot-link's net:any.. fatal exception as well).
(Wah, on another note.. my USB syncing just seemed to die. Not sure if it's because I just plugged in the USB bluetooth adapter?) _________________ rcxAsh |
|
Back to top |
|
|
rcxAsh Guru
Joined: 03 Jul 2003 Posts: 457 Location: /etc/localtime
|
Posted: Sat Jan 08, 2005 2:40 am Post subject: |
|
|
Ahh, got it working. This is so great. Syncing over bluetooth! Yay.
My problems were solved by installing iptables, and then adding the rule:
Code: | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
This was from another howto here:
http://www.harbaum.org/till/palm/bluetooth/index.html
I could then access things outside my network.
Then for the syncing, I found two things:
1) I had entered the wrong IP address into the Primary PC Setup.
2) I personally should connect via bluetooth first, and then hotsync. Rather than letting hotsync connect for me. (This way, I get no fatal exception).
/dev/rfcomm0 still has to be created manually, but at least everything else is working! _________________ rcxAsh |
|
Back to top |
|
|
momerath n00b
Joined: 19 Oct 2002 Posts: 30
|
Posted: Thu Feb 24, 2005 11:20 pm Post subject: |
|
|
I've followed the directions in the first post as well as the steps someone posted for making the connection from a pocketpc. On the pocketpc side the connection seems to go smoothly, but I'm unable to get anywhere with IE (all I really want to connect to is the host's own web server). On the linux side, the only seemingly relevant log messages I get are: "[pand] New connection from MACADDY bnep0" followed by "[net.agent] add event not handled". I can l2ping the ipaq (2215), and I've tried a few things on my own (like ipconfig bnep0 192.168.0.101 (which is what I have set as host ip in /etc/ppp/peers/dun)
I'm stuck- does anyone have a hint?
Edit:
Actually when I've got the bluetooth pan device on the ipaq set to the right ip and I connect and then ifconfig bnep0 with its ip, I'm able to connect to the host's web server. Unfortunately the whole point of my setup is to not have to whip the notebook out of my bag every time I want to change tunes. Should ppp be handling this or something else? "/etc/init.d/net.ppp0 start" errors out saying that /dev/ttyS1 is an unrecognized option. I see in /etc/conf.d/net.ppp0 where this is set, but I dont know what to configure it with, or whether it needs to be (seeing as how its not in the howto) |
|
Back to top |
|
|
cylgalad Veteran
Joined: 18 Apr 2003 Posts: 1327 Location: France
|
Posted: Mon Mar 07, 2005 11:31 am Post subject: |
|
|
Hi, nice howto but I can't get it to work, here's what the log says :
Code: |
Mar 7 12:29:23 cathy dund[16813]: New connection from <mac-addr hidden ;)>
Mar 7 12:29:23 cathy pppd[16820]: pppd 2.4.3 started by root, uid 0
Mar 7 12:29:23 cathy pppd[16820]: Using interface ppp1
Mar 7 12:29:23 cathy pppd[16820]: Connect: ppp1 <--> /dev/bluetooth/rfcomm/0
Mar 7 12:29:53 cathy pppd[16820]: LCP: timeout sending Config-Requests
Mar 7 12:29:53 cathy pppd[16820]: Connection terminated.
Mar 7 12:29:53 cathy pppd[16820]: Using interface ppp1
Mar 7 12:29:53 cathy pppd[16820]: Connect: ppp1 <--> /dev/bluetooth/rfcomm/0
Mar 7 12:29:53 cathy pppd[16820]: tcflush failed: Bad file descriptor
Mar 7 12:29:53 cathy pppd[16820]: tcsetattr: Invalid argument (line 1027)
Mar 7 12:29:53 cathy pppd[16820]: Exit.
|
|
|
Back to top |
|
|
cylgalad Veteran
Joined: 18 Apr 2003 Posts: 1327 Location: France
|
Posted: Fri Mar 11, 2005 11:28 am Post subject: |
|
|
Adding debug in the ppp dun file give me :
Code: |
pppd 2.4.3 started by root, uid 0 │=6
07│Mar 11 12:22:57 cathy pppd[18054]: using channel 3 │
Ma│Mar 11 12:22:57 cathy pppd[18054]: Using interface ppp1 │11
4 │Mar 11 12:22:57 cathy pppd[18054]: Connect: ppp1 <--> /dev/pts/7 │=6
07│Mar 11 12:23:00 cathy pppd[18054]: rcvd [proto=0x7eff] 7d 23 c0 21 7d 21 7│
Ma│d 22 7d 20 7d 2e 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d │9
DS│22 ... │50
54│Mar 11 12:23:00 cathy pppd[18054]: Discarded non-LCP packet when LCP not o│
Ma│pen
|
With pppdump :
Code: |
time 3.7s
rcvd "~\ff}#\c0!}!}\"} }.}\"}&} } } } }'}\"}(}\"\87:~"
time 4.0s
rcvd "~\ff}#\c0!}!}#} }.}\"}&} } } } }'}\"}(}\"*?~"
time 4.0s
rcvd "~\ff}#\c0!}!}$} }.}\"}&} } } } }'}\"}(}\"i'~"
time 4.0s
rcvd "~\ff}#\c0!}!}%} }.}\"}&} } } } }'}\"}(}\"\c4\"~"
time 4.0s
rcvd "~\ff}#\c0!}!}&} }.}\"}&} } } } }'}\"}(}\"3,~"
time 4.0s
rcvd "~\ff}#\c0!}!}'} }.}\"}&} } } } }'}\"}(}\"\9e)~"
time 4.0s
rcvd "~\ff}#\c0!}!}(} }.}\"}&} } } } }'}\"}(}\"\b5}<~"
time 4.0s
end recv
|
So it's receiving data it doesn't seem to handle |
|
Back to top |
|
|
Stolz Moderator
Joined: 19 Oct 2003 Posts: 3028 Location: Hong Kong
|
Posted: Tue May 10, 2005 1:20 am Post subject: |
|
|
dhabersa wrote: | meulie wrote: | Is there anybody out there who has gotten this to work with an iPAQ? |
Why, yes. I just got it working on my hp 2200 a few minutes ago! I take it you're having problems configuring the iPAQ to communicate properly? I'll try to list what I did to get mine working, though I haven't yet tried syncing it, just internet.
1. Go to the bluetooth manager (one way is by clicking on the bluetooth taskbar icon).
2. Follow the directions and tap "New > Connect!"
3. Select "Connect to the Internet" and click next. I don't think you can just use the explore option, otherwise you don't get the dialog to setup a bluetooth null modem (needed for IE to connect).
4. Choose the default "Connect via a LAN access point..." and hit next.
5. Click on the device box to scan for available devices. Your PC, when properly configured, should register. Just select it and contiune.
6. If you haven't already setup a paired connection (Tools>paired devices from bluetooth manager), go ahead and enter the PIN you setup earlier. Click okay in the top right corner.
7. You need to create a shortcut at this next screen, just call it want and then enable secure, encrypted connection (recommended!).
8. Next, the PDA should attempt to log on, prompting you with username, password, and domain. leave these all blank and hit okay.
9. You're all done now. Go ahead and test the connection by browsing the web or doing whatever you'd like.
Hope that helps! |
I get it working following your steps and the ones of the first post. Thank you guys
The only problem I've had is the error
May 10 03:01:36 azul pppd[12532]: pppd is unable to open the /dev/ppp device. You need to create the /dev/ppp device node by executing the following command as root: mknod /dev/ppp c 108 0
And as it suggests, mknod did the job
Code: | mknod /dev/ppp c 108 0 |
Cheers |
|
Back to top |
|
|
birkinshawc n00b
Joined: 28 Apr 2004 Posts: 11
|
Posted: Sat Jun 25, 2005 1:41 pm Post subject: |
|
|
I am getting the following error on connection attempt:
Jun 25 11:12:20 router hcid[17604]: link_key_request (sba=00:11:67:02:C3:37, dba=00:02:C7:19:78:03)
Jun 25 11:12:23 router dund[2737]: New connection from 00:02:C7:19:78:03
Jun 25 11:12:23 router pppd[2745]: Plugin /usr/lib/pppd/2.4.2/pppoatm.so loaded.
Jun 25 11:12:23 router pppd[2745]: unrecognized option '/dev/rfcomm0'
The node /dev/rfcomm0 exists, and the output of the rfcomm command shows:
rfcomm0: 00:11:67:02:C3:37 -> 00:02:C7:19:78:03 channel 1 connected [reuse-dlc release-on-hup ]
Any ideas?
Chris |
|
Back to top |
|
|
asyr n00b
Joined: 01 Sep 2004 Posts: 56 Location: Hellas
|
Posted: Wed Nov 02, 2005 3:23 pm Post subject: Connection OK, but sync NO ! |
|
|
Folks,
I'm following the guide here, but I do not have full success...
I can communicate my Palm Zire 72 to my laptop thrue bluetooth to exchange files and to get internet connection, but I do not get sync to work.
When I put 'net:any' to the kpilot, it gets crazy and not sync performed from the pilot device...
The sync works file true the USB cable...
Any ideas? _________________ Andrew Syreggelas
------------------------------------------------------------------------
The difficult we do immediately, the impossible takes a little longer |
|
Back to top |
|
|
lixantrope n00b
Joined: 02 Apr 2006 Posts: 2
|
Posted: Sun Apr 02, 2006 4:22 pm Post subject: Automatic interface up upon connect |
|
|
momerath wrote: | On the linux side, the only seemingly relevant log messages I get are: "[pand] New connection from MACADDY bnep0" followed by "[net.agent] add event not handled". I can l2ping the ipaq (2215), and I've tried a few things on my own (like ipconfig bnep0 192.168.0.101 (which is what I have set as host ip in /etc/ppp/peers/dun)
I'm stuck- does anyone have a hint?
Edit:
Actually when I've got the bluetooth pan device on the ipaq set to the right ip and I connect and then ifconfig bnep0 with its ip, I'm able to connect to the host's web server. Unfortunately the whole point of my setup is to not have to whip the notebook out of my bag every time I want to change tunes. Should ppp be handling this or something else? "/etc/init.d/net.ppp0 start" errors out saying that /dev/ttyS1 is an unrecognized option. I see in /etc/conf.d/net.ppp0 where this is set, but I dont know what to configure it with, or whether it needs to be (seeing as how its not in the howto) |
I had the same problem and the solution is quite easy. The "net.agent: add event not handled" message is from hotplug. The hotplug script (located at /etc/hotplug/net.agent) tries to run script /etc/init.d/net.INTERFACE_NAME (where INTERFACE name is bnep0 in this case). So all you need to do is to create a script /etc/init.d/net.bnep0 (and make it executable and owned by root):
Code: |
#!/sbin/runscript
start() {
ebegin "Bringing bnep0 up"
/sbin/ifconfig bnep0 192.168.10.1 up
eend $?
}
stop() {
ebegin "Bringing bnep0 down"
ifconfig bnep0 down
eend
}
|
The only important line is the ifconfig line, it brings the interface up when you connect from PDA. Just put an IP that suits your situation. |
|
Back to top |
|
|
Elijah n00b
Joined: 19 Apr 2003 Posts: 29 Location: Philippines
|
Posted: Thu Mar 08, 2007 2:31 pm Post subject: can ping but can't browse via blazer |
|
|
*bump
I tried the guide numerous times now with some success, I could ping google.com but for some reason blazer(my treo web browser) simply won't connect, it's stuck at 'Sending..'
Can anyone lend a hand please? |
|
Back to top |
|
|
tightcode Tux's lil' helper
Joined: 23 Mar 2004 Posts: 110
|
Posted: Fri Apr 06, 2007 9:38 pm Post subject: |
|
|
I am suffering the same problems as Elijah.
I can ping local and non local hosts from the View Log mini-term, but Blazer, the Treo web browser, appears to be unable to reach anything. It also can't load a site from the IP of the gateway through which it is connecting, it is as if it is not using the connection we just established.
I followed the instructions here: http://gentoo-wiki.com/HOWTO_Palm_Bluetooth_Reverse_DUN and again it makes the connection, can ping outside the local network, simply the builtin Blazer browser appears to not be able to.
The device is a Palm Treo 700p. Any and all help is welcome!
Cheers,
TightCode |
|
Back to top |
|
|
fuzion n00b
Joined: 19 Feb 2003 Posts: 56
|
Posted: Wed May 09, 2007 12:00 am Post subject: problem getting services from the Linux computer |
|
|
Hopefully someone can help me as I've spent many hours running around in circles like a dog chasing his own tail.
I get to this point:
Quote: | tux linux # hcitool scan
Scanning ...
00:06:56:xx:xx:xx devin
|
Quote: | tux linux # l2ping 00:06:56:xx:xx:xx
Ping: 00:06:56:xx:xx:xx from 00:11:67:yy:yy:yy (data size 44) ...
44 bytes from 00:06:56:xx:xx:xx id 0 time 42.79ms
*snip*
44 bytes from 00:06:56:xx:xx:xx id 21 time 48.06ms
22 sent, 22 received, 0% loss
tux linux # |
Then the palm displays Quote: | Devices pair successfully |
hcidump shows:
Quote: | tux bluetooth # hcidump
HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Inquiry (0x01|0x0001) plen 5
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Inquiry Result (0x02) plen 15
> HCI Event: Inquiry Complete (0x01) plen 1
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Link Key Request (0x17) plen 6
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
> HCI Event: Command Complete (0x0e) plen 10
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
< ACL data: handle 1 flags 0x02 dlen 52
L2CAP(s): Echo req: dlen 44
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
> HCI Event: Command Status (0x0f) plen 4
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Command Complete (0x0e) plen 6
> HCI Event: Read Remote Supported Features (0x0b) plen 11
> ACL data: handle 1 flags 0x02 dlen 52
L2CAP(s): Echo rsp: dlen 44
< ACL data: handle 1 flags 0x02 dlen 52
L2CAP(s): Echo req: dlen 44
> HCI Event: Number of Completed Packets (0x13) plen 5
*snip*
< ACL data: handle 1 flags 0x02 dlen 52
L2CAP(s): Echo req: dlen 44
> HCI Event: Number of Completed Packets (0x13) plen 5
> ACL data: handle 1 flags 0x02 dlen 52
L2CAP(s): Echo rsp: dlen 44 |
Now I try to set the discovered bluetooth device as the default device on my palm and it displays:
Quote: | Getting services... |
At which point hcidump displays:
Quote: | < HCI Command: Disconnect (0x01|0x0006) plen 3
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Disconn Complete (0x05) plen 4
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Link Key Request (0x17) plen 6
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
> HCI Event: Command Complete (0x0e) plen 10
> HCI Event: Connect Complete (0x03) plen 11
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
> HCI Event: Disconn Complete (0x05) plen 4
|
Then the palm times out and displays Quote: | Bluetooth timeout (0x803C) |
My *guess* is that I don't have ppp setup properly as none of the howtos really describe clearly how to do that. From the top of my head I think that I need to have a virtual serial port (ttySx?) pointing to a pppd? It also looks like something is wrong with my Linux setup as there seems to be a request from the palm that is received by the Linux computer but no corresponding response is sent out back to the palm.
Any and all help would be greatly appreciated!
Here are my config files:
/etc/bluetooth/hcid.conf
Code: | #
# HCI daemon configuration file.
#
# great bluetooth howto with palm/gentoo:
# forums.gentoo.org/viewtopic-t-121109-highlight-sdpd.html
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security auto;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# PIN helper
pin_helper /etc/bluetooth/pin;
# D-Bus PIN helper
#dbus_pin_helper;
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "%h (%d)";
# Local device class
#class 0x3e0100; # original class
class 0x100;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept,master;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp hold,sniff,park;
# Authentication and Encryption (Security Mode 3)
auth enable;
encrypt enable;
}
|
/etc/bluetooth/rfcomm.conf
Code: | #
# RFCOMM configuration file.
#
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 00:06:56:xx:xx:xx;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
# comment "Example Bluetooth device";
}
|
/etc/bluetooth/pin
Code: | #!/bin/sh
echo "PIN:123456"
|
/etc/conf.d/bluetooth
Code: | # Config file for hcid
HCID_CONFIG="/etc/bluetooth/hcid.conf"
# Start sdpd (allowed values are "true" and "false")
SDPD_ENABLE=true
# Start hidd (allowed values are "true" and "false")
HIDD_ENABLE=false
# Arguments to hidd
HIDD_OPTIONS=""
# Run hid2hci (allowed values are "true" and "false")
HID2HCI_ENABLE=false
# Bind rfcomm devices (allowed values are "true" and "false")
RFCOMM_ENABLE=true
# Config file for rfcomm
RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
# Start dund (allowed values are "true" and "false")
# If you want to use dund, you must install: net-dialup/ppp .
DUND_ENABLE=true
# Arguments to dund
DUND_OPTIONS="--listen --persist --msdun call palm"
# Start pand (allowed values are "true" and "false")
PAND_ENABLE=true
# Arguments to pand
PAND_OPTIONS="--listen --role NAP --master --autozap"
|
|
|
Back to top |
|
|
fuzion n00b
Joined: 19 Feb 2003 Posts: 56
|
Posted: Wed May 09, 2007 12:27 am Post subject: |
|
|
It's a miracle (for me). I ran the following:
Quote: | tux linux # sdptool add DUN
Dial-Up Networking service registered
tux linux # sdptool add LAN
LAN Access service registered
|
and then magically the Dial-Up Networking service showed up on my palm! Woohaaa... unfortunately now when I tried to connect to the network through Prefs -> Network I get this error on my palm:
Quote: | Error: Bluetooth connect failed SDP conect error (0x801F) |
but at least I'm at the next step. Anyone know why DUN/LAN need to be added to sdptool manually? |
|
Back to top |
|
|
NightMonkey Guru
Joined: 21 Mar 2003 Posts: 357 Location: Philadelphia, PA
|
Posted: Wed Nov 12, 2008 5:49 am Post subject: Remove this HOWTO? |
|
|
Hrm. Most of this howto is way out of date, and now gentoo-wiki.com is in tatters. I think that this thread should be retired from this forum, since it not only has no value, but is giving people false hope.
Sad posts like this show why an in-house Gentoo Wiki would be quite useful, and how useful gentoo-wiki.com was. _________________
|
|
Back to top |
|
|
lysergicacid Guru
Joined: 25 Nov 2003 Posts: 352 Location: The Universe,Virgo Super Cluster,Milky Way,Earth
|
Posted: Tue Apr 21, 2009 3:58 am Post subject: Re: Remove this HOWTO? |
|
|
NightMonkey wrote: | Hrm. Most of this howto is way out of date, and now gentoo-wiki.com is in tatters. I think that this thread should be retired from this forum, since it not only has no value, but is giving people false hope.
Sad posts like this show why an in-house Gentoo Wiki would be quite useful, and how useful gentoo-wiki.com was. |
here here i 2nd that :-/ sick of reading these outdated howto's sadly the same can be said for most of the official gentoo docs too _________________ [img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img] |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|