Onefinity with windows xp/vista/7/8

Hey Fred11,

no cause, the invoice should be send with VAT shown? :slight_smile:

There you have the IP address: 169.254.76.123. Type that into the web browser on the windows pc (or ping 169.254.76.123 on cmd.exe).

Problem remains that you need the monitor on the Onefinity Controller to get to know this address (as long as Name Service Discovery for addressing with “onefinity.local” does not work on the windows pc)

These are self-assigned IP addresses that occur when the device fails to receive an IP from the network (DHCP). Are the devices connected to an active network or directly connected to eachother with a network cable?

1 Like

Hey Giancarlo,

Precisely.

Directly to each other (answered above)

1 Like

I have two questions:

  • between the two controller, onefinty and buildbotics controllers is it only the screen that has disappeared? I have one at home
  • if I install a linux virtual machine could it work?

Hey Fred11,

The Buildbotics application…

Regarding the small LCD, if you locate it on the Buildbotics circuit diagram, it looks like it is a serial device that is attached to SDA and SCL (i2c bus) of the Raspberry Pi 40-pin header. But you would need the firmware to support it. Onefinity skipped this small LCD.

Top view of Buildbotics AVR Mainboard

On this i2c bus, there are also the main AVR and the TinyAVR (on the Onefinity controller as well).

Install what exactly where?

Never mind.

If I install a linux virtual machine on my windows 8 and I use linux to access my controller.
It’s an idea like that.

Hey Fred11,

sure, why not. Virtual machines are a fine thing.

By the way a good method to get used to a linux desktop system, to get familiar with one

You could install virtualbox and then

1 Like

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