• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bluetooth Access
#2
Hello Madhumati,

communicating over Bluetooth is like communicating across the well-known Modbus RTU for example. Both are serial protocols. Modbus uses cable usually, while Bluetooth goes over wireless.

For both your need
  • a BT antenna for Bluetooth and for Modbus an RS232/RS485 port .
  • a bluetooth chip for bluetooth and a bus driver for Modbus 
  • a protocol stack for Bluettooth and a protocol stack for Modbus
  • an application that makes use of the protocol stack to call different service like read/write/reset or whatever
  • a UUID specification of the server Bluetooth device to get knowledge about the attribute profile (named GATT: https://learn.adafruit.com/introduction-...nergy/gatt) it supports and for Modbus the meaning of the different registers you can read/write
With the container you have deployed right now you have also the Bluetooth stack included. The Bluetooth stack is named "Bluez" by the way. So the container includes a compiled version of "Bluez" along with some basic Linux tools that can be used to make some basic tests like "bluetoothctl","hciconfig" and "hcitool".  Since all tools can be used just manually they are not good to automated applications. Here is an example how to use "bluetoothctl": https://docs.ubuntu.com/core/en/stacks/b...t-services

So you recognized yourself that you need to write your own application and as it is usual with Linux you (your customer) can decide to write applications with different programming languages like Python, C#, C++, Java, Javascript whatever on top of "Bluez" to communicate with a Bluetooth server device. So the main question is: is your customer a programmer? Or is he just a user who wants to make use of a ready Bluetooth client application?

Last year I bougth this small device here: http://www.blehome.com/sensorbug-lp.html . It is not bigger than a coin, but can measure multiple things. I was interested in reading the current temperature from it over netPI. I was at exaclty the same point like you and didn't know how to read out values from it since all the tools that come with "Bluez" did not help me writing an own application. And I have to admit that I never had the intension to make a deep dive into any of the programming languages to compile such an application myself.

This is why I have decided to search for a solution using Node-RED and I was successful. I got a proper communication running between my netPI and my sensorbug bluetooth device and I was able to read out the temperature value from it. Based on this experience I included the Bluez stack and and a Bluetooth Node in netPI standard Node-RED container: https://hub.docker.com/r/hilschernetpi/netpi-nodered

So my recommendation is to use Node-RED for Bluetooth communication instead of the raw Bluetooth container that you are using so far.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Messages In This Thread
Bluetooth Access - by MGharat - February-20th-2020, 05:42 AM
RE: Bluetooth Access - by Armin@netPI - February-20th-2020, 07:23 AM
RE: Bluetooth Access - by MGharat - February-21st-2020, 10:14 AM
RE: Bluetooth Access - by Armin@netPI - February-21st-2020, 10:30 AM
RE: Bluetooth Access - by Armin@netPI - February-21st-2020, 11:07 AM
RE: Bluetooth Access - by Armin@netPI - February-21st-2020, 01:51 PM
RE: Bluetooth Access - by MGharat - February-24th-2020, 11:45 AM
RE: Bluetooth Access - by Armin@netPI - February-24th-2020, 11:48 AM
RE: Bluetooth Access - by MGharat - February-24th-2020, 01:17 PM
RE: Bluetooth Access - by Armin@netPI - February-24th-2020, 01:26 PM
RE: Bluetooth Access - by DSongra - February-25th-2020, 12:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Wi-fi in Access Point mode Renato75 7 4,887 June-3rd-2022, 12:59 PM
Last Post: Armin@netPI
  NetPI wifi access to WPA2-Enterprise MikeP 4 4,423 September-3rd-2021, 02:56 PM
Last Post: MikeP
  netPI RTE 3: access from several comm. masters tad 3 4,159 June-3rd-2021, 12:03 PM
Last Post: Armin@netPI
  Bluetooth testing DSongra 6 3,722 April-29th-2021, 06:08 AM
Last Post: DSongra
  Access to RTC from my own container application tad 1 3,621 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  HilscherAutomation / netPI-bluetooth entrypoint.sh error bbaskii 6 4,391 September-14th-2020, 04:42 PM
Last Post: bbaskii
Wink How to access Root Directory Rajesh3128 8 5,375 October-16th-2019, 11:19 AM
Last Post: Armin@netPI
  netPI access for remote PLC confign MGharat 3 5,025 October-15th-2019, 09:12 AM
Last Post: Armin@netPI
  How to access netPI? firefly 6 6,325 May-16th-2019, 02:31 AM
Last Post: firefly
  Wi-Fi access problem MGharat 3 5,108 March-12th-2019, 09:27 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)