How to create custom applications

Home Forums Conduit: AEP Model How to create custom applications

Tagged: ,

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #20775
    Srinivas Rajgopal
    Participant

    I understand how to create custom applications and how they should be structured, but how do I actually make use of the conduit’s capabilities? I am using the MTCDT-LAT1-247A and I’m trying to relay BLE data. Is there any library or API to make use of the conduit’s built in BLE functionalities? If not, how can I make an application that will just send the BLE data over LORA for eg.?

    #20779
    Jeff Hatch
    Keymaster

    Srinivas,

    The Conduit has Bluez 5 installed on it. The easiest way to create an app would probably be to use Python. The gattool utility is also available for communicating with BLE devices.

    Jeff

    #20780
    Srinivas Rajgopal
    Participant

    Hi Jeff,

    How would my application communicate with the conduit itself? For e.g., If I wanted to send a packet of data through the conduit if some conditional was satisfied, what would be the python function call or command to do this? Is there some sort of built in SDK or framework or library to do this?

    #20792
    Jeff Hatch
    Keymaster

    Srinivas,

    Are you using the lora network server or the packet forwarder?

    Jeff

    #20794
    Srinivas Rajgopal
    Participant

    The network server will run the custom application, which aims to do the following;

    If it receives a BLE packet with some data, It will send this BLE data on LORA.

    My question is, how do I create such an application? What are the function calls or commands (library/framewwork) in python to build such an application?

    #20795
    Jason Reiss
    Keymaster

    UDP or MQTT can be used to receive and send lora messages through the network server.

    MQTT Messages

    A sample app using node.js is available here:

    Conduit mLinux: LoRa Communication

    #20797
    Srinivas Rajgopal
    Participant

    What about custom nodes within Node red on the AEP model? Is it possible to somehow add custom nodes to the node red software within the AEP? for eg a BLE input node created and added to the list of available input nodes?

    #20822
    Srinivas Rajgopal
    Participant

    To elaborate, I am trying to add a node to node red within the AEP where the source code is on GitHub. It is the node-red-nodes file. How can I install this? When I try to install it on my pc and then ssh into the AEP and then cd to /opt/node-red and do an npm install, I get many errors. Don’t I have to somehow clone the repo within the AEP?

    Thanks

    #20823
    Jeff Hatch
    Keymaster

    Srinivas,

    What is the npm install command you’re using? Is the package you’re talking about located at https://github.com/node-red/node-red-nodes?

    Cross-compilation is sometimes required for node-red nodes. The Conduit does not support cross-compilation natively. Conduit is based off of mLinux (http://www.multitech.net/developer/software/mlinux/) so you can download mLinux or the mLinux SDK (http://www.multitech.net/developer/software/mlinux/mlinux-software-development/mlinux-c-toolchain/) and cross-compile the code if necessary.

    Jeff

    #20824
    Srinivas Rajgopal
    Participant

    Yes, that is the package I’m talking about. the command I’m using is

    first:

    cd /opt/node-red
    npm install node-red-node-{filename of node I want}

    I do all of this after cloning the repo into my PC

    #20862
    Srinivas Rajgopal
    Participant

    Hello Jeff,

    Any update on how to get this running?

    Srinivas

    #20866
    Jeff Hatch
    Keymaster

    Srinivas,

    Have you either downloaded and extracted the tar archive or cloned the git repo for the node-red-nodes package in /opt/node-red first? It might also be possible that you need to update the version of npm.

    Jeff

    #20867
    Srinivas Rajgopal
    Participant

    So the repository needs to be cloned into /opt/node-red? And after that the command to install should work correct?

    What about updating npm, how do I update it with the gateway?

    #20881
    Jeff Hatch
    Keymaster

    Srinivas,

    You will need to copy the tar file into /opt/node-red/nodes, and untar it there. Then run npm install in any of the sub-folders that you want to install the nodes for. See Installation under https://github.com/node-red/node-red-nodes.

    Jeff

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.