Next revision
|
Previous revision
|
mindstorms:plnxt:conf_serial [2009/02/22 16:38] holownia created |
mindstorms:plnxt:conf_serial [2019/06/27 15:50] (current) |
</code> | </code> |
| |
Alternatywą jest edycja pliku rfcomm.conf, co daje automatyczne przypisanie przy starcie systemu: | An alternative solution is to edit the ''rfcomm.conf'' file, which causes an automatic binding at system boot: |
<code> | <code> |
gedit _etc_bluetooth/rfcomm.conf | gedit _etc_bluetooth/rfcomm.conf |
</code> | </code> |
| |
Należy dodać w nim wpis z: | Please add an entry to the file containing: |
* odpowiednim numerem urządzenia (tutaj 0 - rfcomm0), | * the appropriate device number (here 0 – rfcomm0), |
* adresem MAC zestawu w miejscu MAC_ADDRESS. | * the MAC address of the set instead of MAC_ADDRESS. |
Wzór: | |
| Pattern: |
<code> | <code> |
rfcomm0 { | rfcomm0 { |
</code> | </code> |
| |
Po edycji pliku rfcomm.conf konieczny jest restart BT: | After editing the ''rfcomm.conf'' file it is necessary to restart BT: |
<code> | <code> |
_etc_init.d/bluetooth restart | _etc_init.d/bluetooth restart |
</code> | </code> |
| |
Weryfikacja przypisania urządzenia: | Verification of the device binding: |
<code> | <code> |
rfcomm | rfcomm |
</code> | </code> |
| |
==== Ustawienia portu ==== | ==== Port settings ==== |
Port szeregowy przypisany do urządzenia musi być odpowiednio skonfigurowany do współpracy z zestawem NXT: | A serial port bound to the device must be properly configured to work with the NXT set: |
<code> | <code> |
sudo stty -F /dev/rfcomm0 -echo -icanon -iexten -isig -icrnl -inpck -istrip -ixon -cstopb cs8 parenb parodd -opost ispeed 115200 ospeed 115200 | sudo stty -F /dev/rfcomm0 -echo -icanon -iexten -isig -icrnl -inpck -istrip -ixon -cstopb cs8 parenb parodd -opost ispeed 115200 ospeed 115200 |
</code> | </code> |
| |
Tutaj następuje pierwsze połączenie, więc i sparowanie z ustaleniem pinu.\\ | After that the first connection takes place, the device is paired and a PIN fixed. |
| |
| ==== Pairing ==== |
| In Ubuntu, on which the configuration has been tested, there is applet bt bluez 0.25 available.\\ |
| NXT main unit asks to enter the PIN. Then, the same PIN has to be reentered in the mentioned applet, which ends pairing. |
| |
==== Parowanie ==== | Previously paired devices can be seen by right-clicking the blue BT icon → Preferences → Bonded devices.\\ |
W Ubuntu, na którym testowano konfigurację, mamy do dyspozycji aplet bt bluez 0.25.\\ | If the device is on the list, pairing should not take place. It is enough to set port parameters.\\ |
Jednostka centralna NXT prosi o wprowadzenie PIN-u. Następnie ten sam PIN wprowadza się we wspomnianym aplecie, co kończy parowanie. | However, if the whole process of setting up the port and the possible pairing does not take place properly, please: |
| * remove the device from the mentioned list, |
| * you may also need to remove the entry in the NXT brick (please select in the menu → Bluetooth → My contacts {device} → Delete). |
| |
Urządzenia wcześniej sparowane można zobaczyć klikając prawym przyciskiem niebieską ikonę BT -> Preferences -> Bonded devices.\\ | Then re-set the port parameters, please. |
Jeżeli urządzenie znajduje się na tej liście, parowanie w ogóle nie powinno zachodzić. Wystarczy samo ustawienie parametrów portu. | |
Gdyby jednak cały proces ustawienia parametrów portu i ewentualnego parowania nie przebiegał poprawnie, proszę: | |
* usunąć z wyżej wskazanej listy urządzenie, | |
* konieczne może też być usunięcie wpisu w NXT brick (należy wybrać z menu Bluetooth -> My contacts -> {device} -> Delete) | |
Następnie proszę ponownie przeprowadzić ustawienie parametrów portu. | |
| |
Po udanej konfiguracji można przejsć do [[pl:plnxt:start#pierwsze_kroki|pierwszych krokow]]. | After a successful setup, you can proceed with the [[start#first_steps|first steps]]. |