RafaeleAndrade However, my patch isn't able to get the internet connection itself.
hmmm not sure what that means.
I think one problem you have is that you are setting your computer to the static IP address 192.168.7.2, but that is wrong for two reasons:
- if you were setting up the USB connection, and wanted to manually specify the address. you'd have to use 192.168.7.1 (as that is the address of your computer, while the board is at 192.168.7.2). However, this is not relevant here, in fact...
- when using the ethernet port, Bela expects that there will be a DHCP server at the other side of the network cable. In this case, the 192.168.7.x address is not relevant to the board (because it will only expect and address like that on the USB port). When connecting the ethernet to a home router, the router will assign an IP address to the board. Your computer, also connected to the router, will also get an address on the same subnet, and then the two can talk easily through the router.
RafaeleAndrade n = NetAddr.new("192.168.2.5", 9000 ); //the address of my computer.
Another error: that address is (I assume) the one that your computer has on the wifi network through the router. Now, if Bela doesn't go through the router, then it will not have access to the computer at that address (it's the converse of the problem above where you are trying to specify the IP address of the USB network, but you cannot access it from the ethernet network). In order to communicate from Bela to the computer you need to know the IP address of the computer on the network they are both on (the direct ethernet patch).
So, you could try to remove that IP address (revert the dropdown to "DHCP"). This way, both computers at the two ends of the ethernet cable (Bela and your laptop) will self-assign an IP address. I am not sure how this works, because I don't understand it entirely, but it's possible it will work. In this configuration, if you can access http://bela.local in the browser, you should be able to connect to the board. Then you need to figure out the IP address of the computer: go back to network preferences, it will say the computer has a self assigned IP address. Copy that address and put it in your Sc patch. See if it works.
It this doesn't work, then you should change the /etc/network/interfaces
file on the board to use a fixed IP address on the ethernet port, then you can do the same on the host computer and everything should work fine. The only issue is that if something goes wrong while editing that file, you may lose access to the board completely, so it needs a bit of care. Try the above solution first.