Using Bluetooth for Sending serial data
#1
I'm using Ubuntu long sleep OS on pine64+, I'm trying to send serial data from the pine 64+ to the Arduino UNO over bluetooth.
For that i installed Bluez package and when i check for the bluetooth device using "Hcitool dev", its empty.

But i checked the status of bluetooth using "etc/init.d/bluetooth status", the result is,
          
Quote:● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-09-11 05:43:23 UTC; 3h 18min ago
     Docs: man:bluetoothd(8)
 Main PID: 7439 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─7439 /usr/lib/bluetooth/bluetoothd


When i add a USB bluetooth adapter to pine 64+, it gets detected and works fine.

I tried this using the procedure given in the following link:
           http://blog.whatgeek.com.pt/2015/09/blue...d-arduino/
  Reply
#2
Hi Arjun,

I'll be in the same boat as you shortly, as the USB power meter I use when monitoring the pine64 has a bluetooth interface to allow for logging, so I'll be able to add that data I'm currently logging about the board.

In the mean time, it might be worth having a look over this thread, as it seems that xalius was trying to get it to work, and seemed to have some luck in getting it loaded up and working.

(09-11-2016, 03:04 AM)Arjun Wrote: I'm using Ubuntu long sleep OS on pine64+, I'm trying to send serial data from the pine 64+ to the Arduino UNO over bluetooth.
For that i installed Bluez package and when i check for the bluetooth device using "Hcitool dev", its empty.
     
When i add a USB bluetooth adapter to pine 64+, it gets detected and works fine.
  Reply
#3
In Bluetoothctl, it is not recognizing the controller.
The result in bluetoothctl is, " No default controller available".
  Reply
#4
Hurray!!
The problem is solved,, i used "Debian Linux Jessie with Mate GUI Image [20160701] by lenny.raposo with Longsleep kernel", in that image bluetooth problem is already solved.
Now i'm able to send serial data to arduino.
  Reply
#5
(09-13-2016, 07:44 AM)Arjun Wrote: Hurray!!
The problem is solved,, i used "Debian Linux Jessie with Mate GUI Image [20160701] by lenny.raposo with Longsleep kernel", in that image bluetooth problem is already solved.
Now i'm able to send serial data to arduino.

I'm absolutely not a distro or kernel builder, so take this for what it is, a probative question based mostly upon ignorance of the work involved, but here goes: Ubuntu is Debian based, so it seems feasible to think someone who knew what they were doing could look at the diffs between the two subsystems and incorporate what works in Debian in the Ubuntu distro?
  Reply
#6
(09-13-2016, 07:44 AM)Arjun Wrote: Hurray!!
The problem is solved,, i used "Debian Linux Jessie with Mate GUI Image [20160701] by lenny.raposo with Longsleep kernel", in that image bluetooth problem is already solved.
Now i'm able to send serial data to arduino.

Would you be able to elaborate a bit further? Are you still using bluez?  What are you using to send/receive data from the Arduino? It looks like anakratis is having trouble, and is on the same distro image... but isn't able to see anything in blueman? I'm interested in knowing what's involved in getting it working also... but from the command line on debian in my case.
  Reply
#7
No, i didn't use Bluez, i used bluetoothctl.

I also used the same image which he was using, but i followed these steps:
In command line:

  1. I entered "Bluetoothctl", which showed

Code:
droot@pine64:/home/debian# bluetoothctl
[NEW] Controller 34:C3: D2:E4:0F:E3 pine64 [default]
[bluetooth]# 

         That proves bluetooth controller is detected.

  2. Then "power on" command inside bluetoothctl

Code:
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 34:C3: D2:E4:0F:E3 Powered: yes
[bluetooth]# 


  3. Then "agent on"

Code:
[bluetooth]# agent on
Agent registered
[bluetooth]#


   4. Then "default-agent"

Code:
[bluetooth]# default-agent
Default agent request successful
 [bluetooth]# 


   5. Then "scan on" which ll list all surrounding bluetooth devices.

   6. Then for pairing, " pair <dev addr>"
               dev addr will be like "98:01:23:89:56:89"
               If asked for pswd, enter it.

   7. Then "paired-devices" command, will list all the paired devices, here u can cross check the pairing confirmation.

That's it.
  Reply
#8
Thanks--  very helpful.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#9
Are you sure, after pairing the devices you can connect to the bluetooth module HC- connected to arduino?, bucause I use bluetoothclt on DEBIAN,

but the devices connect for a second, and then it disconnects!
I'm trying to do the same as you but I have no success using blueman, bluez, bluetoothctl Sad
  Reply
#10
(10-13-2016, 08:01 PM)elpiti Wrote: Are you sure, after pairing the devices you can connect to the bluetooth module HC- connected to arduino?, bucause I use bluetoothclt on DEBIAN,

but the devices connect for a second, and then it disconnects!
I'm trying to do the same as you but I have no success using blueman, bluez, bluetoothctl Sad

I'm connecting to HC-05 using this command:
      rfcomm connect hci0 20:16:24:23:69:32 1
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Wifi / Bluetooth Board Update S265 2 4,688 07-30-2020, 04:53 PM
Last Post: S265
Information Howto: Getting Bluetooth (serial console) working on Debian pfeerick 14 34,903 08-19-2019, 04:33 AM
Last Post: Roverius
  RTL8723bs Bluetooth xalius 21 37,187 03-22-2017, 04:53 PM
Last Post: JulianM
  WIFI & Bluetooth? 7777777 14 31,026 12-24-2016, 05:01 AM
Last Post: Toriless
  How can you get the WIFI/Bluetooth module separate? GoZone 8 12,659 07-06-2016, 05:23 PM
Last Post: JasperBrown
  WiFi/BT module, no bluetooth riviera89 5 8,052 06-24-2016, 04:32 PM
Last Post: srinivas.s34@gmail.com
  Board doesn't boot when wifi/Bluetooth connected with Lcd screen Krinilssen 4 7,763 06-16-2016, 07:22 AM
Last Post: Krinilssen
  WIFI/Bluetooth Chipset monmoonmooonmoooon 2 5,720 01-20-2016, 06:02 AM
Last Post: monmoonmooonmoooon

Forum Jump:


Users browsing this thread: 4 Guest(s)