frankjoke / ioBroker.radar

ioBroker der Verfügbarkeiten von IP- und Bluetooth-Adressen prüft
MIT License
5 stars 5 forks source link

Don't work Arp-scan #24

Closed 2scorpio closed 5 years ago

2scorpio commented 6 years ago

Hello. I have Centos 7 uname -a Linux 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux I install - yum install fping arp-scan

But in ioBroker log see this error:

radar.0 | 2018-09-18 00:10:43.566 | warn | MAC addresses 'xx:xx:xx:xx:xx:93' will not be scanned because no arp-scan is available!

Why i see this warning ? How i can fix it ?

nob0dy80 commented 5 years ago

You are right ! Damn it..the only function i need is not working.

radar.0 2019-01-06 20:25:29.169 warn Invalid Device should have IP or BT set { name: 'Micha', ip: '', macs: '80:58:F8:9E:3F:10', bluetooth: '', id: 'Micha', hasMAC: [ '80:58:F8:9E:3F:10' ], hasBT: false, printer: '', hasE
radar.0 2019-01-06 20:25:29.167 warn MAC addresses '80:58:F8:9E:3F:10' will not be scanned because no arp-scan is available!
Apollon77 commented 5 years ago

But you missed to enter the IP!

Apollon77 commented 5 years ago

Please enable Debug loglevel for the instance and send full log please.

nob0dy80 commented 5 years ago

Apollon.. talked to wendy.. its known that the programmer doesnt reply. its a bug please take a look here for further information: https://forum.iobroker.net/viewtopic.php?p=214803#p214803

nob0dy80 commented 5 years ago

But here:

radar.0 2019-01-06 21:48:18.014 info Adapter initialization finished!
radar.0 2019-01-06 21:48:17.898 debug Make State AllUnknownIPs and set value to ''{}''
radar.0 2019-01-06 21:48:17.898 debug Make State UWZ_Warning and set value to ''mäßiger bis frischer SW-NW-Wind, Sturmböen zwischen 75 und 80 km/h sind möglich''
radar.0 2019-01-06 21:48:17.896 info UWZ found the following (changed) warnings: mäßiger bis frischer SW-NW-Wind, Sturmböen zwischen 75 und 80 km/h sind möglich
radar.0 2019-01-06 21:48:17.882 debug Make State AllUnknownBTs and set value to ''{}''
radar.0 2019-01-06 21:48:17.877 debug Noble found unknown BT's: {}, unknown IP's: [object Object]
radar.0 2019-01-06 21:48:17.864 debug Make State whoHere and set value to ''''
radar.0 2019-01-06 21:48:17.854 debug Make State allHere and set value to ''''
radar.0 2019-01-06 21:48:17.827 debug Make State countHere and set value to '0'
radar.0 2019-01-06 21:48:17.827 info ScanAll: From all 0 devices dedected 0 are whoHere:
radar.0 2019-01-06 21:48:17.812 debug Noble= Noble { initialized: false, address: 'unknown', _state: 'unknown', _bindings: NobleBindings { _state: null, _addresses: {}, _addresseTypes: {}, _connectable: {},
radar.0 2019-01-06 21:48:17.812 debug Would now start scan for devices! Would also scan for printer ink now!
radar.0 2019-01-06 21:48:17.812 info radar set use of noble(true), fping(true), doMac(false), doHci(true), doBtv(false) and doUwz(UWZDE45136,1800,0,de,false).
radar.0 2019-01-06 21:48:17.811 info radar adapter initialized 0 devices, ExternalNetwork = 300.
radar.0 2019-01-06 21:48:15.626 debug Make State ExternalNetwork.status and set value to '2'
radar.0 2019-01-06 21:48:15.593 debug Make State ExternalNetwork.IP4 and set value to ''89.246.25.195''
radar.0 2019-01-06 21:48:15.588 info New IP address 89.246.25.195
radar.0 2019-01-06 21:48:15.098 warn Invalid Device should have IP or BT set { name: 'Micha', ip: '', macs: '80:58:F8:9E:3F:10', bluetooth: '', id: 'Micha', hasMAC: [ '80:58:F8:9E:3F:10' ], hasBT: false, printer: '', hasE
radar.0 2019-01-06 21:48:15.094 warn MAC addresses '80:58:F8:9E:3F:10' will not be scanned because no arp-scan is available!
radar.0 2019-01-06 21:48:09.918 info BT Bin Dir = '/opt/iobroker/node_modules/iobroker.radar\bin\bluetoothview\'
radar.0 2019-01-06 21:48:09.918 info radar set to scan every 31 sec and printers every 500 scans.
radar.0 2019-01-06 21:48:09.918 info starting. Version 1.1.3 in /opt/iobroker/node_modules/iobroker.radar, node: v8.14.0
radar.0 2019-01-06 21:48:09.876 info BT Bin Dir = '/opt/iobroker/node_modules/iobroker.radar\bin\bluetoothview\'
radar.0 2019-01-06 21:48:09.876 info radar set to scan every 31 sec and printers every 500 scans.
radar.0 2019-01-06 21:48:09.803 info starting. Version 1.1.3 in /opt/iobroker/node_modules/iobroker.radar, node: v8.14.0
radar.0 2019-01-06 21:48:09.693 debug statesDB connected
radar.0 2019-01-06 21:48:09.634 debug objectDB connected
host.iobroker 2019-01-06 21:48:08.578 info instance system.adapter.radar.0 started with pid 2046
host.iobroker 2019-01-06 21:48:08.552 info object change system.adapter.radar.0
nob0dy80 commented 5 years ago

the other side:

root@iobroker:~# arp-scan 10.10.10.0/23 | grep 80:58:f8:9e:3f:10 10.10.11.14 80:58:f8:9e:3f:10 (Unknown) root@iobroker:~#

what a bullshit blacklisting :-D but arp-scan is working as you see

2scorpio commented 5 years ago

i found a problem and fix them. everywhere where arp-scan is caused pExec('arp-scan -lgq --retry=7') i add the interface pExec('arp-scan --interface enp1s0 -lgq --retry=7') after that the script works normally

Apollon77 commented 5 years ago

So it is about multiple network interfaces and arp-scan choosing wrong one by himself?

nob0dy80 commented 5 years ago

@2scorpio and where did you do those changes?

2scorpio commented 5 years ago

@2scorpio and where did you do those changes?

in /opt/iobroker/node_modules/iobroker.radar/radar.js

2scorpio commented 5 years ago

So it is about multiple network interfaces and arp-scan choosing wrong one by himself?

Perhaps, I did not begin to understand. I have three interfaces: lo enp1s0 wlp2s0 - is disconnected

nob0dy80 commented 5 years ago

ok i tried it. its not working for me. still getting the same error

radar.0 2019-01-07 14:34:30.534 warn MAC addresses '80:58:F8:9E:3F:10' will not be scanned because no arp-scan is available!
2scorpio commented 5 years ago

ok i tried it. its not working for me. still getting the same error

radar.0 2019-01-07 14:34:30.534 warn MAC addresses '80:58:F8:9E:3F:10' will not be scanned because no arp-scan is available!

pExec('arp-scan --interface enp1s0 -lgq --retry=7') you must change "enp1s0" - to you active interface

frankjoke commented 5 years ago

Dear all! I will be adding an entry in radar setup for the arp-scan command line so you can change it to your needs.

My development board (An OrangePi2E+) died and does not boot anymore. As also my NAS was filled up by my families PC backups I decided to buy a new one which can handle a virtual system which will become my new development system. I ordered it already and got already the box (QNAP 453B) but I am waiting for the additional hard disks I need. I installed a HD which I had as spare and installed a VM with Raspian Stretch (latest PC version) top be as close as possible to an normal Raspi. It works so far, just installing now ioBroker, Samba, ... and then I need to check if I can handle Bluetooth via the USB stick in the virtual machine (I need it for the tests). If this works and I will have the other HD's to make a RAID and bring over data from old systems I will publish a new version of radar, all hopefully this week.

nob0dy80 commented 5 years ago

ok i tried it. its not working for me. still getting the same error radar.0 2019-01-07 14:34:30.534 warn MAC addresses '80:58:F8:9E:3F:10' will not be scanned because no arp-scan is available!

pExec('arp-scan --interface enp1s0 -lgq --retry=7') you must change "enp1s0" - to you active interface

yeah i know and did: doMac ? pExec('arp-scan --interface eth0 -lgq --retry=7')

but at least it was a try :-D

Apollon77 commented 5 years ago

maybe better to just allow a field to select or enter the network interface name to use instead of the full command line?

frankjoke commented 5 years ago

I will make the last part (--retry=4) changeable and you can add then for example '--interface enp1s0 --retry=4'. I changed also the retry to 4 to reduce the traffic generated, but if somebody needs it it can be set back via change of command line.

frankjoke commented 5 years ago

Just put v1.2 on git where arp-scan can be configured!