vbb-stations-with-wifi

VBB stations with free wifi and their BSSIDs.

Usage no npm install needed!

<script type="module">
  import vbbStationsWithWifi from 'https://cdn.skypack.dev/vbb-stations-with-wifi';
</script>

README

vbb-stations-with-wifi

VBB stations with free wifi and their BSSIDs. Contribute!

npm version build status ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installing

npm install vbb-stations-with-wifi

Usage

const stations = require('vbb-stations-with-wifi')

console.log(stations['900000023101']) // U Ernst-Reuter-Platz
{
    wifi: true,
    accessPoints: [ {
        type: 'platform',
        platform: null,
        lines: [
            ['U2', '900000022201'] // U Deutsche Oper
        ],
        position: 0.35,
        bssid: '00:81:c4:e7:0d:8f',
        mac: null
    }, {
        type: 'platform',
        platform: null,
        lines: [
            ['U2', '900000022201'] // U Deutsche Oper
        ],
        position: 0.65,
        bssid: '00:81:c4:e7:0e:7f',
        mac: null
    }, {
        type: 'other',
        comment: 'entrance to U2 towards Pankow',
        bssid: '00:81:c4:9d:b4:af',
        mac: null
    }, {
        type: 'other',
        comment: 'entrance to U2 towards Ruhleben',
        bssid: '00:f6:63:af:f8:af',
        mac: null
    } ]
}

By BSSID

const byBssid = require('vbb-stations-with-wifi/by-bssid')

console.log(byBssid['00:81:c4:e7:0e:7f'])
{
    station: '900000023101',
    type: 'platform',
    platform: null,
    lines: [
        ['U2', '900000022201'] // U Deutsche Oper
    ],
    position: 0.65,
    bssid: '00:81:c4:e7:0e:7f',
    mac: null
}

Data structure

index.js looks like this:

{
    'station-id-123': {
        wifi: true,
        accessPoints: […]
    }
    // …
}

An item in accessPoints should either have type: 'platform' (an access point located close to or at a platform) or type: 'other' (an access point located somewhere else). The markup for type: 'platform' is as follows:

key description required example
platform the name of the platform no '3a'
lines an array of pairs: 1) a line and 2) the ID of the next station on this line yes [['U2', '900000022201']]
position position of the access point at the platform, between 0 (rear end of the station) and 1 (front end of the station) ¹ yes 0.2
bssid BSSID, lower case yes '00:f6:63:cc:00:9f'
mac MAC address, lower case no '00:f6:63:cc:00:9f'

¹ "front end" is the end of the station that the a vehicle running at the platform points to (not where the "front end" of the vehicle will be).

Pro tip: Use vbb-stations-cli to find station IDs.