seemebreakthis

joined 1 year ago
MODERATOR OF
 

As it is now, after I say "OK Google, take me to (destination)", it will show the route to destination and shows an icon for you to press before navigation actually begins.

Is there a way to skip that icon pressing step?

 

(Edit: If you have read this post before, please ignore what I posted before and re-read my updated content below, as there has been a number of drastic changes due to an inaccurate testing methodology in my previous attempt at configuring DAWN !)

For those who have not heard of DAWN, it allows Openwrt to steer clients to the AP with the strongest signal.

I spent a week experimenting with it to make it function the way I want it to (with several days' worth of effort wasted due to an app I used call "WiFi Analyzer" for my android phone. This app turns out to have the capability to make my phone make Wifi roaming decisions on its own, when I thought DAWN was the steering source). So these tips are what made it work for my environment. Please be reminded that every network setup is unique, and what works for me may require some additional tweaking for you.

It is very important to get up to speed with the basics by going through this website first and foremost: https://github.com/berlin-open-wireless-lab/DAWN

Use the site to do the initial installation and configuration.

As for the tips:

None of the faq's and wikis state this explicitly I believe: DAWN needs to be setup on EACH of your Openwrt bridge / gateway routers that's part of your connected / mesh Wifi. Each DAWN instance fires BSS transition instructions to clients that are currently connected to that particular router. So routers with no DAWN running on it will never be able to tell the clients it is time to move to another AP.

Also I had problem getting umdns (a DAWN dependency) to start working properly at router startup, so I had to write a startup script to give umdns some encouragement each time the router is powered on. If you run into the same issue, let me know and I can share my script. The symptom of DAWN not working due to this issue is the inability to show neighbor APs in DAWN's "View Network Overview".

Once you get DAWN up and running, it is all about tweaking the config file (and remember to update the file on each of your Openwrt router with DAWN running) to:

  1. make each wireless client send proper beacon reports to show DAWN the signal strength of each AP that each client sees at any give time, and
  2. make DAWN send out BSS transition requests in a nimble manner (otherwise wifi is disconnected before any roaming can even take place)

Note that for both points 1 and 2 above, I treated DAWN as a black box and just did a lot of trial and error experiments to make it work eventually. So some of the tweaks may look crazy, but it worked for me after making these changes.

1 - Making clients send beacon report that covers EVERY single AP they see (probably more power demanding resulting in more battery drain (?), but necessary for DAWN to have the information it needs to send out instructions accurately:

Under "config metric 'global'", update the values to the following:

    option min_probe_count '0'
    option bandwidth_threshold '0'
    option use_station_count '0'
    option max_station_diff '1'
    option eval_probe_req '0'
    option eval_auth_req '0'
    option eval_assoc_req '0'
    option kicking '1'
    option kicking_threshold '40'
    option deny_auth_reason '1'
    option deny_assoc_reason '17'
    option min_number_to_kick '2'
    option chan_util_avg_period '3'
    option set_hostapd_nr '1'
    option duration '200'
    option rrm_mode 'apt'

These values have the following effect:

  • DAWN includes a feature to attempt steering "Legacy clients" that don't support 802.11v as documented in its github page. It DOESN'T work well. My testings show it very often severs the wifi connection of these 'legacy clients' before the client can make a new connection. And it also confuses clients that properly support 802.11v. My update disables this feature altogether.
  • DAWN includes a alternative "kicking method" that considers the absolute RSSI (see "Kicking Method 2: Absolute RSSI" in DAWN's github website). It DOESN'T work well and serves to confuse everything. My update disables this feature altogether.
  • DAWN's decision making process is sped up with changes made in min_number_to_kick. I tried decreasing chan_util_avg_period also but the kicking got too jittery.
  • By changing rrm_mode and duration, WiFi clients will now send "active" beacon reports which means they will actively seek out APs they can connect to and gather info on each AP's signal strength to provide to DAWN. The duration parameter gives these clients enough time to gather the info it needs to generate beacon reports.

2 - Making DAWN work the way you want it to

This part is more like an art where your 'personal taste' comes into play. Here is my own underlying principle (yours may differ):

  • I have several radios in both 2.4GHz and 5GHz. The stronger the signal, the more a 5GHz AP takes precedence even if there is a neighboring 2.4GHz AP with as strong a (or even stronger) signal.

  • If all of the 5GHz APs are weak (say -70dBm or less), I will then prefer 2.4GHz that are more stable even at the same dBm level.

With this in mind, I only ended up utilizing the rssi_weight and disabled other calculation methods to determine each AP's final score. Here are the settings:

config metric '802_11g'
    option initial_score '200'
    option ht_support '0'
    option vht_support '0'
    option no_ht_support '0'
    option no_vht_support '0'
    option rssi '0'
    option rssi_val '-10'
    option low_rssi_val '-50'
    option low_rssi '0'
    option chan_util '0'
    option chan_util_val '140'
    option max_chan_util '0'
    option max_chan_util_val '170'
    option rssi_weight '4'
    option rssi_center '-25'

config metric '802_11a'
    option initial_score '80'
    option ht_support '0'
    option vht_support '0'
    option no_ht_support '0'
    option no_vht_support '0'
    option rssi '0'
    option rssi_val '-10'
    option low_rssi_val '-65'
    option low_rssi '0'
    option chan_util '0'
    option chan_util_val '140'
    option max_chan_util '0'
    option max_chan_util_val '170'
    option rssi_weight '8'
    option rssi_center '-65'

One caveat - be very cautious if you decide to use rssi_val or low_rssi_val (my above suggestion disables them). If used, the final scores can become super jerky especially when an APs signal strength borders on the threshold. This can easily cause insane jumping back and forth between different APs, and you end up confusing your network client and DAWN.

That's pretty much it ! DAWN works beautifully but only when your settings are right.

 

No docs yet on wiki - https://openwrt.org/docs/guide-user/base-system/basic-networking#switch_configuration_dsabridge-vlan - just says 'TO DO'.

But all you need to do in LuCi is go to Network -> Interfaces -> Devices -> Configure br-lan -> Bridge VLAN filtering -> Enable VLAN filtering -> define your VLANs -> then for 'bat0', tag the VLANs that you want the data of which to flow through your mesh.

Simple as that. Of course you also need to define your network interfaces (one per VLAN), and remember to attach br-lan.1, br-lan.2, etc (where 1, 2.... are actually your VLAN IDs) to each of your network interfaces.

[–] seemebreakthis@lemm.ee 0 points 1 year ago (1 children)

Yes ! I had to quickly change the record in the backend database and ask gpt for modifying the code...

 

Summary: It has actually been a few months since my site came into existence. But being a newcomer to Lemmy I thought I'd post my experience once again here.


I had close to zero experience in web site development. I had never written a line of code in PHP nor used a PostgreSQL database, let alone creating and managing one.

However, I thought this lack of experience made me a good candidate to test just how powerful ChatGPT is. After two weeks of on-and-off construction, I finally completed a completely functional website that serves as an "online guest book" and is open for everyone to try out. A feat that I probably could never have achieved without any help.

Here are some of the amazing highlights of how ChatGPT helped:

  • Debugging - I took the approach of using a website design software and incorporating snippets provided by ChatGPT. Very often, that would lead to unknown errors, and I just found myself copying and pasting the entire file and giving one single word of instruction to ChatGPT - debug. Time and again, it managed to pinpoint the errors after a few back and forths.

  • Geolocation and other features - I just told ChatGPT what I wanted to do, and it pointed me in the right direction very quickly. In the case of geolocation, it led me to the right library to use that I had no idea about (geoip geolite2), walked me through the procedure to install it on my NAS, and got it up and running within something like one hour. I am absolutely certain it would have taken me days if not weeks to get it going given my programming background or lack thereof.

  • Backend admin site (that only I get to use so no fancy formatting required) - I did not even have to write a single line of code for it. I just told ChatGPT what I wanted the backend admin site to do, and it churned out 4 files for me just like that (with the usual problem of stopping midway through then having to encourage it to continue). I told ChatGPT what errors I encountered with the files, and it kept revising the code until it started running smoothly after a few tries. Two hours later, the backend admin site was done.

Anyway, give this site a try and see what you think: https://www.stringtone.com. The concept is simple, and all of the intelligence and many of the security measures came directly from ChatGPT.

It has been a fun project, but yes, I still have no clue how I can construct something similar without getting ChatGPT's help.

1
submitted 1 year ago* (last edited 1 year ago) by seemebreakthis@lemm.ee to c/androidauto@lemm.ee
 

This is actually a pretty good way to kill time while your car is parked and you are waiting for someone...

The animation is normally super smooth, but since I was using the same phone to run AA and take the video, that caused a bit of stuttering for the games.

Is there any 3rd party AA game other than this stock GameSnacks app?

 

There are a plethora of ways if you search around, some obsolete, some still work, some require root, some don't.

For me (as someone who has just started using AA), I have been using Fermata Auto downloaded from github, installed as an LSposed module to bypass AA checks, and it works well playing videos including those from

  • Youtube
  • Jellyfin server that I am self-hosting
  • Local video files

I'd like to be able to cast KODI to my head unit screen. Is AAAD a possible way to do this? Or do I need a screen mirroring method?

 

As titled. I receive these reports from other servers like Google / Yahoo / Outlook.com, but I want to 'play nice' in the world of email exchange and do my part in generating these reports for other e-mail servers as necessary.

I doubt Synology Mail Server generates these reports by default. So is there any way to set up DMARC RUA/RUF report generation?

 

I host my own e-mail server, and for a long time I have been pulling my hair out on why the receiving end will still accept e-mails sent from my domain without any DKIM signature.

I have made sure that DKIM has been setup properly in my server, which means if an outgoing e-mail either fails the DKIM test, or doesn't contain any DKIM signature, then the e-mail must be fake. But currently while the receiving end knows to reject if DKIM=fail, it lets the e-mail pass if there is no DKIM signature.

Problem: I found as long as someone impersonates my e-mail account then send an e-mail that will pass the SPF test and doesn't contain any DKIM signature (real or fake), then it will still be considered legitimate by the recipient email server. This is even more problematic in my case as I have to rely on an e-mail relay provided by my ISP to send e-mails out (my ISP specifically blocks any outgoing port 25 connections, apparently to fight spam). This unfortunately means any other customers of the same ISP can potentially send e-mails on my behalf as long as they leave any DKIM signature out on purpose.

Solution: I just discovered the way DMARC works is by passing e-mail that passes EITHER SPF or DKIM check. The keyword is 'OR', and 'EITHER'. So to make sure the receiving end checks only for DKIM validity, turns out all I had to do was to make sure SPF never passes or fails. In other words, SPF always returning neutral would mean DKIM would now become the only factor. Since either one of the two must show 'pass', and now SPF will always return as 'neutral', then DKIM must pass in order for DMARC to pass. i.e. DKIM can no longer be 'neutral' (aka no signature) let alone fail.

The way to set SPF to always return neutral is to set the TXT record to be: v=spf1 ?all

Now as long as your DMARC is set properly, unauthorized e-mails as determined by the DKIM outcome of either "fail" or "none" (aka neutral, or no signature) will always be rejected. Simple as that. Problem solved.

Source: https://serverfault.com/questions/1014250/can-i-set-dmarc-to-tell-receiver-to-fail-if-no-dkim-signature-provided-in-email/1041210#1041210

 

Today marks the first anniversary of owning this car !

Pic 1

Pic 2

 

I have only used Plex very briefly before I moved to try Emby then Jellyfin. Granted I am not a heavy user of a media server - basically no one else in my household uses it, and I don’t have a lot of content, but I do use sonarr / radarr with it.

The moment Plex put me off was when I realized a Plex Pass was needed to add transcoding capability. What are some of the reasons people like Plex better than Jellyfin, other than those who have been using Plex forever and are just too lazy to explore other options?

[–] seemebreakthis@lemm.ee 0 points 1 year ago (1 children)

My script writing skills are pretty bad. So while this has worked for me, if you are up for it feel free to modify it any way you want.

First save this script somewhere in your home folder (or any folder of your choice). Name it vpn_watchdog.sh:

#!/bin/sh

LOGFILE="/volume1/homes/xxxxx/VPN_watchdog.log"
CURRENT_IP=`timeout -k 1 -s 0 5 curl icanhazip.com`
WATCHTIME=30
ALTERNATE_VPN=1

vpn_restart () {

        LAST=`ifconfig | grep "tun0"`

        while [ ! -z "$LAST" ]; do

                echo $(date)" - tun0 exists, killing vpn client..." >> $LOGFILE
                synovpnc kill_client
                sleep 5
                LAST=`ifconfig | grep "tun0"`

        done

        if [[ $ALTERNATE_VPN -eq 1 ]];then

#       2022-07-02 confined to one VPN only for now

#               ALTERNATE_VPN=2
                ALTERNATE_VPN=1

                cat >/usr/syno/etc/synovpnclient/vpnc_connecting <<END
conf_id=o1663422808
conf_name=Surfshark_HK
proto=openvpn
END


                echo $(date)" - Establishing VPN connection..." >> $LOGFILE

                synovpnc connect --id=o1663422808

        elif [[ $ALTERNATE_VPN -eq 2 ]];then

#       2022-07-02 confined to one VPN only for now

#               ALTERNATE_VPN=1

                cat >/usr/syno/etc/synovpnclient/vpnc_connecting <<END
conf_id=o1642598846
conf_name=Surfshark_TW
proto=openvpn
END

                echo $(date)" - Establishing alternate VPN connection..." >> $LOGFILE

                synovpnc connect --id=o1642598846

        fi

        sleep 20

        CONNECTION_TEST=`cat /usr/syno/etc/synovpnclient/vpnc_last_connect | grep server_ip0 | awk -F= 'NF==2 {print $2}'`
        CURRENT_IP=`timeout -k 1 -s 0 5 curl icanhazip.com`
        echo $(date)" - Completed command to start VPN.  IP used for connection test = "$CONNECTION_TEST", current IP = "$CURRENT_IP >> $LOGFILE

}

case $1 in

        start)

                echo $(date)" - Started, IP used for connection test = "$CONNECTION_TEST", current IP = "$CURRENT_IP >> $LOGFILE

                while true; do

                        sleep 30

                        LAST=`ping -I tun0 -c 5 -W 2 -q "$CONNECTION_TEST"`
                        OUTCOME=$?
                        LAST=`echo $LAST | grep "0 received"`

                        if [[ ! -z "$LAST" || $OUTCOME -eq 2 ]];then

                                echo $(date)" - Ping to "$CONNECTION_TEST" via TUN0 failed" >> $LOGFILE
                                vpn_restart

                        fi

                        LAST=`ping -c 5 -W 2 -q "$CONNECTION_TEST"`
                        OUTCOME=$?
                        LAST=`echo $LAST | grep "0 received"`

                        if [[ ! -z "$LAST" || $OUTCOME -eq 2 ]];then

                                echo $(date)" - Ping to "$CONNECTION_TEST" via general connection failed" >> $LOGFILE
                                vpn_restart

                        fi

                        LAST=`ifconfig | grep "tun0"`

                        if [ -z "$LAST" ];then

                                echo $(date)" - TUN0 down" >> $LOGFILE
                                vpn_restart

                        fi

                done
                ;;

        stop)

                echo $(date)" - Shutting down" >> $LOGFILE
                pkill -9 -f vpn_watchdog
                ;;

esac

You will then need to change something in the script:

  1. LOGFILE -> change the 'xxxxx' to your home folder
  2. o1663422808 and Surfshark_HK -> change according to the following instructions (info sourced from https://blog.benoitblanchon.fr/synology-auto-connect-vpn-at-startup/ ):

Quoting the relevant info from this site: The DSM comes with a command line tool to manage the VPN connection. As you’ll see the ergonomy is debatable, but it allows to initiate the connection from the shell. This tool is synovpnc, but before we can use it, we need the following file: /usr/syno/etc/synovpnclient/vpnc_connecting This is a temporary file that lives only a few seconds after you click “Connect” in the VPN configuration GUI. Your mission is to click on “Connect” and cat this file so you can see the configuration. It should be something among those lines: conf_id=o1481981647 conf_name=MyVpnConnection proto=openvpn The conf_id and conf_name is what we are after.

Once found, just change o1663422808 and Surfshark_HK with the names you found following the above instructions.

(Edit: Note - there are multiple occurrences of o1663422808 (and possibly Surfshark_HK) in the script, so change all occurrences) Now that we have created the script, 2 additional steps are needed:

  1. Uncheck the 'Reconnect when the VPN connection is lost' checkbox. This script takes over the monitoring / restarting.
  2. We need a way to run the script at system startup. Either you can figure out how to utilize 'task scheduler' to do this, or do what I did:

cd to /usr/local/etc/rc.d , then create a 'startup.sh' with the following content:

#!/bin/sh

# Start everything up in background.
# My experience shows Synology may start these process one by one, and only if one has finished will it start the next one.
# So for script with forever loops, it potentially will block other scripts from running
# Therefore I need to use one single script to start other scripts in the background.

case $1 in

        start)

               /bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh stop

               /bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh start &

                ;;

        stop)

               /bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh stop &

                ;;

esac

Again, change xxxxx with your home folder (or whatever folder you placed the watchdog script in).

Also, remember to 'chmod +x' the scripts so they become executable.

That's all I can think of. Good luck !

[–] seemebreakthis@lemm.ee 0 points 1 year ago (3 children)

I gave up on DSM's own VPN client setup, because IIRC first it only supports OpenVPN, and 2nd it tends to quietly disconnect from the VPN server even if keep-alive is enabled.

But if you do want to stick with DSM VPN, I wrote a script before that would help revive the connection even if it gets severed. Maybe this will help you. Let me know if you want to give it a try, so I can see if I still have it somewhere to share with you.

[–] seemebreakthis@lemm.ee 0 points 1 year ago (5 children)

By torrenting do you mean using Download Manager?

My current setup of running qBittorrent in a docker container, and VPN service in another container, gives me stable torrenting via the VPN connection. Also running DSM 6.2

 

Does anyone here have a working setup of automated acme.sh that renews the certificates every three months?

I tried to setup something but I think I saw an error message when I run it, and due to the way let's encrypt rejects requests when the certificate is not due for renewal, I can't really tell what exactly is the problem as I simply can't repeatedly run my process and check where the error stems from.

Would be great if someone can share a setup that they are currently using that works.

Edit: It finally came time to renew again, and what I have already entered into task scheduler was fired, and the certificate seems to have been renewed successfully.

So basically, just download the latest acme.sh, then add a task in your task scheduler that runs this:

bash /root/.acme.sh/acme.sh --renew -d xyz.com
view more: next ›