carbonsphere / UHPPOTE

Network Communication Class
34 stars 9 forks source link

serial number of board not part of mac-address #5

Closed fleptino closed 5 years ago

fleptino commented 5 years ago

Dear Carbon! Thank you for developing the wiegand code. I have problems accessing my controller board, search.php finds the board but I can't get anwers by the other scripts.

E.g. getRecordExample.php hangs at "Listening for return status" and there is no return, even I handle with RFID-cards at the readers. Padding 56 Send the folling command to network 17b40000348413230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Sending.... Listening for return status I'm not sure about the serial number, because in my case a have a sticker with 9 digits decimal serial number, and these are other digits than the mac-adress.

When I use the serial number from the label, I get the message:

PHP Warning:  hex2bin(): Hexadecimal input string must have an even length in /root/UHPPOTE-master/getRecordExample.php on line 41
Sending....
There is error

Also the windows-software Wiegand Access shows me the number on the label and different MAC, when it has found the access controller in the network. This is the output from the Access software:

_Entrace Door Status: Open Door Control: OnLine DoorDelay(Sec): 4 SN: 423138434 IP: --Swipes: 12 --Privielges: 3 --RealClock: 2019-08-06 22:30:07 Dienstag --Firmware Version: V6.62 [2015-12-15] --MAC: 00-66-19-38-94-82 [100M] ---- Enabled ---- --Record Button Events --Record Door Status Events --Record Warn Events ---Threate Code-Invalid Card Reader

The search.php code works and finds the controller with this output: Padding 60 Send the folling command to network 17940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Sending.... Listening for return status Processing return status array(8) { ["cmd"]=> string(6) "search" ["ip"]=> string(14) "192.168.15.120" ["mask"]=> string(13) "255.255.255.0" ["gate"]=> string(12) "192.168.15.1" ["mac"]=> string(17) "00-66-19-38-94-82" ["ver"]=> string(4) "0662" ["date"]=> string(8) "20151215" ["sn"]=> string(8) "19389482" } Success!

Hopefully you can help me and tell me something about compatibility of my controller. Here is a picture from the board: https://abload.de/img/img_20190806_221644xkjfv.jpg

Thank You!

fleptino

cvschleich commented 5 years ago

Check the 'sn' variable in the output above. It's the same as the last 4 octets of your MAC address. That's the serial number your need to use to address the board.

carbonsphere commented 5 years ago

That seems to be the serial number for the board but that the serial number of the unit.

Usually the last 4 bytes of your board's MAC address EX: 00:11:22:33:44:55 then the Serial Number = 22334455

Try that and let me know if it works or not. I'll be closing this in a few days.

carbonsphere commented 5 years ago

yeah your serial should have been 19389482 cheers.