-
All replies
-
Helpful answers
-
Sep 10, 2016 2:43 PM in response to evrenertenby Drew Reece,Um, why?
You can probably send the relevant packets if you need to do so but you may be going about something the wrong way.
netcat may construct whatever packets you like do it assuming you can concoct the relevant arguments…
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPag es/man1/nc.1.html
Otherwise consider putting an interface down/up via networksetup, that should handle renewing a lease but I doubt you will force it to run every second - DHCP clients should wait for a reply & they generally wait a random period before giving eventually up, a second is not long enough to allow for other devices to talk on the wire.
Explain what your aim is or what you need to solve & you may get better help finding an appropriate solution.
-
Sep 10, 2016 2:59 PM in response to Drew Reeceby evrenerten,my conneciton is drop down(wi-fi symbol is normal) until i click "renew dhcp lease" button.
i want to type a command in terminan for this problem.
-
Sep 10, 2016 4:27 PM in response to evrenertenby Drew Reece,You'd be better off fixing why the wifi is dropping it's lease (if that is the problem).
Simply trying to reconnect every second (or every few seconds) won't make your networking work much better. Either you router is out of range/ faulty or incorrectly setup or your wifi card is faulty, incorrectly setup or being effected by software.
If you must use Terminal read the networksetup manual, it can put an interface down & up, causing it to redo it's initialisation.
Or use 'man networksetup' to view the commands for the installed version in Terminal.
I think it would be wiser to create a new topic explaining the symptoms of the wifi issue & all of your hardware/ software versions, others here will try to help you diagnose the fault if you are willing to ask a question without assuming you already have the answer.
-
Sep 12, 2016 3:11 AM in response to Drew Reeceby evrenerten,thnak u bot i want to repeat this code.
-
Sep 12, 2016 6:05 AM in response to evrenertenby Drew Reece,evrenerten wrote:
thnak u bot i want to repeat this code.
So put it in a script & trigger it via cron, launchd or even via an Applescript alarm in Calendars.
I'm not going to help you with any of those because you are choosing to fix the symptoms & not address the problem. As I already stated you need to ask for help fixing your connection, not try to work around it.
It may be that your hardware is broken, your software needs a reinstall or maybe you have misconfigured devices. This situation is not normal & your idea on how to fix it is very fragile.