Showing posts with label Bluetooth. Show all posts
Showing posts with label Bluetooth. Show all posts

Thursday, August 13, 2009

Pioneers in Pictures

Hey everyone!

As promised here are some pictures taken from both Pio and Nero which I'll explain:

1. Here's Nero in a lateral view and in a perspective view, we can see that it's fully operational and assembled (videos in further posts).


2. Here's Pio and it might look a bit disassembled but it's just because as the on board computer has the extra serial ports to use the laser we had to use an auxiliary port that receives the serial commands, though we haven't been able to get the connector we need and we have to make, we hope in the next few days we can get our hands in it and make it fully operational as well.


3. Here are some pictures of the Bluetooth bundle we wanted to use.


Perhaps these images can give a better idea to what we were attempting to do.

Regards to all!

Wednesday, July 22, 2009

Bluetooth configuration for Nero

Hello everyone!

After leaving the lab my brother told me he had a similar bluetooth issue once so he wrote this quick tutorial. I am sharing this information and will attach it in assembla as well. I hope this instructions solve our problems with Nero's bluetooth communication.


1. Instalar lo necesario:
sudo apt-get install bluez-pin
sudo apt-get install bluez-utils

2. Editar configuración del Bluetooth:
sudo gedit /etc/bluetooth/hcid.conf

3. Remplazar el contenido actuar del archivo por:
#
# HCI daemon configuration file.
#

# 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 user;

# 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 /usr/bin/bluepin;

# D-Bus PIN helper
#dbus_pin_helper;
}

# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "Nino's Laptop";

# Local device class
class 0x3e0100;

# 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;

# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;

# Authentication and Encryption (Security Mode 3)
#auth enable;
#encrypt enable;
}

4. Reiniciar los servicios de Bluetooth:
sudo /etc/init.d/bluez-utils restart

5. Para checar que todo esté bien hasta el momento
hcitool scan

Debe de devolver alguna lista de dispositivos cercanos…

6. Para obtener el canal donde se encuentra el puerto serial:
sdptool browse XX:XX:XX:XX:XX:XX
donde XX:XX:XX:XX:XX:XX es la dirección MAC del dispositivo Bluetooth

Debe de regresar algo parecido a:
Browsing XX:XX:XX:XX:XX:XX ...
Service Name: Bluetooth Serial Port
Service RecHandle: 0x10007
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Serial Port" (0x1101)
Version: 0x0100
Por lo que en ese caso sería el canal 1…

7. Editar el rfcomm.conf:
sudo gedit /etc/bluetooth/rfcomm.conf

De la siguiente forma:
rfcomm4 {
bind yes;
device XX:XX:XX:XX:XX:XX;
channel X;
comment "Serial Port";
}

8. Para terminar…
sudo rfcomm release 4
rfcomm connect 4

Si todo está bien, debe de aparecer algo parecido a:
$ rfcomm connect 4
Connected /dev/rfcomm4 to XX:XX:XX:XX:XX:XX on channel X
Press CTRL-C for hangup

No opriman en ningún momento CTRL-C hasta que sepan que todo está detenido y no hay peligro de que el robot pueda seguir caminando por su cuenta…


SU PUERTO SERIAL (PARA EL .CFG) SERÍA EL /dev/rfcomm4


Regards!

Tuesday, July 21, 2009

Bluetooth Connectivity

We haven't accomplished yet connectivity between Player and Nero but we already accomplished connectivity using the Terminal so I will explain what is to be done in order to achieve it.

1. $cd /etc/bluetooth
2. $ls
3. Make sure you have the rfcomm.conf file and then $sudo gedit rfcomm.conf
4. In the file paste:
rfcomm0{
bind yes;
device 00:0A:3A:2D:7C:64;
channel 1;
comment "Serial Bluetooth";
}
5. The interface should then be created, to check it type $ls /dev/rfcomm0 and it should appear. That is the new interface to be used.
6. To connect to the AirCable use $rfcomm connect 0
7. A connection message should appear and the blue led in the AirCable should be turned on.

We now need to know if we can execute a script of something to connect Player and Nero but we are making progress.

Cheers!