maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Developing is soo difficult (https://talk.maemo.org/showthread.php?t=50358)

gsever 2010-04-19 15:00

Re: Developing is soo difficult
 
Quote:

Originally Posted by zimon (Post 617428)
I do not exactly remember how I got it all working, but would be good to get it working 4 U, so then we could update instructions for Fedora.

I think I made bnep0 device with
Desktop: System/Preferences/Network_Connections/Wired/Add
Connect_automatically: Yes, name: bnep0, MAC: <your BT MAC on PC>, MTU: automatic

I followed these steps and restarted FC12. Not sure maybe a bluetooth restart would do the same.

From N900 ->Settings -> PC-Connectivity Manager I activated bluetooth. In advanced tab:

Bluetooth enabled
DHCP server checked
IP address: 192.168.3.15
Gateway: 192.168.3.14
Network mask: 255.255.255.0
Bluetooth address search successfully discover and pair with my FC12 laptop. Settings are all applied.

Quote:

Then to try PAND connection manually, on PC:
# pand -c EC:9B:5B:23:XX:XX -S -E -e bnep0
X=your N900 BT MAC.
# pand -l # to check
After that you should be able manually configure bnep0 device:
# ifconfig bnep0 192.168.3.14 netmask 255.255.255.0 dstaddr 192.168.3.15
To get N900 BT MAC address used "hcitool scan" Then
pand -c EC:9B:5B:01:XX:XX -S -E -e bnep0

pand -l # This responds after the restart
bnep0 EC:9B:5B:01:XX:XX PANU

# Guessing the last should be the IP of N900
ifconfig bnep0 192.168.3.14 netmask 255.255.255.0 dstaddr 192.168.3.15

However still isn't working :(
ssh root@192.168.3.15
ssh: connect to host 192.168.3.15 port 22: No route to host

It should be close I know. I sometimes get similar messages trying to ssh other Redhat and Fedora machines.

We hijacked the topic but we are getting useful responses for everybody (ok especially for FC12 users :) Device connectivity is an important part of the development. WLAN works nicely, however there times it is pain to connect another device (oh VPN etc..) In these situations bluetooth would provide a very simple and useful solution.

gsever 2010-04-19 15:03

Re: Developing is soo difficult
 
Quote:

Originally Posted by pelago (Post 617476)
I believe there is a desktop widget which can show your N900 IP address too.

Any idea for the name of that widget? I am not sure how to setup the router to use static DHCP mode. I guess might be easier to use the widget for the time being.

zimon 2010-04-19 15:10

Re: Developing is soo difficult
 
Quote:

Originally Posted by gsever (Post 617808)
Any idea for the name of that widget? I am not sure how to setup the router to use static DHCP mode. I guess might be easier to use the widget for the time being.

i.e.
Queen Beecon Widget (swiss army tool) can do it.
Widget type: Snippet,
Status: Enabled,
Command Selection: Internal IP
Width 130, Height 115
Font Face: 12

Beecon Command Exit Status=0
;anythingsjfdgfg

Image Filename:
;dfjfgohdganything

About PAND in F12:
Does ifconfig now show you have a bnep0 device up at least?

What does route show about routes or both ends?
I think it is only a routing problem anymore for you.

(Yep, sorry for hijacking. Moderator, if feels like it, could move these to "PAND Bluetooth tethernet in Fedora 12".)

pelago 2010-04-19 15:51

Re: Developing is soo difficult
 
Quote:

Originally Posted by gsever (Post 617808)
Any idea for the name of that widget? I am not sure how to setup the router to use static DHCP mode. I guess might be easier to use the widget for the time being.

The one I was thinking of was "Personal IP Address" widget in extras.

gsever 2010-04-19 18:23

Re: Developing is soo difficult
 
Quote:

Originally Posted by zimon (Post 617820)
i.e.
Queen Beecon Widget (swiss army tool) can do it.

Both this widget and Personal IP widget work. Thanks guys.

Quote:

About PAND in F12:
Does ifconfig now show you have a bnep0 device up at least?
ifconfig doesn't show a bnep0 device. When I created bnep0 through Network Connections it created a ifcfg-bnep0 file under /etc/sysconfig/network-scripts shown as:

Code:

HWADDR=My BT MAC
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV6INIT=no
NAME=bnep0
UUID=some number
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes

Later when I query:

ifup bnep0
Device has different MAC address than expected, ignoring.

Very interesting. Do you get a similar behavior?

Quote:

What does route show about routes or both ends?
I think it is only a routing problem anymore for you.
A simple route query doesn't list bnep0 yet. Should be something to do with the previous step. Any ideas?

zimon 2010-04-19 18:39

Re: Developing is soo difficult
 
Quote:

Originally Posted by gsever (Post 618125)
/etc/sysconfig/network-scripts shown as:

Code:

HWADDR=My BT MAC
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV6INIT=no
NAME=bnep0
UUID=some number
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes

Later when I query:

ifup bnep0
Device has different MAC address than expected, ignoring.

Code:

# cat /etc/sysconfig/network-scripts/ifcfg-bnep0
HWADDR=00:14:35:00:XX:XX
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV6INIT=no
NAME="bnep0"
ONBOOT=yes
IPADDR=192.168.3.14
NETMASK=255.255.255.0
DEVICE=bnep0
NM_CONTROLLED=yes
USERCTL=yes
PREFIX=24
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

Your PC should get bnep0 device when N900 has made a PAND connection to it.

I don't think N900 has DHCPD, so BOOTPROTO=none and manual IP address.

gsever 2010-04-19 19:19

Re: Developing is soo difficult
 
Quote:

Originally Posted by zimon (Post 618153)
Code:

# cat /etc/sysconfig/network-scripts/ifcfg-bnep0
HWADDR=00:14:35:00:XX:XX
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV6INIT=no
NAME="bnep0"
ONBOOT=yes
IPADDR=192.168.3.14
NETMASK=255.255.255.0
DEVICE=bnep0
NM_CONTROLLED=yes
USERCTL=yes
PREFIX=24
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

Your PC should get bnep0 device when N900 has made a PAND connection to it.

I don't think N900 has DHCPD, so BOOTPROTO=none and manual IP address.

I copied your settings changing the hardware address part. PC-Connectivity applet has dhcp option on it. And tried in either option. IP Address is specified as 192.168.3.15, Gateway is 192.168.3.14

I booted and used your pand settings from page 4. Still nothing happens, get no route to host messages. Neither ifconfig nor route list any activity about bnep0. N900 bluetooth is transmitting.

If I set ifcfg-bnep0 following his instructions I can get a bnep0 available option on Network Manager applet on F12. But still no ssh :(
No More Twist: Bluetooth PAN from Windows Mobile to Fedora 11

zimon 2010-04-19 21:01

Re: Developing is soo difficult
 
Have you checked the routing table on N900 is OK? Also ping usually is the first protocol which is good to try. Also ´tcpdump -i bnep0´ may reveal what is wrong.

Does hciconfig show there is data going in and out?

"BT tethering is soo difficult" :-)

gsever 2010-04-19 22:05

Re: Developing is soo difficult
 
Quote:

Originally Posted by zimon (Post 618384)
Have you checked the routing table on N900 is OK?

From Fedora 12
Code:

[gsever@ccn Desktop]$ ssh root@N900

Nokia-N900-42-11:~# route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
172.XX.XX.XX    *              255.255.252.0  U    0      0        0 wlan0
default        172.XX.XX.XX    0.0.0.0        UG    0      0        0 wlan0

No mention for the Bluetooth. One funny thing I noticed when I activated Bluetooth via PC-Connectivity manager (pc-connectivity-manager 0.7.14) -- I set bluetooth active but when I close the applet and come back later I see that bluetooth is deactive again. It doesn't do this for wlan option. (Even though I don't use wlan-adhoc to connect the device -just for information showing something might be wrong with Bluetooth settings on N900 side)

Is there an alternative way to set Bluetooth network on N900 --GUI or shell doesn't matter?

Quote:

Also ping usually is the first protocol which is good to try. Also ´tcpdump -i bnep0´ may reveal what is wrong.
As expected. It pings fine via wireless network :D

Code:

[root@ccn network-scripts]# tcpdump -i bnep0
tcpdump: bnep0: No such device exists
(SIOCGIFHWADDR: No such device)

Quote:

Does hciconfig show there is data going in and out?

"BT tethering is soo difficult" :-)
It is active...and finds me...

Code:

Nokia-N900-42-11:~# hciconfig
hci0:        Type: UART
        BD Address: EC:9B:XX:XX:XX:XX ACL MTU: 1017:4 SCO MTU: 64:1
        UP RUNNING PSCAN ISCAN
        RX bytes:19850 acl:408 sco:0 events:470 errors:0
        TX bytes:27240 acl:451 sco:0 commands:98 errors:0

Nokia-N900-42-11:~# hcitool scan
Scanning ...
        00:XX:XX:XX:XX:XX        ccn

We will get somewhere eventually simple or hard :)

zimon 2010-04-20 17:28

Re: Developing is soo difficult
 
Quote:

Originally Posted by gsever (Post 617800)
However still isn't working :(
ssh root@192.168.3.15
ssh: connect to host 192.168.3.15 port 22: No route to host

Does this command show anything? (needs package bridge-utils)

# brctl show

I noticed, if there is bridge driver connected to pan1/bnep0, then the same configuration which otherwise works do not work.

When Bluetooth network is enabled in N900, you should see these in PC:
# hcitool con
(should show there is BT connection between two)
# pand -l
(should show there is NAP-PANU connection between two)
After those OK, just "ifup bnep0" should bring bnep0 network device up with correct IP-addresses if your ifcfg-bnep0 is OK and "brctl show" doesn't show anything.

and btw, I couldn't get DHCP working either, although N900 PC-connectivity manager would have "DHCP server" option enabled.


All times are GMT. The time now is 03:00.

vBulletin® Version 3.8.8