Check that Sitecore instances can access this database path.
<setting name="DeviceDetection.DatabasePath" value="/App_Data/DeviceDetection" />
and Also validate whether device detection is enabled or not in this config App_config/sitecore/DeviceDetection.Client/Sitecore.CES.DeviceDetection.config.
and https://www.yoursite.com/sitecore/admin/showconfig.aspx to check value.
It allows to download database. And also validate FailDatabaseCheckInterval.
<setting name="DeviceDetection.FailDatabaseCheckInterval" value="00:10:00"/>
You need to also check firewall settings and must open the HTTPS protocol on your firewall, either for the wildcard domain address *.cloud.sitecore.net
(if your firewall allows it), or for the following URLs:
discovery-ces.cloud.sitecore.net
devicedetection-ces.cloud.sitecore.net
Here is the doc you can refer for device detection-related configuration.
https://doc.sitecore.com/xp/en/developers/81/sitecore-experience-platform/configure-sitecore-device-detection.html