From: Dan G. <djg...@go...> - 2007-10-23 22:34:25
|
On 10/23/07, LachelnKind <Lac...@gm...> wrote: > > I followed your page, and got to editing the interfaces file on the slave > (gumstix). Can I use dhcp if my router automatically assigns my laptop an ip > address? Or does my router laptop have to act as a dhcp server itself? If > not, than how do I know what the netmask, network, and broadcast fields > should be in the interface file? I know my network uses the range > 192.168.0.1 to 192.168.0.255 (i believe). > You can use DHCP, but in my experience it can be tricky to setup (I tried gave up and used static addresses). The Bluetooth DHCP would be seperate to that from that assigned by the router anyway meaning you have to configure the dhcpd3 server on your laptop. going back to static addresses i would use Address 192.168.1.1 (Laptop / Bridge Address) 192.168.1.2 (Gumsix address) Netmask is 255.255.255.0 Network is 192.168.1.0 Broadcast 192.168.1.255 This will put the gumstix on a different network to your router but will avoid any potential Bad Things(TM) such as conflicts in the network address space stopping you accessing the internet with the laptop. Unless you want to surf the internet via the gumstix it no real biggy. > My next question has to do with the script that will be on the desktop of my > master (laptop). Do I have to run that every time I want to connect to the > gumstix? It says to run this script before a bluetooth network is created, > but doesn't the bluetooth network get created once i boot my gumstix up? > Unfortunatly Yes. I am trying to come up with a elegant method of making it start at runtime that dosnt give several irritating error messages everytime i restart my PC's networking (Which playing with the gumstix is several times a day) I gave a poor explanation of what the script does on the wiki I suppose, will edit and try to make it clearer tomorrow. Ethenet Emulation allows us to communicate using 'standard' ip addresses and makes using larger bluetooth networks a little easier as each device can communicate without with each other without too much 'black magic' happening behind the scenes. The script i gave setts up Ethernet bridging, making a logical briding intererface (Pan0) available. When a bluetooth device connects to the network. A new interface is connected. This is the bnep0 stuff The dev-up script in the hcid.conf file automagially links this benp interface to the bridge creating a new network link in the bridged system. As i said the really cool thing about all this is we only have one network interface to worry about rather than a seperate one for each bluetooth device (That way lies madness with several BT nodes ) > Script: > #!/bin/sh > brctl addbr pan0 (Create Bridge Interface Pan 0) > ifconfig pan0 192.168.2.1 (Assigns IP Address x.x.2.1 If you choose network address 192.168.1.1 for the laptop change this line to reflect the address) > Thinking about though if you only have one Gumsitx the scripting part is a little OTT as we don't have to worry so much about multiple interfaces. If this is the case 1) Follow the Slave (Gumstix) part as per the wiki 2) Dont worry about the above script or running it at startup 3) Modify the /etc/bluetooth/dev-up script to read something along the lines of #!/bin/sh ifconfig bnep0 192.168.2.1 Reset bluetooth networking on the laptop and stick. Hopefully you should have a bluetooth interface available. (I only have access to sticks in the lab, so this should work, I shall check tomorrow and let you know if its wrong) > Thanks for any help! :) > Any time. Thanks for the feedback on the Wiki article. Will make some modifications tomorrow. > > Dan Goldsmith wrote: > > > > I have always used a combination of pand and ethernet bridging to > > create connections. This means that after a bit of work setting up, > > The network is subsequently created every time the stick if powered > > up. > > Just added a page to the wiki about setting up bluetooth under linux, > > http://docwiki.gumstix.org/LinuxBluetooth > > > > If that's not the approach you wish to take. Have you tried manually > > allocating the benp interfaces a IP address. This will bring the > > interface up if it exists and should allow some communication. > > #ifconfig bnep0 x.x.x.x > > > > where x.x.x.x is the ip address you wish to assign the the interface > > (I would go for 192.168.1.1 and 192.168.1.2 for testing) > > > > Hope this helps. > > > > Regards > > Dan. > > > > On 10/21/07, LachelnKind <Lac...@gm...> wrote: > >> > >> I am trying to create a pand connection between my laptop and gumstix, > >> but > >> with no success... I pasted some output from some commands/files below. I > >> have the bnep module located on both the gumstix and laptop. Than to > >> connect > >> the two devices I type: > >> pand --listen --role GN > >> on the gumstix > >> and > >> pand --connect <MAC address of gumstix, given from hcitool scan> > >> > >> Than when I type ifconfig on both the gumstix and laptop I get no bnep0 > >> device. Does anyone have ideas what I am doing wrong??? > >> > >> Gumstix: > >> # lsmod | grep bnep > >> bnep 10528 0 > >> l2cap 18596 3 bnep > >> bluetooth 46880 7 bnep,l2cap,hci_uart > >> > >> /etc/network/interfaces > >> ------------------------------- > >> # Configure Loopback > >> auto lo > >> iface lo inet loopback > >> > >> iface usb0 inet dhcp > >> > >> auto bnep0 > >> iface bnep0 inet dhcp > >> > >> #auto eth0 > >> iface eth0 inet dhcp > >> > >> iface eth1 inet dhcp > >> > >> iface wlan0 inet dhcp > >> > >> #auto mwlan0 > >> iface mwlan0 inet dhcp > >> pre-up /sbin/iwconfig $IFACE essid any txpower 100mW > >> > >> /etc/bluetooth/hcid.conf > >> -------------------------------- > >> autoinit yes > >> security auto > >> pairing multi > >> iscan enable; pscan enable > >> lm accept, master > >> pin_helper /etc/bluetooth/bluepin > >> > >> Laptop: > >> ~$ lsmod | grep bnep > >> bnep 17152 0 > >> l2cap 25856 11 bnep,rfcomm,hidp > >> bluetooth 55908 9 bnep,rfcomm,hidp,l2cap,hci_usb > >> > >> /etc/bluetooth/hcid.conf > >> --------------------------------- > >> autoinit yes > >> security auto > >> pairing multi > >> passkey "1234" > >> iscan enable; pscan enable > >> discovto 0 > >> lm accept > >> > >> /etc/network/interfaces > >> -------------------------------- > >> There is no mention of bnep0 in this interface file. > >> -- > >> View this message in context: > >> http://www.nabble.com/Trying-to-get-pand-to-work-on-my-basix400xm-bt-tf4666761.html#a13330990 > >> Sent from the Gumstix mailing list archive at Nabble.com. > >> > >> > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by: Splunk Inc. > >> Still grepping through log files to find problems? Stop. > >> Now Search log events and configuration files using AJAX and a browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >> _______________________________________________ > >> gumstix-users mailing list > >> gum...@li... > >> https://lists.sourceforge.net/lists/listinfo/gumstix-users > >> > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > gumstix-users mailing list > > gum...@li... > > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > > > > > -- > View this message in context: http://www.nabble.com/Trying-to-get-pand-to-work-on-my-basix400xm-bt-tf4666761.html#a13369972 > Sent from the Gumstix mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |