Giter Site home page Giter Site logo

Comments (19)

tootai avatar tootai commented on June 26, 2024 1

I modified my script like

#!/bin/sh
sudo launchctl unload /Library/LaunchDaemons/meshagent.plist
[ "$1" != "stop" ] && sudo launchctl load /Library/LaunchDaemons/meshagent.plist
exit 0

and in meshagent dir
ln -s /Applications/Utilities/myscript myscript

This way I'm more MacOS compatible. I close meshagent by going to Meshcentral Terminal tab => connect and run ./myscript stop

It's a pity that we can't wake up a MacOS client but that's life ;)

Thanks for your support

from meshagent.

si458 avatar si458 commented on June 26, 2024

i believe ive fixed this recently in version 1.1.22, what version are you running?
i used caffeinate to wake up the mac screen to the login screen

from meshagent.

tootai avatar tootai commented on June 26, 2024

1.1.22 as you

from meshagent.

si458 avatar si458 commented on June 26, 2024

sorry just realised you meant, you cant even connect to the mac, as the connect button is greyed out.
its oversally the mac is going to sleep and disconnecting the lan port (as such) so it cant connect to meshcentral
the wake feature in the actions, only sends wake on lan packets IF machines in the same group are in the same network as the machine you want to switch on

from meshagent.

si458 avatar si458 commented on June 26, 2024

do you have 'wake for network access' enabled?
i have macbook pro 2019 intel/macmini m1 both running sonoma here and they seem to stay connected with no issues,
also where are you seeing the logs?

from meshagent.

tootai avatar tootai commented on June 26, 2024

MBA is a customer one (also tried with a MBP M1), meshcentral server is Debian 12. They are NOT on the same network, MBA connected in Wireless mode. Wake for net access is enabled.

During sleep time, logs are those from above, each minute error [15] but error [14] when connected

from meshagent.

si458 avatar si458 commented on June 26, 2024

@tootai sorry i meant WHERE are those logs? (location/filepath)
you generally only see those logs if you are running meshagent in a console mode, rather than it running in the background?
how did you install meshagent?

from meshagent.

tootai avatar tootai commented on June 26, 2024

meshagent is normally installed and started on demand by the user using a script of mine in Applications/Utilities. The script is
#!/bin/bash
sudo pkill -9 meshagent
sudo /usr/local/mesh_services/meshagent/meshagent
sudo pkill -9 meshagent

and running in Terminal. User enter his password, all is good I have access, finally CTRL/C to exit

from meshagent.

tootai avatar tootai commented on June 26, 2024

forgot, logs are those from terminal

from meshagent.

si458 avatar si458 commented on June 26, 2024

@tootai ah yes this is why you are having issues.
because the app wont run when the laptop goes to sleep as the mac shuts down (in a sense).
as for why its staying connected but u cant connect, this is probably just a delay which happens even with windows computers.
meshcentral waits so long before it then says oh ove had no reply, this device is offline!
you could try installing the agent in the background using the mpkg or sudo /usr/local/mesh_services/meshagent/meshagent -install

from meshagent.

tootai avatar tootai commented on June 26, 2024

Yes but in this case agent will start as soon as computer is started and will keep running, that's not my goal, for other OSs too. I use meshcentral to replace Anydesk/Teamviers/aso I don't want to have customers always connected !

from meshagent.

si458 avatar si458 commented on June 26, 2024

i dont think the is much you can do sadly, as i dont thitnk you can keep the meshagent running/connected when the mac sleeps because its running as a user process and not as a service/root user, even tho you use sudo
im sorry about this

edit: also the wake which uses wake on lan, WONT work with devices on wifi as far as im aware, they need to be hard wired
edit 2: you could try changing sleep/power settings? - https://support.apple.com/en-gb/guide/mac-help/mh27905/mac

from meshagent.

tootai avatar tootai commented on June 26, 2024

Power settings are already setted to reactivated=always for network access. Will try if -install can be an option.

from meshagent.

tootai avatar tootai commented on June 26, 2024

I ran -install which uninstalled/reinstalled meshagent. I gave all needed authorizations to meshagent, it change nothing: after 2 minutes MBA screen goes blank and connection is broken.

Interesting is, while connection is broken, MBA has an IP change (here I connect it to another Wireless Network) when I wake it up, meshcentral still show it disconnected but with old parameters in details like IP address. This brings 2 questions:
. how to telle meshcentral to forget about this connection and do a reset (only wake up is possible)
. why meshagent doesn't note the network modifications and send new datas

from meshagent.

tootai avatar tootai commented on June 26, 2024

1st interrogation is useless, problem is 2nd one: if meshagent reconnect, Q1 will be solved.

from meshagent.

si458 avatar si458 commented on June 26, 2024

the Details tab only gets it information updated every 15 minutes, its not instant.
you can force update it by running sysinfo in the console tab

i have just noticed, that when my macbook pro goes to sleep, its also disconnecting from meshcentral (im running intel not arm), so i am mistaken!
however my macmini (arm) which is hardwired, never drops connection and always stays online,
im guessing this must just be a laptop thing, and i dont think the is anything we can do im afraid

from meshagent.

tootai avatar tootai commented on June 26, 2024

OK. Another one: I installed meshagent with -install but I can't see it in Applications nor Utilities. Where should I look for? My goal is to try to create a keyboard shortcut to start/stop the service, something like services in Windows. Don't know why but my script isn't allow -grey marked- when I tried to create a shortcut.

from meshagent.

si458 avatar si458 commented on June 26, 2024

you wont see an application, because when you install it, its runs in the background 24/7 as a service.
macos doesnt have services as such, it uses launchctl

one way to stop the service is sudo launchctl unload /Library/LaunchDaemons/meshagent.plist
and to start it again you run sudo launchctl load /Library/LaunchDaemons/meshagent.plist

from meshagent.

si458 avatar si458 commented on June 26, 2024

@tootai no worries!
In theory hardwired macs still work when they goto sleep, ots just wireless ones that don't, but I will have a look when I get chance as I have one of both to test hehe

from meshagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.