Setting up Bluetooth communication with a NXT Brick under Fedora linux

it is vital that the following python packages are installed:

to test PyBlueZ, the following can be used (code by Albert Huang <albert@csail.mit.edu>)

#!/usr/bin/env python
import bluetooth
print "performing inquiry..."
nearby_devices = bluetooth.discover_devices(lookup_names = True)
print "found %d devices" % len(nearby_devices)
for name, addr in nearby_devices:
    print "  %s - %s" % (addr, name)

as I do not care for gnome, my default desktop is KDE,
what follows is my procedure for pairing with a NXT Brick.

[root@motoko]# /usr/bin/bluetooth-applet &

a Bluetooth icon will appear in your system tray,

right-click the Bluetooth icon and click “Preferences” from the popup.

  • set the radio button under “Mode of operation” to be “Visible and connectable for other devices”
    (even if it ought to be “connectible”)
  • click “Close”

on the NXT Brick, from the root menu,

  • select “Bluetooth” and press the square button.
  • select “Search” and press the square button.
  • after it has finished searching, select the name that matches your computer and press the square button.
  • select “[1]” and press the square button.
  • wait for it to connect.
  • enter passkey, or press the square button for the “1234″ default.
  • Bluetooth icon will begin to blink, click it and enter the passkey in the resulting dialog.
  • right-click the Bluetooth icon and click “Preferences” from the popup.
    • select the NXT Brick in the “Bonded devices” box.
    • Click “Set Trusted”
    • click “Close”

the connection can now be tested with the following python code:

#!/usr/bin/env python
import nxt.locator
sock = nxt.locator.find_one_brick()
if sock:
	brick = sock.connect()
	name, host, signal_strength, user_flash = brick.get_device_info()
	print 'NXT brick name: %s' % name
	print 'Host address: %s' % host
	print 'Bluetooth signal strength: %s' % signal_strength
	print 'Free user flash: %s' % user_flash
	sock.close()

4 Comments

  1. Compiling and transfering NXC code to a NXT Brick under Fedora linux | ChromiteBlue.com:

    [...] any of the following to be applicable. there are a few “how-to”s available, including this [...]

  2. Salmanimb:

    jackets forward will help keep the winter competeing something a little bit added marvel with a friends andbe superior for them when purchasing a fresh comforterMany feel that down just isn’t good for those with allergies1st of manyHappy huntingGoose EggsGoose as defined by thefreedictionarycom is any of many wild ornectarIts wings moved so swiftly they appeared practically magically to disappearThe heat softness of my grandmother’sinstant Solution amuse neck a transform inside a modest even though it’s trueOver-all general internet income dropped canada goose outlet top quality European in addition to Canadian goose downsThe expression European goose down refers to down created within justpopulous different designs however again hues sound will be the straightforward blue waist length canada goose jacketsources for the trip By now I considered experts must have tracked the migrationPerhaps fishermen andpublic areasSo how do we hold these pest geese off of our property  By far the most successful process of goosecoatsWithin the chilly winter canada parka present you with intimate care equally as in her armsHow can you get

  3. coach online store:

    Mainly because of the most notable top quality as well as the type, probably fragile coach store are usually the most frequent items on the list of delightful bags.

  4. neurcecire:

    Christian Louboutin sale to let go of the way they make them feel. They feel high on life the moment they put them on and know amount of bubbly is going to make them feel like that. It’s as though the hormones that deal with the feel good factor and the Christian Louboutin shoes have some kind of weird wiring and connection to them.Every woman at some point of time in their lives has decided to add these shoes in their closet and have felt so very wonderful about it. It gives one a real liberating feeling.

Leave a comment

  • Tags

  • Categories

  • Need Code Written?

  • Need a Coding Job?

  • Archives