Device ID you can find in browser URL, when you edit mactrack device. For example: http://www.server.ip/cacti/plugins/mactrack/mactrack_devices.php?action=edit&device_id=121
Your debug output shows a lot of strange things.
Device with id=2 is a some linux based, wireless AP, and scanning function finds in it at least 9 interfaces, but none of them are user ports. This may occur, because they are trunk ports or ignored ports, or function get_generic_wireless_ports
don't see them as wireless. You can try a function get_linux_switch_ports
for this device.
To understand a problem I want to see output of following command:
snmpwalk -v2c -c public 192.168.240.1 interfaces
If you don't have installed snmpwalk, install it with package snmp-tools, using yum package manager.
Device with id=3 is a Cisco Router, and have no user ports, because router have no switchports.
Device with id=4 is a MikroTik Switch, but you for some unknown reason use scanning function get_linux_switch_ports
, although, in my opinion, you should use get_generic_switch_ports