# How to use Bluetooth function with making custom node?

**URL:** https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277
**Category:** Developing Nodes
**Created:** [27 September 2022 07:18 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277 "2022-09-27T07:18:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![choiprin0310](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@choiprin0310](https://discourse.nodered.org/u/choiprin0310)
#### Post date: [27 September 2022 07:18 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277/1 "2022-09-27T07:18:07Z")

</div>

## Hi! I'm making custom node

I'm trying to make custom node with Bluetooth technology.  
However, I don't know how to use BLE things. I have no idea.   
In other case like Ionic app framework or etc, we usually use   
library but i don't know how to use in node-red.  
Anyone helps?

Here is my .js code

```auto
module.exports = function(RED) {
    function LowerCaseNode(config) {
        RED.nodes.createNode(this,config);
        var node = this;
        var test;
        var weight1;
        node.on('input', function(msg) {
            weight1 = document.getElementById('node-input-weight1');
            test = weight1.innterText;
            msg.payload=test;
            node.send(msg);
            
        });
    }
    RED.nodes.registerType("(주)더원시스템",LowerCaseNode);

```

Thanks for reading. Regards.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [27 September 2022 11:39 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277/2 "2022-09-27T11:39:54Z")

</div>

A node is simply a node.js module that is `require`d by Node-RED when it starts. It has specific requirements of course but if you want to use a third-party library with your node, you do that the same as you would with any other node.js app.

> [@choiprin0310](#):
>
> I don't know how to use BLE things. I have no idea.

Then you have jumped into a very deep and cold lake. Bluetooth is extremely complex and hard to get right. Libraries will help but you need a good understanding of how BT works.

---

<div class="post-metadata">

### Author: ![choiprin0310](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@choiprin0310](https://discourse.nodered.org/u/choiprin0310)
#### Post date: [28 September 2022 00:46 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277/3 "2022-09-28T00:46:02Z")

</div>

Tnx for replying. I mean I alr made other BLE application but  
i don't know how to use in node-red custom node.  
I used to use library for BLE before but i can't find any library in node-red.  
Do u have any idea? Tnx

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [28 September 2022 01:09 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277/4 "2022-09-28T01:09:33Z")

</div>

There are some bluetooth nodes for Node-RED, check out the "flows" site to search for them. Noting that they don't always seem very reliable going by various threads in the forum over the years. But you may be lucky.

You can also use node.js packages with function nodes as well with newer versions of Node-RED.

As always, details are in the documentation.

---

<div class="post-metadata">

### Author: ![choiprin0310](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@choiprin0310](https://discourse.nodered.org/u/choiprin0310)
#### Post date: [3 October 2022 05:21 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277/5 "2022-10-03T05:21:28Z")

</div>

Tnx for replying again. I'll try it

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [2 December 2022 05:21 UTC](https://discourse.nodered.org/t/how-to-use-bluetooth-function-with-making-custom-node/68277/6 "2022-12-02T05:21:51Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
