zinen / node-red-contrib-huawei-router

Node-RED node to get information and send commands to Huawei LTE routers.
MIT License
4 stars 1 forks source link

Get signal strength functionality request #1

Closed scotcob closed 3 years ago

scotcob commented 3 years ago

Have the node working with my Huawei E5577Cs-321 and have no issues, able to receive details of devices on the router network, works really well. Would it be possible to add additional functionality to include Signal and Status for example? These additional functions (and others that are available with the API) could be selectable in the node to request required data. Unfortunately I am not a coder so unable to help, however can assist on testing and developing the node further.

zinen commented 3 years ago

Please give more info - I decided to only make the API calls i use until some features was requested.

Do you mean able to receive 3G/4G signal strength? And what is "Status" ?

If you could look into the api calls here and tell me. I can try to test if i can get it working :)

scotcob commented 3 years ago

Personally I am only looking for signal strength data from the router, the status was only a nice to have. I looked at the "api calls here" and don't see anything relevant. The information I looked at was https://github.com/ishan-marikar/dialog-router-api#readme ,this shows getSignal which is the data I am looking for, hopefully this helps.

zinen commented 3 years ago

Looked into this, Please try version 0.0.5 of this node to see the signal strength node, It returns an awful long list of data as seen here from my Huawei B525s-23a router with two external directional antenna:

msg.payload = {
  pci: '245',
  sc: '',
  cell_id: '6687312',
  rsrq: '-15dB',
  rsrp: '-75dBm',
  rssi: '>=-51dBm',
  sinr: '5dB',
  rscp: '',
  ecio: '',
  mode: '7',
  ulbandwidth: '20MHz',
  dlbandwidth: '20MHz',
  txpower: 'PPusch:-1dBm PPucch:-12dBm PSrs:17dBm PPrach:-19dBm',
  tdd: '',
...
}

Reading up on this blog here the quality of the signal strength is made from a calculated mix of RSRP, RSRQ and SNIR. I would have a hard time calculating the signal streng exactly like Huawei do it if you dont want the raw values.

How did you expect to receive the signal streng back from this node? A percentage from 100-0%, a varied string like["Excellent", "Good", "Medium", "Weak"], or maybe the raw signal data?

Definitions RSRP = Reference Signal Received Power. RSRQ = Reference Signal Received Quality. SNIR = Signal to Noise plus Interference Ratio.

scotcob commented 3 years ago

Have tried version 0.0.5 of the node and the results for me are very positive. On connection the router (Huawei E5577Cs-321) returned the following:

msg.payload = {
pci: "446",
sc: "",
cell_id: "1372487",
rsrq: "-11dB",
rsrp: "-110dBm",
rssi: "",
sinr: "3dB",
rscp: "",
ecio: "",
psatt: "1",
mode: "7",
lte_bandwidth: "",
lte_bandinfo: ""
}

(above figures taken with router on desk with no external aerial connected)

This looks like a reduced subset of what you received with your router, however the message includes what I require - RSRQ, RSRP and SINR, RSSI is not returned. I checked the router URL with /API/DEVICE/SIGNAL and this confirmed RSSI is not returned from this router.

The raw signal data is preferred, I have created Red-Node Dashboard with 3 gauges configured to RSRQ, RSRP and SINR, I am able to check signal indication from these and adjust to suit. From this I can use chart nodes to monitor the signals ongoing. The gauges use ranges configured as "Stats for HUAWEI LTE Routers" app:

RSRQ -20dBm to -3dBm RSRP -110dBm to -70dBm SINR 0dBm to 30dBm (RSSI -113dBm to -51dBm) for reference Later I may look at configuring gauge for RSSI using formula.

For information my application is router installed in Motorhome (RV), I have the router installed in a small cupboard within, I have a Poynting 5G/4G directional aerial mounted on a 3m mast at the rear of the Motorhome bike rack, at the bottom of the mast I developed an aerial rotator that communicates through ESP32 device to Red-Node. This enables me to monitor the Huawei app with the "5 bar signal" indicator and move the mast to obtain best signal. This worked reasonably well however the limitation was the feedback from the router app - the "5 bar signal".

I tried the system with your new node and the results are really encouraging, with the RSRQ, RSRP and SINR gauges I can adjust the aerial in small increments to fine tune the signals, initial testing showed gains of -5dBm for RSRP even although the Huawei app continued to show "5 bars" throughout the tests.

Trust the above information is of use, many thanks for taking the time to further develop the node.

zinen commented 3 years ago

Perfect. I'll leave the node as it is now then.

Sounds like a nice setup you got with external antenna. Motorized to autotune to the right angle towards the signal tower. Just love the idea.