How to create custom applications
Home › Forums › Conduit: AEP Model › How to create custom applications
- This topic has 13 replies, 3 voices, and was last updated 7 years, 2 months ago by Jeff Hatch.
-
AuthorPosts
-
August 27, 2017 at 7:25 pm #20775Srinivas RajgopalParticipant
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.?
August 28, 2017 at 7:53 am #20779Jeff HatchKeymasterSrinivas,
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
August 28, 2017 at 7:57 am #20780Srinivas RajgopalParticipantHi 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?
August 29, 2017 at 10:22 am #20792Jeff HatchKeymasterSrinivas,
Are you using the lora network server or the packet forwarder?
Jeff
August 29, 2017 at 10:26 am #20794Srinivas RajgopalParticipantThe 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?
August 29, 2017 at 10:38 am #20795Jason ReissKeymasterUDP or MQTT can be used to receive and send lora messages through the network server.
A sample app using node.js is available here:
August 29, 2017 at 10:47 am #20797Srinivas RajgopalParticipantWhat 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?
August 30, 2017 at 8:29 am #20822Srinivas RajgopalParticipantTo 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
August 30, 2017 at 8:46 am #20823Jeff HatchKeymasterSrinivas,
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
August 30, 2017 at 8:54 am #20824Srinivas RajgopalParticipantYes, 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
- This reply was modified 7 years, 2 months ago by Srinivas Rajgopal.
September 5, 2017 at 9:08 pm #20862Srinivas RajgopalParticipantHello Jeff,
Any update on how to get this running?
Srinivas
September 6, 2017 at 7:52 am #20866Jeff HatchKeymasterSrinivas,
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
September 6, 2017 at 11:14 am #20867Srinivas RajgopalParticipantSo 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?
September 7, 2017 at 8:48 am #20881Jeff HatchKeymasterSrinivas,
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
-
AuthorPosts
- You must be logged in to reply to this topic.