Using 2 B channels in a BRI ISDN connection - telephony

I am trying to use 2 B channels in and ISDN BRI 2B+D connection. One for voice, and the other for device specific commands over HDLC. I am using the CAPI 2.0 API. I can configure one B channel as voice or HDLC but, I can't figure out how to configure the connection to use 2 B channels at the same time.

Related

Synchronization of Named pipes server and clients

I want to send data between 1 server(overlapped) and 3 clients using named pipes, in high level i am using the named pipe to Toggle the 3 different GPIO pins in microcontroller . When i am doing that First client is fast and second client is slow and third client is slower
Speed::Client 1 > Client 2 > Client 3
I want 3 clients to run at same speed or at in a synchronization

How to generate the LoRa App key and App EUI

LoRa appKey and appEUI can i randomly generate ? or anything else...
Example:
AppEUI (8 bytes, example): 424152414E490000 (random value)
Appkey (16 bytes, example):424152414E492044455349474E000000 (random value)
You can use random AppKeys for your devices. (It is recommended that every device has a different AppKey.) Please note that the AppKey you provision on the LoRaWAN network server must be the same as the one your LoRaWAN end device is personalized with.
The purpose of the AppEUI is to identify the Join Server of your home network. When your device sends a Join Request to the network server it will forward it to the Join Server of your device. Therefore, it is essential the you personalize your end device with a proper AppEUI.
However, in case your network server is not connected to any external Join Server and processes all Join Requests by itself, the AppEUI is not used for anything and you can use a random EUI. It is still important that the AppEUI provisioned on the network server is the same as the one the device is personalized with.

Single Channel LoRaWAN systematically accepts just one packet out of 3 sent by node

I just built and tested a single channel LoRaWAN gateway which is connected to TTN as per the instructions of thing4U/esp-1ch-gateway with a single channel node both based on TTGO-ESP32Lora and eventually configured both on www.thethingsnetwork.org. Everything works nicely but I do not understand why despite the node sending data at pace of 2 minutes, the gateway receives just one packet out of three. So if I trasnmit: packets 0,3,6,9 etc. the data at ttn is updated every 6 minutes instead of 2.
That is correct. LoRaWAN uses the first three channels as main channels for communication. More can be configured for use. These three exist in part because they then can always be used for OTAA.
So if you have a single channel gateway and it is listening to 868.100 MHz and your node sends on 868.300 MHz then your gateway won't hear it because it is listening on the wrong frequency.
There are several solutions:
configure your node to only send on the single frequency your gateway is listening for.
Add two more single channel gateways who listen on the other main frequencies.
Add a multi channel gateway.
Frequencies are only meant as an example, these frequencies are applicable to EU and may differ in your own region but the principle still stands.

Simulating multiple modbus slave devices using node red

I've managed to simulate a single slave device on my raspberry pi using node-red using functions to send data random values to the Modbus flex server. However, now I want to be able to simulate multiple Modbus slave devices on the port number and I'm unsure how to do this.
I've tried creating another Modbus flex server with the same port number, but this causes the whole node-red application to crash when it's deployed. Secondly, I've tried using different Modbus flex-write nodes to simulate different slave devices, but I'm unsure whether this is correct and if so, how I'd configure them to appear as different slave devices. This is because so far, my raspberry pi appears as slave 1, but I'm unsure where this comes from. I'm guessing it's to do with the unit-id of the Modbus flex-server but when I change the unit-id to a different number and type that number as the address in the master, it says no connection.
In conclusion, is it possible to use a single raspberry pi to simulate multiple slave devices on node-red using node-red-contrib-modbus and if so how do you do it?
The concept of Slaves in Modbus TCP differ somewhat from RTP as set out in the Modbus TCP Spec:
The MODBUS ‘slave address’ field usually used on MODBUS Serial Line is
replaced by a single byte ‘Unit Identifier’ within the MBAP Header.
The ‘Unit Identifier’ is used to communicate via devices such as
bridges, routers and gateways that use a single IP address to support
multiple independent MODBUS end units.
So there is a difference in termanalogy between Modbus RTP and TCP as well as a difference in the intended use of this field. The solution suggested by the spec would be to setup multiple servers on different ports (you cannot run multiple servers on a single port).
Having said that some TCP->RTP gateways (and other devices) use the unitid as the slave ID so I'm assuming you are trying to simulate something like this?
The first issue is that there appears to be a bug in Modbus Flex Server (reported) in that when you change the unit-id it is being stored as a string rather than a number. If you export the flow you will see something like "unitId": "3",; changing this to "unitId": 3, (no quotes around the 3) and importing fixes the issue (so that probably explains why you could not get this working).
Having said that changing the unit-id like this does not help you because it only supports one ID. However if you set the unit-id to 255 then it will listen on all unit-ids (this is a feature of the modbus-serial module used internally). Remember that you will currently need to manually fix the config to get this to work due to the bug.
Having done that you can do something like the following to respond to requests to different unit ids (the example will return the unit id (1 or 2) for all addresses so is not useful but shows the concept):

Existing TCP Relay Solutions

I have a scenario which requires the use of a TCP Relay. Before I set out to write something custom, I wanted to see if anyone knows of existing software that can do this for me.
I have 2 devices on separate networks that cannot connect to each other. Let's call them networks A and B. These devices need to communicate, and they can do so via a "middleman" relay on network C. A can connect to C, and B can connect to C. C cannot connect to either A or B.
A -> C <- B
The idea is as follows:
A establishes a TCP connection to C and simply waits
B establishes a TCP connection to C when it wants something from A.
C reads the data from B and responds with it to the already open connection from A.
A processes the data and responds to C, which relays to B.
Is there an existing tool out there that can do this?
As explained here: https://serverfault.com/questions/634516/existing-tcp-relay-solutions/634519
socat TCP4-LISTEN:12345 TCP4-LISTEN:54321
(where 12345 and 54321 are the ports on which the server listens for each connection). One of the clients connects to one port, the other on the other port, and then data is exchanged in both directions. If one machine sends data before the other connects, it is buffered and sent after the connection.