gilestrolab / ethoscope

a platform from monitoring animal behaviour in real time from a raspberry pi
http://lab.gilest.ro/ethoscope/
GNU General Public License v3.0
17 stars 25 forks source link

Trouble getting connected to UI #169

Closed roaldarbol closed 2 years ago

roaldarbol commented 2 years ago

Hi again - and sorry for being a bother!

I'm trying to follow the online documentation to get my Ethoscope set up, but I've got stuck at the node/network; here's some details about my current status:

As far as I can tell, I've followed the documentation quite closely, but I wonder if I'm missing something - are there further configuration steps I should've done? From the documentation it seems that the RPi 4B disk image should be quite plug-n-play. Again, from #143 I wonder if it's something as simple as not being able to connect to eduroam and then not being able to update - could that be the cause (and if so, it might be worth sneaking a warning message in somewhere)?

And again, I really appreciate the work you guys have put in here and that it's not easy to maintain/develop/customer-service open source software whilst also doing your research. I'm just really looking forward for it to work for me! ;-)

Cheers, Mikkel

IMG_1370

ggilestro commented 2 years ago

Is the node running on the PI4? You can check with the following command systemctl status ethoscope_node which should return something like this

● ethoscope_node.service - Ethoscope node server
     Loaded: loaded (/usr/lib/systemd/system/ethoscope_node.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2021-11-09 14:06:35 GMT; 24h ago
   Main PID: 2773626 (python)
      Tasks: 146 (limit: 19060)
     Memory: 6.1G
     CGroup: /system.slice/ethoscope_node.service
             └─2773626 /usr/bin/python /opt/ethoscope-node/node_src/scripts/server.py

If you plugged the ethernet cable after powering the PI, you may have to restart the node with the following: sudo systemctl restart ethoscope_node

roaldarbol commented 2 years ago

Did some troubleshooting with the always helpful André, and it turns out that eduroam is so restrictive that when it notices a broadcasting device (router), it kicks us off; that should be explaining the resulting 172.x.x.x IPs. So just not connecting the RPi to the internet, but only to the router does the trick and the WebUI now turns up! :-D As it means that the RPi is not connected to the internet, I'm wondering if there is a way to manually log in to a wireless network with login credentials from the RPi (maybe with wpa_supplicant.conf)? An alternative we talked about was to set up yet another Pi as a wireless router (e.g. with RaspAP).

roaldarbol commented 2 years ago

Is the node running on the PI4? You can check with the following command systemctl status ethoscope_node which should return something like this

● ethoscope_node.service - Ethoscope node server
     Loaded: loaded (/usr/lib/systemd/system/ethoscope_node.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2021-11-09 14:06:35 GMT; 24h ago
   Main PID: 2773626 (python)
      Tasks: 146 (limit: 19060)
     Memory: 6.1G
     CGroup: /system.slice/ethoscope_node.service
             └─2773626 /usr/bin/python /opt/ethoscope-node/node_src/scripts/server.py

If you plugged the ethernet cable after powering the PI, you may have to restart the node with the following: sudo systemctl restart ethoscope_node

And that was a good suggestion, it now does show up as running. I do get a WARNING:

node python[303]: WARNING:root:Cherrypy version is bigger than 9, we have to change to cheroot server

Not quite sure what to make of it.

ggilestro commented 2 years ago

You can ignore the warning about cherrypy. It is just a warning and it's normal. Can you now access the node UI from another computer on the network?

Regarding the network configuration: I do not understand what is the role of eduroam in all this. As far as your university is concerned, the node is just another computer connected to the network via ethernet cable. The router should not be exposed to the internet or to the university network: no uni will ever allow that.

roaldarbol commented 2 years ago

Okay, good to know. Yes, I can access the UI from my laptop so all good. 👍

I'm not 100% sure about what's going on. And you're definitely right - now I just tried plugging in the eduroam ethernet cable too and things continue to work (although I'm not getting internet connection, probably as I've not supplied any credentials). So now my setup is completely identical to yesterday, but works - so maybe something in the order of things was off. Maybe it's because the router was daisy-chained to eduroam through to router when being set up... anyways, it works now.

Re:

I do not understand what is the role of eduroam in all this. As far as your university is concerned, the node is just another computer connected to the network via ethernet cable.

We've had a ton of truoble getting our RPi's to reliably connect to eduroam, so they're not just another computer, though that should indeed be the case.

roaldarbol commented 2 years ago

Out of curiosity, how do you guys connect the Pi to the internet? Is just plugging in an ethernet cable enough?

ggilestro commented 2 years ago

We do not use the PI4 as a node. We have more than 100 ethoscopes regularly connected and working so we need a beefy computer to act as the node.

roaldarbol commented 2 years ago

Ah, fair enough - that makes a lot of sense! @qgeissmann I take it you might be doing/have done this? Any clues? :-)