Onefinity with windows xp/vista/7/8

Got it, sorry I missed it. Then you’ll need to statically assign both devices… sounds like you’re already on the right track :+1:

Hey Giancarlo,

that’s what I did with my Onefinity Controller here.

As root on the Onefinity Controller, you create a new file called “eth0” in the directory /etc/network/interfaces.d with a content like this:

allow-hotplug eth0
iface eth0 inet static
        address 192.168.bla.bla
        netmask 255.255.255.0
        network 192.168.bla.0
        #broadcast 192.168.bla.255
        ## == bla blu is our DSL gateway: ==
        gateway 192.168.bla.blu

        ## == DNS servers from your dsl provider: ==
        dns-nameservers bla.bla.bla.bla1 bla.bla.bla.bla2

        ## == Or maybe we have local name servers: ==
        #dns-nameservers 192.168.bla.blob 192.168.bla.blip

(replace bla and blub by meaningful numbers :slight_smile: )

If you add the static IP address configuration, the user interface will then report two IP addresses:

Onefinity_Controller_two_IP_addresses

The good thing is that if you then connect the Onefinity controller to a computer with an unconfigured network, zeroconf will still work (it’s the avahi package that provides this)

1 Like

Hi
Can I do that myself, give a fixed address to onefinity?

Hey Fred11,

sure. But in that case you have to set a static address on the other computer (your windows pc) too. The addresses you can use for a private network are explained here.

For example if you choose to use a network from the 192.168.0.0/16 address range, you can say, Onefinity Controller shall be 192.168.1.1 and the Windows pc shall be 192.168.1.2, and set them to these addresses respectively (as static addresses). Netmask is 255.255.255.0 then.

On the Onefinity Controller under Raspbian Linux, see my example above. The lines with the parameters network, gateway and dns-nameservers can be omitted. Under Windows, you got to click on the specific Network hardware device and edit its IPv4 parameters. Choose manual configuration, and insert the address and netmask values manually, or you can choose automatic configuration and there appears a second tab with “Alternative configuration”, there you can then enter the static values manually the same way. If you use it the latter way, it will use the static configuration only if after a timeout it has received no address via DHCP.

The question is whether you want the Onefinity Controller to be integrated into a possibly already exisiting LAN that you run at your home, or if you remain with an ethernet connection only between your notebook and the Onefinity. In the latter case, you may choose freely a network and addresses from the private address range, in the first case you got to integrate the Onefinity Controller into that network. This depends on its address range and whether there exists a DHCP server.

1 Like

It is undoubtedly simpler is faster than the virtual machine.
No the pc is only for the onefinity.

On the computer I know the procedure to do that.
On the other hand not on the onefinity, can you explain to me the complete procedure please.

Once it’s done I should see the ip address appear on the onefinity home screen, right?

Hey Fred11,

as root@onefinity, you do:

cd /etc/network/interfaces.d
nano eth0

(nano is a text editor that is installed on the Onefinity Controller)

There you enter:

auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0

Then you save the file (<Ctrl-o>) and exit the editor (<Ctrl-x>).

For more information, the corresponding manual page can be shown with:

man interfaces

Then to activate the new static configuration, you do:

ifdown eth0 && ifup eth0

and finally

exit

If you connected the Onefinity Controller and the Windows pc that you configured to a static address in the 192.168.1.* address range with a CAT5 or higher cable, you should now be able to type ‘192.168.1.1’ into the address bar of your windows pc’s web browser and access the Onefinity Controller User Interface.

Yes, but no need to watch it appear there anymore. The address you assign this way is static, which means, it is known and will never change.

PS: If you want to address the Onefinity Controller with a host name, you can edit the /etc/hosts file on your Windows pc. Under windows, it is located at C:\Windows\System32\drivers\etc\hosts . An entry looks like this:

192.168.1.1     onefinity     # comment

I succeed.
I turned on the onefinity wifi, put in access point mode.
It gave an ip on the main page, I put it in the browser: ok.
I cut the pc’s wifi, turned everything off, turned it back on, entered the ip address and it worked.

Hey Fred11,

If I understand correctly, you are doing this so that the Onefinity Controller displays an IP address on a monitor which is connected directly to the Onefinity Controller, and then you use this address to put it into the address bar of your browser on your windows pc.

However, if you configure the Onefinity with a static IP address, as Giancarlo @Tuvix72 mentioned and I showed above, you don’t need any monitor on the Onefinity Controller anymore. Then you don’t need to look up what’s its IP address is. With the example as shown above, the Onefinity Controller has a static IP address (192.168.1.1 in the example) that is known and never changes. Together with the /etc/hosts entry, you can then simply enter “http://onefinity” in your browser (and you can make a bookmark then if you like).

I unplugged the screen from the controller and tried again only with the pc keeping the same ip address, it works.
Maybe having defined the controller as host gives a static ip.

I’ll try the /etc/hosts entry again

Hey Fred11,

this may practically work because a computer (and thus the Onefinity Controller) will not change its link-local address once it has automatically chosen one, except if it is already in use by another host on bootup (or until the next time Onefinity tells you to flash the entire system :frowning:). But by principle, this is not really a static address, since you have no guarantee that this IP address will stay.

This would only be the case if you use the static configuration example above or, if you have a DHCP server in your LAN, you configure the DHCP server in a way that it assigns a static address.

But I still find it surprising that connecting the Onefinity Controller to a Windows machine with the aim of automatically setting up a zeroconf configuration does neither allow to discover the address of the Onefinity Controller nor does it work by Name Service Discovery by addressing it with “onefinity.local”. Does this really only work on Linux and Macs?

When a computer wishes to give itself an IPv4 link-local address, it selects one based on a pseudo-random number generator from the link-local address range 169.254.1.0 to 169.254.254.255 . But before the computer can really use the address, it has to make sure that this address is not already in use by another computer because using an address already in use would be disruptive for the other computer. Therefore, before using a link-local address, according to RFC 3927, a computer sends ARP probes in which it claims the chosen address.

These ARP probes are broadcast by the Onefinity Controller and received by neighbor computers, which is why usually you can find out the IP address of the Onefinity Controller by simply typing “arp -a” on your neighbor computer (note that the addressing with “onefinity.local” works too)

So on my (linux) desktop computers, before I connect the Onefinity Controller, it it shows:

root:~# arp -a
# [...some other known hosts in the ARP table...]

and after connecting the Onefinity Controller:

root:~# arp -a
# [...some other known hosts in the ARP table...]
onefinity.local (169.254.234.237) at ■■:■■:■■:■■:■■:■■ [ether] on enx■■■■■■■■■■■■

So it works like Onefinity describes it in

at least on the (linux) computers I use.

There seems to be a tool like “arp” on Windows too, but when I connect the Onefinity Controller to a Windows notebook and do “arp -a” on it, it just tells the local interfaces, but it seems it did not register the ARP probes sent by the Onefinity Controller, or at least it does not show them on the ARP table. Does some windows user know why?

As I mentioned before, I extremely rarely use Windows computers and don’t know why neither Name Service Discovery nor “arp -a” do work on Windows for discovering the Onefinity Controller.

EDIT: And if you look at the first and the 13th post of this thread, it seems it worked on windows xp! Why was it not reproducible on the higher windows versions computers Fred11 and I tried?

I tried that but it doesn’t work.
Maybe I entered something wrong.
I tried with spaces or not, no results.
Maybe the line break
I have to do it again, I don’t remember what the program is telling me.

Hey Fred11,

I have a static configuration working here (with slightly other IP address). At which moment was there a problem?

Of course, as always with computers, any typo can cause a failure. Don’t forget the newline at the end of the file.

The whitespace indentation is not relevant, it’s only for clarity.

The activation of the new configuration goes with ifdown eth0 && ifup eth0, however this only works if eth0 is already up. You can check this with ifconfig, which shows the interfaces, eth0 should first be there with a 169.254.*.* address (link-local), and after activation of the static configuration, it should be there with the 192.168.1.1. address. If eth0 is not there before with ifconfig, it is ifup eth0 that starts the new configuration.

The windows pc on the other side of the cable should be set to manual configuration with 192.168.1.2 as address with netmask 255.255.255.0, and in the web browser of the windows pc, you would finally enter 192.168.1.1 to reach the Onefinity Controller. You would also be able to ping 192.168.1.1 from the windows pc.

1 Like

Hey Fred11,

I just tested it with a windows notebook and the Onefinity Controller with the exact configuration as shown in the example above and it works:

On the Onefinity Controller, first it’s a link-local address (169.254.234.237 here):

root@onefinity:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.234.237  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 ■■■■::■■■■:■■■■:■■■■:■■■■  prefixlen 64  scopeid 0x20<link>
        ether ■■:■■:■■:■■:■■:■■  txqueuelen 1000  (Ethernet)
        RX packets 7666  bytes 496693 (485.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7796  bytes 5958913 (5.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Then I install the new static configuration as /etc/network/interfaces.d/eth0 :

root@onefinity:~# cd /etc/network/interfaces.d

root@onefinity:/etc/network/interfaces.d# cat eth0
auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0

Then I activate it:

root@onefinity:/etc/network/interfaces.d# ifdown eth0 && ifup eth0

root@onefinity:/etc/network/interfaces.d# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.1  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 ■■■■::■■■■:■■■■:■■■■:■■■■  prefixlen 64  scopeid 0x20<link>
        ether ■■:■■:■■:■■:■■:■■  txqueuelen 1000  (Ethernet)
        RX packets 7840  bytes 509480 (497.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7959  bytes 5980148 (5.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

As you see, now eth0 has the address 192.168.1.1 from the private network range

On the windows notebook, the Ethernet Connection is configured statically too, with 192.168.1.2 as address (netmask 255.255.255.0).

Next thing I can do, after having attached the Onefinity Controller to the windows notebook with a CAT5 or higher cable, is to open the web browser on the windows notebook and to enter:

http://192.168.1.1

Take care to use http:// and NOT to use https:// because there is no secure web server installed on the Onefinity Controller.

Now I see the nice Onefinity Controller User Interface which asks me if I want to home the machine.

Final step would be to edit C:\Windows\System32\drivers\etc\hosts and to add an entry like this:

192.168.1.1     onefinity     # comment

This would allow to enter http://onefinity in the web browser on the windows pc.

But I would really like to know why the “onefinity.local” addressing when using a zeroconf connection did work with your windows xp computer but did not work with the windows 7 or later computers.

1 Like

Hey Fred11, hey all,

Why does addressing the Onefinity Controller with the name ‘onefinity.local’ work with Linux and Apple computers, but not with many Windows computers?

Many of you read in Onefinity’s help document FAQ: How to directly connect your Onefinity CNC to a computer/laptop (no screen present) that you could simply connect the Onefinity Controller to a computer, notebook or tablet and address the Onefinity Controller by typing ‘http://onefinity.local’ into the address bar of your web browser. However, it has been frequently reported that this doesn’t work on some computers / operating systems, while addressing with the IP address still works.

As far as a little overview of the matter Name Service Discovery in conjunction with zeroconf shows me, Microsoft Windows Version<10 allows addressing with a hostname (like ‘onefinity.local’) through the LLMNR service (RFC 4795), while Apple and Linux use the mDNS service (RFC 6762) to implement this capability. While mDNS has been approved as a standard by the IETF, Microsoft’s LLMNR has not. That’s probably why Microsoft finally in 2022 planned to switch from LLMNR and NetBIOS to mDNS, but that obviously doesn’t apply to all the legacy windows machines.

The issue with the Onefinity Controller here is that zeroconf (automatic creation of a ‘link-local’ IP address and Name Service Discovery to resolve addressing with the name ‘onefinity.local’) is offered on the Onefinity controller with the Linux common implementation “Avahi” that uses mDNS. Linux and Apple computers support the Name Service Discovery via mDNS and resolve the name “onefinity.local” correctly, while the LLMNR service used on Windows <10 is not supported by Avahi, which is why addressing with the name “onefinity.local” is not supported, and only addressing with the IP address remains.

Furthermore, a second practical problem here is that when connecting the Onefinity Controller to a Windows <10 machine, it will not report its IP address unless you have a display on the Onefinity controller which shows you the IP address, or you do a portscan (nmap) which can take a while. So even if the solution remains to address the Onefinity Controller with its IP address, the latter remains unknown to the user if they want to connect remotely exclusively.

But there is a solution.

The package that allows Name Service Discovery via mDNS on Apple computers is called Bonjour. This is the implementation which uses mDNS just like Avahi on Linux. The good thing is, Apple Bonjour can also be installed on Windows ← click here to download. By the way, @Matticustard already suggested this the other day.

I just installed it on the windoze computer and tested it, it works:

On the windows computer, the network connection is set to requesting IP address automatically.


PS: With the link above, you can download Bonjour for Windows 2.0.2. However there is a newer version 3.0, of which it is said:

Microsoft Windows:

Windows doesn’t have Zeroconf support out of the box, but a few popular applications slip it in for their own needs, including Skype, Apple’s iTunes and Adobe Photoshop CS3 or later. So you might not need to add anything at all!

Otherwise, it’s most easily installed using Bonjour Print Services for Windows 2.0.2.

The newest-and-shiniest version 3.0 is only available in the iTunes installer. So one option is to simply install iTunes, even if you don’t plan to use it.

Some users are understandably reluctant to install unneeded software. In that case, Bonjour 3 can still be installed with a little trick: download the iTunes installer but don’t run it. Using an archive utility like 7-Zip or WinRAR, you’ll discover there’s a separate Bonjour installer inside. Just extract and run that one piece, and you’re done!

Once installed, Zeroconf systems on the local network can then be accessed by name instead of numbers…in a web browser, for example, one might reach a Raspberry Pi hosting OctoPrint at http://octopi.local

– Source: Bonjour (Zeroconf) Networking for Windows and Linux – Adafruit Learning Services

2 Likes

Hi
Sorry for the delay in response, the motherboard of my pc fried, I had to have it repaired.

So far my solution seems to work.

I keep your manipulations under the elbow if it crashes but all that goes far beyond my computer capacities.

Hey Fred11,

installing Bonjour on Windows is absolutely easy, and addressing with “onefinity.local” works immediately then. No network configuration necessary.

2 Likes