Jeff Hatch
Forum Replies Created
-
AuthorPosts
-
Jeff Hatch
KeymasterYogesh,
The logging from Node-RED will come out in /var/log/app/node-red.log. The output on the debug port is the linux console output.
Jeff
Jeff Hatch
KeymasterPrakash,
The setup commands look correct for setting up rs485-half duplex mode on accessory card port 2.
I don’t know a lot about python minimalmodbus, but when you create the instrument object “inst” I’m assuming that you have the correct slave address. Also, when you call read_register you are asking for four decimals. Is that correct? Another note is that 40605 is a pretty high register number, is that correct?
Jeff
Jeff Hatch
KeymasterMichael,
I am not sure whether or not the modbus node you want to use will work with nodejs 0.10.40. However, it is not possible to upgrade nodejs beyond 0.10.x due to the Conduit being restricted to the armV5tej instruction set.
Upgrading Node-RED on Conduit is being investigated to see if and where we can end up beyond the 0.11.1 release.
Jeff
Jeff Hatch
KeymasterJulien,
Glad to hear you’ve got things working.
Cheers,
Jeff
February 3, 2017 at 10:41 am in reply to: Internet connection on conduit AEP using Ethernet cable #16661Jeff Hatch
KeymasterAkshay,
The most recent version of AEP does not have WAN failover capability, however, the upcoming release does. In that case, you could set up the eth0 interface as your highest priority WAN, and have the PPP second. If the wan management software detects that the Ethernet WAN is not working it will switch over to PPP. I’m hoping that this will be available in late Q1 this year.
Jeff
February 2, 2017 at 8:47 am in reply to: Internet connection on conduit AEP using Ethernet cable #16630Jeff Hatch
KeymasterAkshay,
In the Conduit Web UI go to Setup->Network Interfaces. Select the eth0 interface for editing, and configure the appropriate IP and gateway (your PC) for the interface. You will have to save and restart. Your Conduit should then be trying to use your PC as it’s gateway for LAN connectivity.
Are you going to enable Cellular at the same time?
Jeff
Jeff Hatch
KeymasterPaul,
You may be able to re-flash from u-boot, but that probably won’t save you. The issue is that the primary env and redundant env u-boot partitions are failing their crc check. This most likely is related to changing the MAC address, though I am not positive about that. What you will probably have to do is restore the u-boot env with a script at the u-boot prompt.
You can file a support portal case at https://support.multitech.com to get a script that you can run at the u-boot prompt to restore the environment.
Jeff
Jeff Hatch
KeymasterAitor,
Just want to make sure that you understand that all the -k option is doing is turning off the server authentication. You will still have a secure session with SSL.
There are a number of CA certificates on the AEP Conduit at /usr/share/ca-certificates/mozilla. Depending on what root CA that the ThingSpeak platform uses, you may be able to point to one of the CA certificates in this directory to authenticate the server certificate.
However, from what I see coming from the wget output, it appears to be having a problem with the self signed certificate on the Conduit. If you have your own certificate signed by a root CA, you should be able to get that to work.
Jeff
Jeff Hatch
KeymasterAitor,
Which certificate error is being generated? It may be possible that certificate validation is failing due to curl not having a root CA to verify the server certificate, or it could be server side certificate authentication failing because the Conduit is using a self-signed certificate, or it could be a number of other things.
Jeff
Jeff Hatch
KeymasterJulien,
If you are using Node-RED you should be able to execute a system call to run the mts-io-sysfs command once in your flow. If you are not, you can either add this command to one of the later init scripts during boot or add your own init script to simply execute this command at start. If you add an init script remember that it will be overwritten when a firmware upgrade is done.
A third alternative would be to use a simple custom application that only executes this command every time it starts, though that might be a little bit of overkill.
Jeff
Jeff Hatch
KeymasterKamran,
When you say you can’t access the device, do you mean that you cannot access it through the debug console? If you have hooked up a USB cable to the debug console, is it stuck at the the point where all it says is “ROM boot”?
Jeff
Jeff Hatch
KeymasterLaurent,
Glad to hear that!
Cheers,
Jeff
Jeff Hatch
KeymasterLaurent,
If the DHCP server gives out an address and gateway information along with DNS you should be able to get Internet access.
The Node-RED flow will be started automatically after the reboot. One thing to note is that Node-RED is a little slow coming up on the Conduit so it may not respond right away. This is due to the limited resources on the Conduit.
You should be able to access the Web UI on the address that the Conduit gets from DHCP. One way to determine this is to log in to the debug/device console on the Conduit, execute an ifconfig command, and look at what address is assigned to the eth0 interface.
Jeff
Jeff Hatch
KeymasterLaurent,
To set up your eth0 as a LAN or WAN with a gateway you can log into the Web UI and in Setup->Network Interfaces you can configure the eth0 interface. If you have a WAN already configured there may be some battling over the default gateway setting, but if eth0 is your only WAN or LAN with a default gateway you should be able to get Internet access through that if it is connected to your network.
You can also use the Network Interfaces eth0 configuration to configure the eth0 to use DHCP to get it’s address and gateway.
Jeff
Jeff Hatch
KeymasterFrederic,
Please open a Multitech Support Portal case at https://support.multitech.com
It sounds like flash problem. It may be possible to get into u-boot and flash from there, but it would be best if you contacted Technical Support.
Jeff
Jeff Hatch
KeymasterJeffrey,
There is a bitbake recipe for MySQL, so it is probably possible to compile MySQL for the Conduit and install the resulting .ipk file. I am not sure how well MySQL will perform on the Conduit hardware.
I have used a flat file composed of JSON collections in the past as a database for custom applications and other things on the Conduit. That might be a path to use. You could use Python to implement the JSON parsing.
Jeff
Jeff Hatch
KeymasterJeffrey,
To run node-red on the AEP Conduit you should use /etc/init.d/node-red start/stop. The node-red-pi program is for running it on a raspberry pi or similar Linux system. Due to a lot of different constraints, Node-RED on Conduit runs Node-RED with a different set of arguments than node-red-pi.
Also, when you are starting Node-RED with node-red-pi, the ports already in use error probably means that there is an instance of Node-RED running already.
For the getaddrinfo ENOTFOUND errors, can you do an nslookup on registry.npmjs.org and get a result like the following?
`# nslookup registry.npmjs.org
Server: 205.171.3.65
Address 1: 205.171.3.65 resolver.qwest.netName: registry.npmjs.org
Address 1: 151.101.48.162′Jeff
Jeff Hatch
KeymasterThe only UI that I can guarantee will work is the IDE/GUI that you can point your browser at on port 1880 on the AEP Conduit.
Jeff Hatch
KeymasterYou would probably use a function node and javascript to execute the ftp command in a similar manner as is being done with the examples here:
http://stackoverflow.com/questions/1880198/how-to-execute-shell-command-in-javascript
There are quite a few examples of how to do this online. Use the method in javascript that best fits what you are trying to do.
Jeff
January 19, 2017 at 9:13 am in reply to: Conduit, Node red and Lora interconnection and storage confusion #16412Jeff Hatch
Keymaster1. So Node.js is installed on the conduit itself right? Now on what server does Node-RED run? It doesn’t run on the conduit itself right?
Node-RED is running on the Conduit itself.
2. Which leads me to my next question – where are the Node red flows and files created stored? For example if I insert a file node in a flow,is that file stored on the conduit hardware or where?
The Node-RED applications are installed in /var/config/app/install. The default application is in /var/config/app/install/development. In that directory there should be a flows.json that contains the information for Node-RED to implement the flow.
3. Does the conduit act as a server as well as a gateway? Or only as a lora network server? And what does this imply – does it only save lora messages or what is its purpose then?
The Conduit is intended to be an application development platform, so it can be a gateway for LoRa or other protocols (modbus for example) or it could be a server or router depending on the configuration and the application.
4. If I, for example a terminal window with SSH I get admin@mtcdt:~# first and then when I say cd / I get the opt, var, etc, lib, tmp directories etc. And are these directories stored on the conduit? When I created a file node in node red I could see it located there as well – what does this mean in terms of location etc?
Yes, /opt, /var, /etc, /lib, etc. are file system directories on the Conduit. They are standard directories you will see in the root of any Linux system. The main thing to be concerned about is as far as creating files with the file node is persistence. The directories in the tmpfs partition (“df .” will tell what partition a directory is in) are not persistent and will not persist through a reboot. Files created in the /dev/root partition will persist until a firmware upgrade. Files created in /var/config (/dev/mtdblock6) will persist both through a reboot and firmware upgrade.
Hope that helps,
Jeff
Jeff Hatch
Keymaster1. How would you access the files on the conduit? For example I have a text file that is can be seen in the / directory when accessing the conduit via SSH
Depending on what you are trying to do, there is a file node under the Storage nodes on Node-RED. I am not familiar with the FTP node you mention, but there should be online documentation on its usage.
2. Are there other places to store the files – ie can I make a directory?
One way to create a directory would be to run a system command to execute a mkdir.
3. Are there other ways to upload a file from the conduit to a ftp server that you know of?
There is an ftp client on the Conduit in /usr/bin/ftp that might be used. Also, scp is available to use SSH to copy a file to a remote location.
6. I assumed that the text files one creates in node red are stored on the conduit right? But where exactly and how does it work?
I am not sure where they are getting put. If you know the name of the file, you could do a “find . -name “name_of_file” -print from the / directory to see where it got put.
Jeff
Jeff Hatch
KeymasterYoussuf,
The npm utility is used to install nodes and node modules, and is run an the command line prompt (use either SSH or the debug console). If nodes have dependencies that are not present on the Conduit and that need to be compiled on the Conduit that will be a problem. If the dependencies don’t need to be built, then the nodes should work.
Jeff
Jeff Hatch
KeymasterYoussuf,
Let’s start with which version of AEP Conduit you are running, and verify which version of Node-RED you have.
To figure out what the AEP version it is, you can log in to the Web UI and at the top of the page there should be a Firmware version.
To find out what version of Node-RED you are running you will either have to connect to the Conduit with SSH or access it through one of the debug console ports. Then in the /var/log/app directory there is a file called node-red.log. In that file Node-RED prints out what version it is when it starts up.
Jeff
Jeff Hatch
KeymasterPatrick,
The device should check in with DeviceHQ if it has Internet access. What is your network configuration on your local network interface on the Conduit?
Jeff
Jeff Hatch
KeymasterEliz,
Multitech is looking into whether Node-RED can be upgraded on the Conduit. This will be addressed Q1 2017, and hopefully Node-RED will get upgraded. Node-RED must be compiled for the Conduit ARM 5 instruction set. It may be possible to build a newer version for AEP Conduit, but it has not been researched.
Jeff
Jeff Hatch
KeymasterEliz,
Have you rebooted the Conduit and reconnected to Node-RED after it came back up? People have seen the nodes not show up until they did a reboot. If you can, check to see if the new node has been installed in /opt/node-red in either the nodes or node_modules directory.
Jeff
Jeff Hatch
KeymasterEliz,
I think that there is a –prefix argument that you might need to specify in order to get the nodes to install in the appropriate place for Node-RED to find them. On Conduit I have used “–prefix /opt/node-red and it has worked in the past.
Jeff
Jeff Hatch
KeymasterEliz,
To type the commands you mentioned you will either have to use SSH to connect to the Conduit, log in, and then you should be at a command prompt, or use the one of the debug console ports (the USB Device port on the back or the USB port behind the white plate with the Multitech logo on the front.
Jeff
Jeff Hatch
KeymasterRadim,
Have you tried to enable the ICMP check and the data receive monitor on the Cellular configuration? Those two features help keep the PPP connection alive in a lot of situations where the Conduit loses PPP connectivity.
Jeff
Jeff Hatch
KeymasterAitor,
Take a look in /var/log/app/node-red.log and see if there is any error or other information pertaining to the MQTT node. That would be the first place to start to debug what is going on in the Node-RED flow.
Jeff
-
AuthorPosts