The reason for this post is to help others find an answer to the mactelnet error "Connection failed."
For me, until I was able to make a successful connection and investigate the ROS default-config, I couldn't understand why I kept getting the error above. Consequently I took several steps in the wrong direction. Perhaps the keywords in the title and the info below will help a new user trying to connect to their router while using the mactelnet client. I could not find these details in the forum when searching earlier and that is why I'm posting this question+answer together.
The situation:
- you can't connect to your router with your mactelnet client
- your ROS has just been booted from the (factory) default settings (e.g. reset-button procedure)
- you have ROS, version >= 6.43
- this implies hashed/encrypted passwords (incompatible with the older mactelnet versions)
- you are connecting from:
- another ROS instance, version >= 6.43, using: /tool/mac-telnet, or
- your linux distro's mactelnet-client package, version >= 0.5.0, or
- you own mactelnet client compiled from source: GitHub - haakonnessjoen/MAC-Telnet: Open source MAC Telnet client and server for connecting to Mikrotik RouterOS routers and Posix devices using MAC addresses · GitHub
Some possible solutions:
- your ethernet cable is connected to the default "Internet"/WAN port
- move the cable to one of the other (LAN) ports to be able to talk to ROS's mactelnet-server
- running [code]mactelnet -l[/code] tells you that the router is, e.g. at 11:22:33:44:55:11
- the sticker on your router says E01(ether1) is at 11:22:33:44:55:0D
- and E05(ether5) is at 11:22:33:44:55:11
- this implies that the rest of them are: E02(ether2) :0E, E03(ether3) :0F, E04(ether4) :10
- take the MAC address for E01 and increment it by 1, e.g. 11:22:33:44:55:0E then mactelnet to that address instead of the MAC address of the port that your cable is plugged in to
- the reason for doing that is: by default the LAN ports (e.g. ether2 to ether5) are all bridged together and the MAC address for the bridge is set to the default MAC of ether2. i.e. even if your cable is plugged into ether3(:0F), you still need to mactelnet to "bridge"(ether2/:0E)
That worked for the example hardware: hEX and I suspect for many others as well. Please post your hardware type if it worked for you, or if you have other solutions to the problem.