<commit_before># BLE Gateway example 
This example implements a basic gateway application for the rebroadcasting mesh by utilizing the S110 Softdevice. It allows external Bluetooth Low Energy enabled devices to access the mesh-global GATT service, by adding a softdevice application to the basic application in the LED mesh example. Each node in the mesh will be able to act as an access point for external BLE devices. 

The example is made for nRF51x22 Evaluation and Development kits (PCA10000, PCA10001, PCA10003, both dongles and boards), and the two characteristics provided in the mesh Service represents LED 0 and LED 1 on the board, and RGB RED and GREEN on the dongles. 

## GATT Server
The framework adds a custom Mesh service to the softdevice GATT server, represented by the 128 bit UUID 0x2A1E0001-FD51-D882-8BA8-B98C0000CD1E. The service holds 1 metadata characteristic, represented by the 128 bit UUID 0x2A1E0002-FD51-D882-8BA8-B98C0000CD1E. This characteristic holds the following information

| Data | Bytes | Description |
|------|-------|-------------|
| Access Address | [0-3] | The operational access address of the mesh |
| Adv. Int. | [4-7] | The minimum advertisement interval of the mesh |
| Char. count | [8] | The amount of variable characteristics in the service |
| Channel | [9] | BLE channel the mesh operates on |

This metadata information is static, and will be the same between all nodes in the mesh, apart from adv. int, which may be configured differently without breaking communication with other nodes. External devices will be presented with the local adv. int. when connecting to a node. 

After the metadata characteristic, there is an array of value characteristics. These are shared across the mesh, and may carry a user defined payload of up to 27 bytes each. Each value characteristic comes with a [standard namespace descriptor](https://developer.bluetooth.org/gatt/Pages/GattNamespaceDescriptors.aspx), that carries an enumeration from 0 to 155. Each value characteristic in the service has their own assigned number, and this number is used as handle for the values in the mesh. Each handle-value pair will be the same in every node (when the value has been propagated to all nodes in the mesh).

## LED example
This example implements the mesh with two value characteristics, one for each LED to control. Only the first byte of the payload is checked, a 0 indicates no light, any other value indicates light.
<commit_msg>update to ble gateway readme<commit_after># BLE Gateway example 
This example implements a basic gateway application for the rebroadcasting mesh by utilizing the S110 Softdevice. It allows external Bluetooth Low Energy enabled devices to access the mesh-global GATT service, by adding a softdevice application to the basic application in the LED mesh example. Each node in the mesh will be able to act as an access point for external BLE devices. 

The example is made for nRF51x22 Evaluation and Development kits (PCA10000, PCA10001, PCA10003, both dongles and boards), and the two characteristics provided in the mesh Service represents LED 0 and LED 1 on the board, and RGB RED and GREEN on the dongles. 

## GATT Server
The framework adds a custom Mesh service to the softdevice GATT server, represented by the 128 bit UUID 0x2A1E0001-FD51-D882-8BA8-B98C0000CD1E. The service holds 1 metadata characteristic, represented by the 128 bit UUID 0x2A1E0002-FD51-D882-8BA8-B98C0000CD1E. This characteristic holds the following information

| Data | Bytes | Description |
|------|-------|-------------|
| Access Address | [0-3] | The operational access address of the mesh |
| Adv. Int. | [4-7] | The minimum advertisement interval of the mesh |
| Char. count | [8] | The amount of variable characteristics in the service |
| Channel | [9] | BLE channel the mesh operates on |

This metadata information is static, and will be the same between all nodes in the mesh, apart from adv. int, which may be configured differently without breaking communication with other nodes. External devices will be presented with the local adv. int. when connecting to a node. 

After the metadata characteristic, there is an array of value characteristics. These are shared across the mesh, and may carry a user defined payload of up to 27 bytes each. Each value characteristic comes with a [standard namespace descriptor](https://developer.bluetooth.org/gatt/Pages/GattNamespaceDescriptors.aspx), that carries an enumeration from 0 to 155. Each value characteristic in the service has their own assigned number, and this number is used as handle for the values in the mesh. Each handle-value pair will be the same in every node (when the value has been propagated to all nodes in the mesh).

## LED example
This example implements the mesh with two value characteristics, one for each LED to control. Only the first byte of the payload is checked, a 0 indicates no light, any other value indicates light. 

## Usage
Since the application implements a custom service with custom characteristics, it is recommended to connect to the mesh with a developer tool such as the Nordic Semiconductor nRF Master Control Panel Desktop application, available at the [Nordic Semiconductor homepage](http://www.nordicsemi.com), or its Android equivalent available for BLE powered Android phones (with Android 4.3 and newer in the [Google Play Store](https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp). 

After setting up a mesh node, it automatically begins advertising with the name "RBC Mesh node #xxxxx" where xxxxx is a number in the range 0 to 65536. Connect to one of the nodes in the mesh with the Master Control Panel. If you're using the desktop application, remember to enable services. The node's GATT server is listed with a "Generic Access" service, a "Generic Attribute" service, and an Unknown Service with the previously mentioned 128 bit UUID. This service contains the metadata characteristic and two value characteristics. By writing 1 or 0 to these characteristics, you should be able to change the state of the LEDs on the board. This board then notifies all other boards across the mesh about the state change, and they copy the gateway's LED configuration. The other nodes may be programmed both as a Gateway and with the LED_mesh example program, as these use the same configuration setup. If you have several Gateways in the same mesh, you may access it from any of these Gateway nodes, both reading and updating the state of the entire mesh.
{'fraction_non_alphanumeric': 0.05054372798284577, 'fraction_numerical': 0.028335120232807473, 'mean_word_length': 4.401157981803143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4528904', 'n_tokens_mistral': 1691, 'n_tokens_neox': 1519, 'n_words': 979}