1

I'm trying to connect a TCP/IP device over ethernet adapter via ethernet cable. The connection is being seen in Network Manager and I can get output of ping command at least and I can't access a built-in web page of device. I am getting error "Connection refused" for telnet command. But, this problems are not in another operating system non-linux. So, I think I should change iptables, firewall or proxy settings. What should I do to connect web page of device and device itself via its default open port that is 8003? Thanks for your help in the future.

Several outputs: (the *s is added by me.)

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    inet 169.254.227.2/16 brd 169.254.255.255 scope link noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 ****:****:****:****:****/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    inet 80.***.**.***/23 brd 80.***.**.255 scope global dynamic noprefixroute wlan0
       valid_lft 1626sec preferred_lft 1626sec
    inet6 ****:****:****:****:****/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


$ ping 169.254.227.2
PING 169.254.227.2 (169.254.227.2) 56(84) bytes of data.
64 bytes from 169.254.227.2: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from 169.254.227.2: icmp_seq=2 ttl=64 time=0.079 ms
64 bytes from 169.254.227.2: icmp_seq=3 ttl=64 time=0.083 ms
64 bytes from 169.254.227.2: icmp_seq=4 ttl=64 time=0.079 ms
64 bytes from 169.254.227.2: icmp_seq=5 ttl=64 time=0.095 ms
64 bytes from 169.254.227.2: icmp_seq=6 ttl=64 time=0.081 ms
^C
--- 169.254.227.2 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 103ms
rtt min/avg/max/mdev = 0.065/0.080/0.095/0.011 ms


$ telnet 169.254.227.2 8003
Trying 169.254.227.2...
telnet: Unable to connect to remote host: Connection refused

There are extra some informations. I can configure device's IP address by hand on its panel (default 169.254.227.2) and its MAC address is 00:19:F9:18:02:E2.

And to be able to device, I'm configuring ethernet connection on Network Manager that cover infos (this informations is included device's manual): - The Method: by hand - Adress: 169.254.227.2 - Net Mask: 255.255.0.0 - Gateway: 0.0.0.0 - DNS: 0.0.0.0 But the MAC address is ::::: that belonging to eth0 an I can't change this situation.

Actually, I tried to use DHCP but my trying it fails. Can you suggestion how I configure dhcpd.conf file and network connections. Finally, I attached the last outputs.

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    inet 169.254.227.2/16 brd 169.254.255.255 scope link noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 ****:****:****:****:****/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    inet 80.***.**.***/23 brd 80.***.**.255 scope global dynamic noprefixroute wlan0
       valid_lft 1277sec preferred_lft 1277sec
    inet6 ****:****:****:****:****/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever



$ less /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp



$ less /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
authoritative;
 
subnet 192.168.1.1  netmask 255.255.0.0 {
 range 192.168.1.100 192.168.1.200;
 option routers 192.168.1.254;
 option domain-name-servers 192.168.1.1, 192.168.1.2;
#option domain-name "mydomain.example";
}

host archmachine {
hardware ethernet 00:19:F9:18:02:E2;
fixed-address 192.168.1.20;
}
6
  • 1
    The IPv4 address "169.254.227.2" is not your power supply's IP address. It's the IP address assigned YOUR machine's ethernet card. Additionally, the 169.254 part means an "Automatic Private IP Address", which, unless you set it up intentionally or know what hat means and were expecting that, suggests you have a misconfigured network setup for that NIC (no DHCP server to give it an IP address, for example). Also, by "power supply", do you mean a backup power supply in case of power failure?
    – C. M.
    Jun 23, 2021 at 12:36
  • I am partially/temporarily blind and cannot view videos. Your description is sufficient to understand, however. Now, the device is accessed via ethernet (LAN), correct? I see in your other comments to LSemi that you can configure it, so I will give you a suggestion on that when I finish collecting needed information from you and answer... Using APIPA is generally a bad idea, as random "collisions" can, and do, happen. So more questions: Can the device obtain an IP address via DHCP, instead of manually supplying one?
    – C. M.
    Jun 24, 2021 at 8:05
  • 1
    Include that information by editing your question. And if you prefer not to use DHCP, state so, and why--but there are many reasons why you should use it, and you can configure most DHCP servers to always give certain MAC addresses a specific and known IP...
    – C. M.
    Jun 24, 2021 at 8:07
  • Yes, the device is accessed via ethernet. I can configure it with its panel. Actually, I tried use set up DHCP server for LAN but my trying it fails. And I edited the question. Jun 24, 2021 at 11:35
  • You are better off using an IP address on your regular home network (regardless of the issue of it being LAN, WLAN/WiFi, or hybrid), then you can plug it in to your router and access it from any device on your home network. You can learn about DHCP options by searching the web for "dhcp static reserved" for guides on configuring DHCP to always give it a specific and known IP. But the IP needs to be on the same network number (typically 10.0.0.* or 192.168.0.*; the zero before the .* is sometimes 1 or another number). If that does not help you figure out a solution, let me know...
    – C. M.
    Jun 24, 2021 at 12:42

1 Answer 1

2

You are using a Linux terminal and its address is "169.254.227.2". Your power supply cannot have the same address. On the Linux terminal, whatever it is at port 8003 is not running, so it's normal not to be able to telnet to that port.

Explanation 1

Perhaps, since 169.254 is in the APIPA range, you have a DHCP problem on that network. When you boot in Linux you get that address, but when you boot in Windows the address is different and 169.254.227.2 is assigned to the power supply, and that is why you can access it from Windows. Probably, those addresses keep on changing.

Solution: straighten out the network configuration of the network, if at all possible keeping away from the APIPA range and using 192.168.0.0/16 instead, maybe even statically assigned.

Explanation 2

The IP address you're using is the same of the host machine on purpose. This means that there should be a daemon listening on port 8003, which in Windows there is, but in Linux there is not. This, again, is normal if you didn't install the necessary software.

Solution: install whatever daemon it is that should be listening on port 8003, assuming such software exists for your Linux distribution. I'd fix the network configuration anyway, even if it doesn't matter in this case, because having devices in APIPA range means asking for trouble, and in my experience trouble is always eager to comply.

update

I'm afraid I've not fully understood the software angle of this thing. But, if you can boot in Windows and, without installing anything on Windows, connect with a browser to WHATEVERPOWERSUPPLYADDRESS:8003, then you can do this in Linux.

If the above holds (if you need to install something on Windows, then you're out of luck - you need a compatible Linux software, and need to ask it to the hardware manufacturer), then this is how I'd do it:

  • reprogram the router to supply a fixed network configuration like 192.168.1.0/24, with the router at 192.168.1.1.
  • in both Windows and Linux, set the network address of the laptop/computer to 192.168.1.2.
  • verify it is working, with the power supply disconnected from the network. You must be able to navigate on the Internet normally.
  • program the power supply to the IP address 192.168.1.3 .
  • now, you should be able to connect a browser to the supply in both operating systems.
  • you can add a DHCP range of 192.168.1.10-192.168.1.254 to the router to handle further devices that do not need a static IP address.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .