You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
The hard-coded list of TLDs cannot be relied upon (.co.uk? not even .net made the list). So we can say that you have 17 characters after the http(s)://. Here are some URLs that would not fit.
Also, why did you not include the trailing / in the TLD replacements? That would save an extra character.
Solution
A simple solution is simply to send several advertisment packets, each containing a part of the URL. A simple scheme could be that the first 4 bits indicate the number of fragments, and the second 4 bits indicate the current fragment number. This would allow very long URLs at a slight battery cost.
Consecutive packets would not be sent immediately after each other, as Android has issues with this (woo quality BLE code right guys?; ok to be fair the BLE spec is stupid about that.). Instead they would be sent evenly spaced through the advertisment period. E.g. if you currently send a <17 byte URL once per second, you'd split a longer URL into 2 and send alternate packets every 0.5 seconds.
The text was updated successfully, but these errors were encountered:
Problem
The hard-coded list of TLDs cannot be relied upon (
.co.uk
? not even.net
made the list). So we can say that you have 17 characters after thehttp(s)://
. Here are some URLs that would not fit.Also, why did you not include the trailing
/
in the TLD replacements? That would save an extra character.Solution
A simple solution is simply to send several advertisment packets, each containing a part of the URL. A simple scheme could be that the first 4 bits indicate the number of fragments, and the second 4 bits indicate the current fragment number. This would allow very long URLs at a slight battery cost.
Consecutive packets would not be sent immediately after each other, as Android has issues with this (woo quality BLE code right guys?; ok to be fair the BLE spec is stupid about that.). Instead they would be sent evenly spaced through the advertisment period. E.g. if you currently send a <17 byte URL once per second, you'd split a longer URL into 2 and send alternate packets every 0.5 seconds.
The text was updated successfully, but these errors were encountered: