‎03-07-2015 03:17 AM
I am trying to start a Bluetooth service in NI Linux RT from the command prompt SSH terminal.
I tried using next Linux command:
service SCRIPT COMMAND [OPTIONS]
#service bluetooth start
But it is not recognized by NI Linux RT:
"-bash: service: command not found"
Is there an equivalent command I can use in NI Linux RT to start a service??
‎03-09-2015 10:35 AM
service is a RHEL/CentOS/Scientific Linux-specific mechanism for starting background services. On current (up to 2014sp1) NI Linux Real-Time releases, the mechanism is the SysV initscript (so, the equivalent would be running /etc/init.d/script_name start).
Additionally, attempting to start a service from LabVIEW is going to be tricky since LabVIEW runs as a lower-priviledged user and starting/stopping most services requires root/admin privilege. Your best bet would be to start the service script as it was meant to be started: using update-rc.d to create the needed links in the correct runlevel folders (http://manpages.ubuntu.com/manpages/hardy/man8/update-rc.d.8.html)
‎03-14-2015 10:55 AM
BradM,
Thank you for your reply.
Cigaro USB bluetooth dongle directly connected to MyRIO USB port is still not working for me.
I tired to start Bluetooth service running next commands sequence that I found at:
http://wiki.openmoko.org/wiki/Manually_using_Bluetooth
1.- Power BT adapter up
#hciconfig hci0 up
I checked my BT dongle to respond to this command using:
#hciconfig hci0 -a
hci0: Type: BR/EDR Bus: USB
BD Address: XX:XX:XX:XX:XX:XX ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:984 acl:0 sco:0 events:41 errors:0
TX bytes:175 acl:0 sco:0 commands:41 errors:0
Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'CSR8510 A10'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x22bb
LMP Version: 4.0 (0x6) Subversion: 0x22bb
Manufacturer: Cambridge Silicon Radio (10)
2.- Use dbus-send command to get path to the default bluetooth adapter which should appear when bluetoothd is running and bluetooth device is powered on
#export BTADAPTER=`dbus-send --system --dest=org.bluez --print-reply /org.bluez.Manager.DefaultAdapter | tail -1 | sed 's/^.*"\(.*\)".*$/\1/'`
Above command is not working in NI Linux RT. I am getting nex error:
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
I tried by starting bluetooth service with:
#/etc/init.d/bluetooth start
but it didn't help.
I also tried to run the bluetooth-agent python script, that I found at:
to perform pairing with another bluetooth device:
#simple-agent hci0 XX:XX:XX:XX:XX:XX
but I am getting a similar error:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
How can I add org.bluez to a .service file in NI linux RT??
‎03-16-2015 09:53 AM
As I stated in the other thread, you need bluez daemon to be running. Let's try to consolidate the conversation (read: no need to post basically the same questions in multiple places).
Now, the biggest issue you're about to run headlong into is that the kernel doesn't have the needed support built into it for bluez. This means building the modules that you need and loading them into your system. This is a fairly daunting task if you are unfamiliar with Linux. I would try to find someone who is a bit more familair to help you out as it will be a bit annoying to have to make a step in the right direction, have an issue, then come back here.