Recent content by birgersp

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

  1. B

    My internet disconnects for a brief moment (about 10 sec) excactly at 8, 9, 10, 11 pm. What do I do?

    It could be that it's just the connection between my PC and the router that goes down (not actually my WAN connection). If it is only Wifi event, what could be the cause of it? A friend of mine mentioned that maybe it was like a DHCP refresh of IPs or something? I am planning to install a wire...
  2. B

    My internet disconnects for a brief moment (about 10 sec) excactly at 8, 9, 10, 11 pm. What do I do?

    Hey, I have a weird issue with my home network. At 8, 9, 10 and 11 pm my internet disconnects for a moment. About 10-20 seconds or something. Sometimes it happens so fast that my internet status on my windows PC is shown as "online" and with internet access but all internet-requiring services...
  3. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Okay. I am looking at some alternatives. Looks like I could be using my RPi as a WiFi-device monitor. The purpose is to detect (ASAP) when I come home, using my smartphone. Currently the detection is too slow (my phone takes about 10 seconds to connect to my home WiFi when in range).
  4. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Thanks! So it turns out that my phone connects to my WiFi network just a little too slow for this system to work as intended. Now I am wondering: is it possible for my router to detect that my phone is in WiFi range, even when the phone hasn't (yet) connected to my WiFi network?
  5. B

    Is it possible to detect any present WiFi devices (e.g an Android smartphone), even if those devices are not connected to my WiFi?

    Hi, I want to create an application that detects whenever my Android smartphone is within WiFi range. I want to be able to detect that the phone is present, even before the phone connects to the WiFi. Is this possible? I was hoping I could use my router for this (FWIW it's an Asus with Merlin...
  6. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Appreciate the feedback! And yes I agree, it would be better if the router didn't have to worry about conveying the information. It should just store it so other applications can read it. But, I want the "detection" of a new device to be fast, so the script that stores the information should be...
  7. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    And if anyone finds this, also wondering how to send UDP packets with Merlin: This might help https://unix.stackexchange.com/questions/671463/how-can-i-send-a-udp-packet-from-my-linux-asus-router/671470#671470
  8. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Perfect! So here's the end result that is running on my router now: #!/bin/sh echo "Starting wireless device observer" while sleep 2 do msg="" for iface in $(nvram get wl_ifnames) $(nvram get wl0_vifs) $(nvram get wl1_vifs) do msg="$msg $(wl -i $iface...
  9. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    So I got this to work. Not UDP but I guess it will be fine. #!/bin/sh msg="" for iface in $(nvram get wl_ifnames) $(nvram get wl0_vifs) $(nvram get wl1_vifs) do msg=$msg$(wl -i $iface assoclist | sed "s/assoclist/$iface/g") done echo "$msg" | nc -w0 10.0.0.11 42069
  10. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    MAC addresses would be sufficient. It can be TCP, but the reason I wanted UDP was that I feel it is less chance for the script to crash. In my head it sounds better that the router just sends this information regardless if someone will pick it up or not. The router shouldn't have to worry about...
  11. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    To answer your question: My server is expecting to receive a UDP packet with a small data amount. The server will parse the data and act accordingly (but this part I don't need help with). What I don't quite understand is how to send messages from my router to some host (preferably using UDP).
  12. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    My idea is to send the MAC address of each device that is connected. #!/bin/sh msg="" for iface in $(nvram get wl_ifnames) $(nvram get wl0_vifs) $(nvram get wl1_vifs) do msg=$msg$(wl -i $iface assoclist | sed "s/assoclist/$iface/g") done echo "$msg" # <--- send this data
  13. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Thanks! Now my next problem is; how can I send data from my router to my server? I was thinking just to send a single UDP packet, but the examples I find online doesn't really work. echo -n "hello world" | /dev/udp/serverip/15243 # /dev/udp/ doesnt exist # or echo -n "hello world" | nc -4u...
  14. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Awesome! For anyone interested I will also add this script to kill the wireless_monitor.sh script if needed: (EDIT: removed incorrect script)
  15. B

    Custom application/script: Iterate through WiFi devices, compare, send information to server

    Thanks! So I can add this script to `/jffs/scripts/services-start/somescript`? And will this not block?
Top