mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-02-02 08:42:11 -08:00
Merge branch 'master' of ssh://github.com-sigma/sigmahour/Meshtastic
This commit is contained in:
commit
a5f1d07163
|
@ -33,4 +33,4 @@ There are two versions of the Heltec (V2). Below is a picture highlighting the v
|
|||
|
||||
[<img src="Heltec WiFi LoRa 32 (V2)" src="/img/hardware/heltec_v2_vs_v21.png" style={{zoom:'25%'}} />](/img/hardware/heltec_v2_vs_v21.png)
|
||||
|
||||
- See [hardware update log](https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html) for more details
|
||||
- See [hardware update log](https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html) for more details
|
||||
|
|
|
@ -147,7 +147,7 @@ FIXME - explain this more, talk about how useful for users and security domains.
|
|||
|
||||
## On device API
|
||||
|
||||
For information on the related on-device API see [here](/docs/development/protobuf-api).
|
||||
For information on the related on-device API see [here](/docs/protobufs/api).
|
||||
|
||||
## MQTT transport
|
||||
|
||||
|
@ -169,7 +169,7 @@ FIXME, discuss possible attacks by griefers and how they can be prevented
|
|||
|
||||
#### Service Envelope
|
||||
|
||||
The payload published on mesh/... will always be wrapped in a [ServiceEnvelope protobuf](/docs/development/protobuf-api#serviceenvelope).
|
||||
The payload published on mesh/... will always be wrapped in a [ServiceEnvelope protobuf](/docs/protobufs/api#serviceenvelope).
|
||||
|
||||
ServiceEnvelope will include the message, and full information about arrival time, who forwarded it, source channel, source mesh id, etc...
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ There are many technologies (and repositories) used in creating the Meshtastic e
|
|||
|
||||
## Protocol buffers
|
||||
|
||||
Most communication and interactions happen with protocol buffers. The [Meshtastic Protobuf Definitions](https://github.com/meshtastic/protobufs) repo is where all of the protocol buffer changes happen. See the [Protobuf API Reference](/docs/development/protobuf-api) for more details.
|
||||
Most communication and interactions happen with protocol buffers. The [Meshtastic Protobuf Definitions](https://github.com/meshtastic/protobufs) repo is where all of the protocol buffer changes happen. See the [Protobuf API Reference](/docs/protobufs/api) for more details.
|
||||
|
||||
## Firmware
|
||||
|
||||
|
|
|
@ -20,4 +20,4 @@ Note: This was formerly a Type enum named `typ` with the same id #
|
|||
|
||||
We have changed to this 'portnum' based scheme for specifying app handlers for particular payloads. This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
|
||||
|
||||
The current list of port numbers can be found listed in the [protobufs](/docs/development/protobuf-api#portnumsproto)
|
||||
The current list of port numbers can be found listed in the [protobufs](/docs/protobufs/api#portnumsproto)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
id: protobuf-api
|
||||
title: Protobuf API Reference
|
||||
slug: /protobufs/api
|
||||
sidebar_label: Protobuf Reference
|
||||
---
|
||||
|
||||
|
@ -838,12 +839,12 @@ The other fields are either not sent at all, or sent in the special 16 byte LORA
|
|||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| from | fixed32 | The sending node number. Note: Our crypto implementation uses this field as well. See [crypto](/docs/developers/firmware/encryption) for details. FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. |
|
||||
| from | fixed32 | The sending node number. Note: Our crypto implementation uses this field as well. See [crypto](/docs/mesh/encryption) for details. FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. |
|
||||
| to | fixed32 | The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only hurts the ble link though. |
|
||||
| channel | uint32 | (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on. If unset, packet was on the primary channel. A particular node might know only a subset of channels in use on the mesh. Therefore channel_index is inherently a local concept and meaningless to send between nodes. Very briefly, while sending and receiving deep inside the device Router code, this field instead contains the 'channel hash' instead of the index. This 'trick' is only used while the payload_variant is an 'encrypted'. |
|
||||
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) payload_variant.decoded | [`Data`](#data) | TODO: REPLACE |
|
||||
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) payload_variant.encrypted | bytes | TODO: REPLACE |
|
||||
| id | fixed32 | A unique ID for this packet. Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space). Otherwise a unique ID for this packet, useful for flooding algorithms. ID only needs to be unique on a _per sender_ basis, and it only needs to be unique for a few minutes (long enough to last for the length of any ACK or the completion of a mesh broadcast flood). Note: Our crypto implementation uses this id as well. See [crypto](/docs/developers/firmware/encryption) for details. FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. |
|
||||
| id | fixed32 | A unique ID for this packet. Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space). Otherwise a unique ID for this packet, useful for flooding algorithms. ID only needs to be unique on a _per sender_ basis, and it only needs to be unique for a few minutes (long enough to last for the length of any ACK or the completion of a mesh broadcast flood). Note: Our crypto implementation uses this id as well. See [crypto](/docs/mesh/encryption) for details. FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. |
|
||||
| rx_time | fixed32 | The time this message was received by the esp32 (secs since 1970). Note: this field is _never_ sent on the radio link itself (to save space) Times are typically not sent over the mesh, but they will be added to any Packet (chain of SubPacket) sent to the phone (so the phone can know exact time of reception) |
|
||||
| rx_snr | float | Never* sent over the radio links. Set during reception to indicate the SNR of this packet. Used to collect statistics on current link quality. |
|
||||
| hop_limit | uint32 | If unset treated as zero (no forwarding, send to adjacent nodes only) if 1, allow hopping through one node, etc... For our usecase real world topologies probably have a max of about 3. This field is normally placed into a few of bits in the header. |
|
||||
|
@ -1586,12 +1587,12 @@ This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT val
|
|||
| `UNKNOWN_APP` | `0` | Deprecated: do not use in new code (formerly called OPAQUE) A message sent from a device outside of the mesh, in a form the mesh does not understand NOTE: This must be 0, because it is documented in IMeshService.aidl to be so |
|
||||
| `TEXT_MESSAGE_APP` | `1` | A simple UTF-8 text message, which even the little micros in the mesh can understand and show on their screen eventually in some circumstances even signal might send messages in this form (see below) |
|
||||
| `REMOTE_HARDWARE_APP` | `2` | Reserved for built-in GPIO/example app. See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number |
|
||||
| `POSITION_APP` | `3` | The built-in position messaging app. Payload is a [Position](/docs/developers/protobufs/api#position) message |
|
||||
| `NODEINFO_APP` | `4` | The built-in user info app. Payload is a [User](/docs/developers/protobufs/api#user) message |
|
||||
| `ROUTING_APP` | `5` | Protocol control packets for mesh protocol use. Payload is a [Routing](/docs/developers/protobufs/api#routing) message |
|
||||
| `ADMIN_APP` | `6` | Admin control packets. Payload is a [AdminMessage](/docs/developers/protobufs/api#adminmessage) message |
|
||||
| `POSITION_APP` | `3` | The built-in position messaging app. Payload is a [Position](/docs/protobufs/api#position) message |
|
||||
| `NODEINFO_APP` | `4` | The built-in user info app. Payload is a [User](/docs/protobufs/api#user) message |
|
||||
| `ROUTING_APP` | `5` | Protocol control packets for mesh protocol use. Payload is a [Routing](/docs/protobufs/api#routing) message |
|
||||
| `ADMIN_APP` | `6` | Admin control packets. Payload is a [AdminMessage](/docs/protobufs/api#adminmessage) message |
|
||||
| `TEXT_MESSAGE_COMPRESSED_APP` | `7` | Compressed TEXT_MESSAGE payloads. |
|
||||
| `WAYPOINT_APP` | `8` | Waypoint payloads. Payload is a [Waypoint](/docs/developers/protobufs/api#waypoint) message |
|
||||
| `WAYPOINT_APP` | `8` | Waypoint payloads. Payload is a [Waypoint](/docs/protobufs/api#waypoint) message |
|
||||
| `REPLY_APP` | `32` | Provides a 'ping' service that replies to any packet it receives. Also serves as a small example module. |
|
||||
| `IP_TUNNEL_APP` | `33` | Used for the python IP tunnel feature |
|
||||
| `SERIAL_APP` | `64` | Provides a hardware serial interface to send and receive from the Meshtastic network. Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network. Maximum packet size of 240 bytes. Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp. |
|
||||
|
|
|
@ -20,4 +20,14 @@ Download and unzip the latest firmware from [Meshtastic Downloads](https://mesht
|
|||
4. Open this drive and you should see three files: `CURRENT.UF2`, `INDEX.HTM`, and `INFO_UF2.TXT`
|
||||
5. Drop the appropriate appropriate `firmware-DEVICE_NAME-vx.x.x-xxxxxxx.uf2` file from the release you want to install onto this drive
|
||||
|
||||
Once the file has finished copying onto the drive, the device will reboot and install the Meshtastic firmware.
|
||||
Once the file has finished copying onto the drive, the device will reboot and install the Meshtastic firmware.
|
||||
|
||||
:::caution
|
||||
If you're upgrading your NRF52 device from a previous version of Meshtastic rather than starting from scratch, you may need to do a full factory reset of the internal flash memory. Stale data saved by previous versions of the Meshtastic firmware can cause devices to get stuck in a crash loop at startup.
|
||||
:::
|
||||
|
||||
Meshtastic uses the [littlefs](https://github.com/littlefs-project/littlefs) library to store configuration, logs, and other data in the internal flash of NRF52 devices. Updating the firmware does _not_ erase this additional data, which can cause issues when the format and location of data changes between releases.
|
||||
|
||||
To reset the flash storage on your NRF52 board, first follow steps 1-4 above. At step 5, copy the included file named `Meshtastic_nRF52_factory_erase.uf2` onto the virtual disk device instead of a `firmware-DEVICE_NAME...` binary. After the device resets, connect to it via serial console using the [Meshtastic CLI `--noproto`](/docs/software/python/cli/#--noproto) mode or a standalone serial client like `minicom`. When you connect to the serial console, press any key; you should see the message `Formating ... Done`.
|
||||
|
||||
Once the flash is erased you can use steps 2-5 above to re-install the latest Meshtastic firmware on a clean storage filesystem.
|
||||
|
|
|
@ -49,7 +49,6 @@ There is no definitive way to determine the difference in cables if you aren't w
|
|||
|
||||
Once you've located a working data cable, [install the correct serial driver](#install-serial-drivers) and [test for driver installation](#test-for-driver-installation).
|
||||
|
||||
|
||||
### Install serial drivers
|
||||
|
||||
<div className="indexCtasBody">
|
||||
|
@ -158,5 +157,4 @@ For RAK4631 users, if you have a RAK4631-R (the RUI3 bootloader version of the R
|
|||
### over the internet with MQTT
|
||||
- [MQTT](/docs/software/mqtt/)
|
||||
|
||||
There are many ways to interact with and use Meshtastic, please visit the [Software](/docs/software) page for more information.
|
||||
|
||||
There are many ways to interact with and use Meshtastic, please visit the [Software](/docs/software) page for more information.
|
83
docs/getting-started/serial-drivers/index.old
Normal file
83
docs/getting-started/serial-drivers/index.old
Normal file
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
id: serial-drivers
|
||||
title: Installing Serial Drivers
|
||||
sidebar_label: Install Serial Drivers
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
:::caution
|
||||
Make sure not to power the radio on without first attaching the antenna! You could damage the radio chip!
|
||||
:::
|
||||
|
||||
Prior to connecting your Meshtastic device to the computer, you should perform the following basic checks.
|
||||
|
||||
## Verify data cable
|
||||
|
||||
Verify that you have a **data cable** and _not_ a **charging _only_ cable** before proceeding. There is no definitive way to determine the difference in cables if you aren't willing to pull it apart. Trying out a few cables will be the best way to verify.
|
||||
|
||||
Once you've located a working data cable, [test for driver installation](/docs/getting-started/serial-drivers/#test-for-driver-installation) to see if you need to install a driver to communicate with your device.
|
||||
|
||||
If you know you have installed the correct driver, the following step can be used to check if you have a proper data cable.
|
||||
|
||||
## Test for driver installation
|
||||
|
||||
You can verify that you have a proper data cable (rather than a charge-only type cable) and that the appropriate drivers for your system are installed by performing the following test:
|
||||
|
||||
_select your operating system below_
|
||||
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
defaultValue="linux"
|
||||
values={[
|
||||
{label: 'Linux', value: 'linux'},
|
||||
{label: 'macOS', value: 'macos'},
|
||||
{label: 'Windows', value: 'windows'},
|
||||
]}>
|
||||
<TabItem value="linux">
|
||||
|
||||
1. Connect your Meshtastic device to your USB port
|
||||
2. Open a **Terminal** and enter the following command:
|
||||
|
||||
```shell
|
||||
lsusb
|
||||
```
|
||||
3. You should see something like:
|
||||
|
||||
```shell
|
||||
ID xxxx:xxxx Silicon Labs CP210x UART Bridge
|
||||
# or
|
||||
ID xxxx:xxxx QinHeng Electronics USB Single Serial
|
||||
# or
|
||||
FIXME (WISBLOCK OUTPUT)
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
1. Navigate to `Apple Menu > About This Mac > System Report... > Hardware > USB`.
|
||||
2. You should see similar to one of the following entries:
|
||||
- `CP210X USB to UART Bridge Controller`
|
||||
- `CH9102 USB to UART Bridge Controller`
|
||||
- `WisCore RAK4631 Board`
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
1. Navigate to `Device Manager > Ports (COM & LPT)`
|
||||
2. You should see similar to one of the following entries:
|
||||
- `Silicon Labs CP210X USB to UART Bridge (COM5)`
|
||||
- `Silicon Labs CH9102 USB to UART Bridge (COM5)`
|
||||
- `FIXME (WISBLOCK OUTPUT)`
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
If you can see your device, you are ready to flash the firmware. Skip to the [Flashing Firmware](/docs/getting-started/flashing-firmware/) section.
|
||||
|
||||
If you do not see your device after performing the check:
|
||||
|
||||
1. You may be using a charging-only cable.
|
||||
2. You may need to install the USB serial driver corrosponding to your device ([ESP32](/docs/getting-started/serial-drivers/installing-esp32-serial-drivers) or [NRF52](/docs/getting-started/serial-drivers/installing-nrf52-serial-drivers)).
|
|
@ -35,7 +35,6 @@ values={[
|
|||
- Power, Program and Reset switches
|
||||
- **Comes with 0.96 inch OLED display (some soldering required to assemble)**
|
||||
|
||||
|
||||
- Firmware file: `firmware-tbeam-1.x.x.bin`
|
||||
- [Purchase link](https://www.aliexpress.com/item/4001178678568.html)
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ Be sure to turn off either the module configured as a sender or the device where
|
|||
Also be mindful of your space usage on the file system. It has protections from filling up the space but it's best to delete old range test results.
|
||||
|
||||
:::note
|
||||
Leaving this module on can slow down your mesh. Currently, the messages are sent using the same `TEXT_MESSAGE_APP` [port that all other messages](/docs/development/protobuf-api#portnumsproto) are sent on.
|
||||
Leaving this module on can slow down your mesh. Currently, the messages are sent using the same `TEXT_MESSAGE_APP` [port that all other messages](/docs/protobufs/api#portnumsproto) are sent on.
|
||||
:::
|
||||
|
||||
### Accessing your CSV
|
||||
|
|
|
@ -50,7 +50,7 @@ This layer is conventional non-reliable LoRa packet transmission. The transmitte
|
|||
|
||||
- **Packet Header - Unique ID:** The ID is a large, 32 bit ID to ensure there is enough unique state to protect an encrypted payload from attack.
|
||||
|
||||
- **Payload:** An encrypted and packed protobuf encoding of the SubPacket protobuf. Only the SubPacket is encrypted, while headers are not. This allows the option of eventually allowing nodes to route packets without knowing anything about the encrypted payload. For more information, see the [encryption](/docs/mesh/encryption) and [protobufs](/docs/development/protobuf-api) documentation. Any data past the maximum length is truncated.
|
||||
- **Payload:** An encrypted and packed protobuf encoding of the SubPacket protobuf. Only the SubPacket is encrypted, while headers are not. This allows the option of eventually allowing nodes to route packets without knowing anything about the encrypted payload. For more information, see the [encryption](/docs/mesh/encryption) and [protobufs](/docs/protobufs/api) documentation. Any data past the maximum length is truncated.
|
||||
|
||||
#### Carrier-Sense Multiple Access with Collision Avoidance (CSMA/CA)
|
||||
|
||||
|
|
|
@ -61,13 +61,13 @@ We have six predefined channels. These are the most common settings and have bee
|
|||
|
||||
| Channel setting | Alt Channel Name | Data-rate | SF / Symbols | Coding Rate | Bandwidth | Link Budget |
|
||||
| :------------------ | :--------------- | :------------------ | :----------- | :---------- | :-------- | :---------- |
|
||||
| Short Range / Fast | Short Fast | 18.89 kbps | 7 / 128 | 4/5 | 500 | 134dB |
|
||||
| Short Range / Slow | Short Slow | 4.69 kbps | 7 / 128 | 4/5 | 125 | 140dB |
|
||||
| Medium Range / Fast | Medium Fast | 1.2 kbps | 10 / 1024 | 4/6 | 250 | 146dB |
|
||||
| Medium Range / Slow | Medium Slow | 0.75 kbps | 11 / 2048 | 4/7 | 250 | 148dB |
|
||||
| Long Range / Fast | Long Fast | 0.19 kbps (default) | 9 / 512 | 4/8 | 31 | 153dB |
|
||||
| Long Range / Slow | Long Slow | 0.13 kbps | 12 / 4096 | 4/8 | 125 | 154dB |
|
||||
| Very Long Range - Slow | Very Long Slow | 0.04 kbps | 12 / 4096 | 4/8 | 31.25 | ???dB |
|
||||
| Short Range / Fast | Short Fast | 6.8 kbps | 7 / 128 | 4/8 | 250 | 137dB |
|
||||
| Short Range / Slow | Short Slow | 3.9 kbps | 8 / 256 | 4/8 | 250 | 140dB |
|
||||
| Medium Range / Fast | Medium Fast | 2.2 kbps | 9 / 512 | 4/8 | 250 | 143dB |
|
||||
| Medium Range / Slow | Medium Slow | 1.2 kbps | 10 / 1024 | 4/8 | 250 | 146dB |
|
||||
| Long Range / Fast | Long Fast | 0.67 kbps (default) | 11 / 2048 | 4/8 | 250 | 148.5dB |
|
||||
| Long Range / Slow | Long Slow | 0.18 kbps | 12 / 4096 | 4/8 | 125 | 154dB |
|
||||
| Very Long Range - Slow | Very Long Slow | 0.05 kbps | 12 / 4096 | 4/8 | 31.25 | 160.1dB |
|
||||
|
||||
Note: The link budget used by these calculations assumes a transmit power of 17dBm and an antenna with 0dB gain. Adjust your link budget assumptions based on your actual devices. Data-rate in this table is actual measured but doesn't count mesh overhead, hops and re-transmissions.
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ sidebar_label: Critical error codes
|
|||
The device might report these fault codes on the screen, but it will also be outputted on the device serial output. If you encounter a fault code, please post on the forum and we'll try to help.
|
||||
|
||||
:::note
|
||||
This table is derived from the [protobufs](/docs/development/protobuf-api#criticalerrorcode)
|
||||
This table is derived from the [protobufs](/docs/protobufs/api#criticalerrorcode)
|
||||
:::
|
||||
|
||||
| Name | Number | Description |
|
||||
|
|
|
@ -139,7 +139,7 @@ Completed getting preferences
|
|||
For further reading, I recommend starting out with [Meshtastic-python](/docs/software/python/cli/) if you haven't already gone through this (hopefully you have since you are reading this). But for a full reference to the settings you can change, please see:
|
||||
|
||||
[Settings Overview](/docs/settings) and
|
||||
[Complete list of user settings in Protobufs](/docs/development/protobuf-api#radioconfiguserpreferences)
|
||||
[Complete list of user settings in Protobufs](/docs/protobufs/api#radioconfiguserpreferences)
|
||||
|
||||
## Areas for future development
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Meshtastic networks in different locations beyond the reach of LoRa can be easil
|
|||
|
||||
You can also share channel settings with a remote network. If you use the default meshtastic MQTT server, packets are always encrypted. If you use a custom MQTT broker (ie set `mqtt.address`), the `mqtt.encryption_enabled` setting applies, which by default is false. You can also specify your own private MQTT broker and specify authentication for that broker to bridge several mesh networks together, via the internet (or just a local IP network).
|
||||
|
||||
You can find the settings available for MQTT [here](https://meshtastic.org/docs/settings/moduleconfig/mqtt).
|
||||
You can find the settings available for MQTT [here](/docs/settings/moduleconfig/mqtt).
|
||||
|
||||
## Software Integrations
|
||||
|
||||
|
@ -102,7 +102,7 @@ If the channelid 'well known'/public it could be decrypted by a web service (if
|
|||
|
||||
#### Service Envelope
|
||||
|
||||
The payload published on mesh/... will always be wrapped in a [ServiceEnvelope protobuf](/docs/development/protobuf-api#serviceenvelope).
|
||||
The payload published on mesh/... will always be wrapped in a [ServiceEnvelope protobuf](/docs/protobufs/api#serviceenvelope).
|
||||
|
||||
ServiceEnvelope will include the message, and full information about arrival time, who forwarded it, source channel, source mesh id, etc...
|
||||
|
||||
|
@ -268,3 +268,7 @@ Forwarding a text message from one device, through a broker, to another broker/d
|
|||
If you want to decode text and position messages without json, it gets complicated:
|
||||
[<img src="/documents/mqtt/Decode.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Decode.jpg)
|
||||
|
||||
But node-red can rapidly (minutes vs days) put together some pretty impressive output when paired with meshtastic. Here is an example of geofencing and mapping of a single device via mqtt data.
|
||||
[<img src="/documents/mqtt/Mapping.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Mapping.jpg)
|
||||
[<img src="/documents/mqtt/MapFlow.jpg" style={{zoom:'50%'}} />](/documents/mqtt/MapFlow.jpg)
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ meshtastic --set network.wifi_ssid mywifissid --set network.wifi_psk mywifipsw -
|
|||
```
|
||||
|
||||
:::note
|
||||
For a full list of preferences which can be set (and their documentation) can be found in the [protobufs](/docs/development/protobuf-api#radioconfiguserpreferences).
|
||||
For a full list of preferences which can be set (and their documentation) can be found in the [protobufs](/docs/protobufs/api#radioconfiguserpreferences).
|
||||
:::
|
||||
|
||||
### Changing channel settings
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
"@heroicons/react": "^2.0.12",
|
||||
"@leenguyen/react-flip-clock-countdown": "^1.3.1",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@meshtastic/meshtasticjs": "^0.6.113",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"base64-js": "^1.5.1",
|
||||
"dotenv": "^16.0.3",
|
||||
"framer-motion": "^6.5.1",
|
||||
"postcss": "^8.4.18",
|
||||
|
|
180
pnpm-lock.yaml
180
pnpm-lock.yaml
|
@ -11,12 +11,14 @@ specifiers:
|
|||
'@leenguyen/react-flip-clock-countdown': ^1.3.1
|
||||
'@mdx-js/react': ^1.6.22
|
||||
'@meshtastic/eslint-config': ^1.0.8
|
||||
'@meshtastic/meshtasticjs': ^0.6.113
|
||||
'@tailwindcss/typography': ^0.5.7
|
||||
'@tsconfig/docusaurus': ^1.0.6
|
||||
'@types/node': ^18.11.9
|
||||
'@types/react': ^18.0.24
|
||||
'@types/react-dom': ^18.0.8
|
||||
autoprefixer: ^10.4.13
|
||||
base64-js: ^1.5.1
|
||||
dotenv: ^16.0.3
|
||||
framer-motion: ^6.5.1
|
||||
postcss: ^8.4.18
|
||||
|
@ -40,7 +42,9 @@ dependencies:
|
|||
'@heroicons/react': 2.0.12_react@17.0.2
|
||||
'@leenguyen/react-flip-clock-countdown': 1.3.1_react@17.0.2
|
||||
'@mdx-js/react': 1.6.22_react@17.0.2
|
||||
'@meshtastic/meshtasticjs': 0.6.113
|
||||
autoprefixer: 10.4.13_postcss@8.4.18
|
||||
base64-js: 1.5.1
|
||||
dotenv: 16.0.3
|
||||
framer-motion: 6.5.1_sfoxds7t5ydpegc3knd667wn6m
|
||||
postcss: 8.4.18
|
||||
|
@ -2652,6 +2656,18 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@meshtastic/meshtasticjs/0.6.113:
|
||||
resolution: {integrity: sha512-4/Qlqof/Dm2gWS1nqZ/H/csYy5o7EjdKlGWCBFQjAA5s9PmZ4vMI20UdoSaAz3+DvW7CYCzAx3h1e5WwsClF0A==}
|
||||
dependencies:
|
||||
'@protobuf-ts/runtime': 2.8.1
|
||||
'@serialport/stream': 10.3.0
|
||||
glob: 8.0.3
|
||||
serialport: 10.4.0
|
||||
sub-events: 1.9.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@motionone/animation/10.13.1:
|
||||
resolution: {integrity: sha512-dxQ+1wWxL6iFHDy1uv6hhcPjIdOg36eDT56jN4LI7Z5HZRyLpq8x1t7JFQclo/IEIb+6Bk4atmyinGFdXVECuA==}
|
||||
dependencies:
|
||||
|
@ -2721,6 +2737,106 @@ packages:
|
|||
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
|
||||
dev: false
|
||||
|
||||
/@protobuf-ts/runtime/2.8.1:
|
||||
resolution: {integrity: sha512-D9M5hSumYCovIfNllt7N6ODh4q+LrjiMWtNETvooaf+a2XheZJ7kgjFlsFghti0CFWwtA//of4JXQfw9hU+cCw==}
|
||||
dev: false
|
||||
|
||||
/@serialport/binding-mock/10.2.2:
|
||||
resolution: {integrity: sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
'@serialport/bindings-interface': 1.2.2
|
||||
debug: 4.3.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@serialport/bindings-cpp/10.7.0:
|
||||
resolution: {integrity: sha512-Xx1wA2UCG2loS32hxNvWJI4smCzGKhWqE85//fLRzHoGgE1lSLe3Nk7W40/ebrlGFHWRbQZmeaIF4chb2XLliA==}
|
||||
engines: {node: '>=12.17.0 <13.0 || >=14.0.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@serialport/bindings-interface': 1.2.1
|
||||
'@serialport/parser-readline': 10.3.0
|
||||
debug: 4.3.4
|
||||
node-addon-api: 4.3.0
|
||||
node-gyp-build: 4.5.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@serialport/bindings-interface/1.2.1:
|
||||
resolution: {integrity: sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==}
|
||||
engines: {node: ^12.22 || ^14.13 || >=16}
|
||||
dev: false
|
||||
|
||||
/@serialport/bindings-interface/1.2.2:
|
||||
resolution: {integrity: sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA==}
|
||||
engines: {node: ^12.22 || ^14.13 || >=16}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-byte-length/10.3.0:
|
||||
resolution: {integrity: sha512-pJ/VoFemzKRRNDHLhFfPThwP40QrGaEnm9TtwL7o2GihEPwzBg3T0bN13ew5TpbbUYZdMpUtpm3CGfl6av9rUQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-cctalk/10.3.0:
|
||||
resolution: {integrity: sha512-8ujmk8EvVbDPrNF4mM33bWvUYJOZ0wXbY3WCRazHRWvyCdL0VO0DQvW81ZqgoTpiDQZm5r8wQu9rmuemahF6vQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-delimiter/10.3.0:
|
||||
resolution: {integrity: sha512-9E4Vj6s0UbbcCCTclwegHGPYjJhdm9qLCS0lowXQDEQC5naZnbsELemMHs93nD9jHPcyx1B4oXkMnVZLxX5TYw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-inter-byte-timeout/10.3.0:
|
||||
resolution: {integrity: sha512-wKP0QK85NHgvT6BBB1qBfKBBU4pf8kespNXAZBUYmFT+P4n8r8IZE2mqigCD+AiZcfWNQoAizwOsT/Jx/qeVig==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-packet-length/10.3.0:
|
||||
resolution: {integrity: sha512-bj0cWzt8YSQj/E5fRQVYdi4TsfTlZQrXlXrUwjyTsCONv8IPOHzsz+yY0fw5SEMiJtaLyqvPkCHLsttOd/zFsg==}
|
||||
engines: {node: '>=8.6.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-readline/10.3.0:
|
||||
resolution: {integrity: sha512-ki3ATZ3/RAqnqGROBKE7k+OeZ0DZXZ53GTca4q71OU5RazbbNhTOBQLKLXD3v9QZXCMJdg4hGW/2Y0DuMUqMQg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
'@serialport/parser-delimiter': 10.3.0
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-ready/10.3.0:
|
||||
resolution: {integrity: sha512-1owywJ4p592dJyVrEJZPIh6pUZ3/y/LN6kGTDH2wxdewRUITo/sGvDy0er5i2+dJD3yuowiAz0dOHSdz8tevJA==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-regex/10.3.0:
|
||||
resolution: {integrity: sha512-tIogTs7CvTH+UUFnsvE7i33MSISyTPTGPWlglWYH2/5coipXY503jlaYS1YGe818wWNcSx6YAjMZRdhTWwM39w==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-slip-encoder/10.3.0:
|
||||
resolution: {integrity: sha512-JI0ILF5sylWn8f0MuMzHFBix/iMUTa79/Z95KaPZYnVaEdA7h7hh/o21Jmon/26P3RJwL1SNJCjZ81zfan+LtQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/parser-spacepacket/10.3.0:
|
||||
resolution: {integrity: sha512-PDF73ClEPsClD1FEJZHNuBevDKsJCkqy/XD5+S5eA6+tY5D4HLrVgSWsg+3qqB6+dlpwf2CzHe+uO8D3teuKHA==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/@serialport/stream/10.3.0:
|
||||
resolution: {integrity: sha512-7sooi5fHogYNVEJwxVdg872xO6TuMgQd2E9iRmv+o8pk/1dbBnPkmH6Ka3st1mVE+0KnIJqVlgei+ncSsqXIGw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
'@serialport/bindings-interface': 1.2.1
|
||||
debug: 4.3.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@sideway/address/4.1.4:
|
||||
resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==}
|
||||
dependencies:
|
||||
|
@ -3703,6 +3819,10 @@ packages:
|
|||
resolution: {integrity: sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==}
|
||||
dev: false
|
||||
|
||||
/base64-js/1.5.1:
|
||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||
dev: false
|
||||
|
||||
/batch/0.6.1:
|
||||
resolution: {integrity: sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=}
|
||||
dev: false
|
||||
|
@ -3780,6 +3900,12 @@ packages:
|
|||
balanced-match: 1.0.2
|
||||
concat-map: 0.0.1
|
||||
|
||||
/brace-expansion/2.0.1:
|
||||
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
|
||||
dependencies:
|
||||
balanced-match: 1.0.2
|
||||
dev: false
|
||||
|
||||
/braces/3.0.2:
|
||||
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
|
||||
engines: {node: '>=8'}
|
||||
|
@ -5505,6 +5631,17 @@ packages:
|
|||
once: 1.4.0
|
||||
path-is-absolute: 1.0.1
|
||||
|
||||
/glob/8.0.3:
|
||||
resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
fs.realpath: 1.0.0
|
||||
inflight: 1.0.6
|
||||
inherits: 2.0.4
|
||||
minimatch: 5.1.0
|
||||
once: 1.4.0
|
||||
dev: false
|
||||
|
||||
/global-dirs/3.0.0:
|
||||
resolution: {integrity: sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -6642,6 +6779,13 @@ packages:
|
|||
dependencies:
|
||||
brace-expansion: 1.1.11
|
||||
|
||||
/minimatch/5.1.0:
|
||||
resolution: {integrity: sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
brace-expansion: 2.0.1
|
||||
dev: false
|
||||
|
||||
/minimist/1.2.6:
|
||||
resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==}
|
||||
|
||||
|
@ -6691,6 +6835,10 @@ packages:
|
|||
tslib: 2.4.0
|
||||
dev: false
|
||||
|
||||
/node-addon-api/4.3.0:
|
||||
resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==}
|
||||
dev: false
|
||||
|
||||
/node-emoji/1.11.0:
|
||||
resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==}
|
||||
dependencies:
|
||||
|
@ -6714,6 +6862,11 @@ packages:
|
|||
engines: {node: '>= 6.13.0'}
|
||||
dev: false
|
||||
|
||||
/node-gyp-build/4.5.0:
|
||||
resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/node-releases/2.0.6:
|
||||
resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==}
|
||||
|
||||
|
@ -8337,6 +8490,28 @@ packages:
|
|||
dependencies:
|
||||
randombytes: 2.1.0
|
||||
|
||||
/serialport/10.4.0:
|
||||
resolution: {integrity: sha512-PszPM5SnFMgSXom60PkKS2A9nMlNbHkuoyRBlzdSWw9rmgOn258+V0dYbWMrETJMM+TJV32vqBzjg5MmmUMwMw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
'@serialport/binding-mock': 10.2.2
|
||||
'@serialport/bindings-cpp': 10.7.0
|
||||
'@serialport/parser-byte-length': 10.3.0
|
||||
'@serialport/parser-cctalk': 10.3.0
|
||||
'@serialport/parser-delimiter': 10.3.0
|
||||
'@serialport/parser-inter-byte-timeout': 10.3.0
|
||||
'@serialport/parser-packet-length': 10.3.0
|
||||
'@serialport/parser-readline': 10.3.0
|
||||
'@serialport/parser-ready': 10.3.0
|
||||
'@serialport/parser-regex': 10.3.0
|
||||
'@serialport/parser-slip-encoder': 10.3.0
|
||||
'@serialport/parser-spacepacket': 10.3.0
|
||||
'@serialport/stream': 10.3.0
|
||||
debug: 4.3.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/serve-handler/6.1.3:
|
||||
resolution: {integrity: sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==}
|
||||
dependencies:
|
||||
|
@ -8682,6 +8857,11 @@ packages:
|
|||
postcss-selector-parser: 6.0.10
|
||||
dev: false
|
||||
|
||||
/sub-events/1.9.0:
|
||||
resolution: {integrity: sha512-dnFBayilG9Ku0k/lNs1Y7WV4kv91+ovCoeBV3uIYrY49DylvBb6z9d9ED2ctcrvX2YlReFalpCgJNtSgmrOaJg==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
dev: false
|
||||
|
||||
/supports-color/5.5.0:
|
||||
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
|
||||
engines: {node: '>=4'}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
id: protobuf-api
|
||||
title: Protobuf API Reference
|
||||
slug: /protobufs/api
|
||||
sidebar_label: Protobuf Reference
|
||||
---
|
||||
|
||||
|
|
153
src/pages/tools/OEM.tsx
Normal file
153
src/pages/tools/OEM.tsx
Normal file
|
@ -0,0 +1,153 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import { fromByteArray, toByteArray } from 'base64-js';
|
||||
|
||||
import { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
import Layout from '@theme/Layout';
|
||||
|
||||
const OEM = (): JSX.Element => {
|
||||
const [oemAesKey, setOemAesKey] = useState<Uint8Array>(new Uint8Array());
|
||||
const [oemFont, setOemFont] = useState<Protobuf.ScreenFonts>(
|
||||
Protobuf.ScreenFonts.FONT_MEDIUM,
|
||||
);
|
||||
const [oemIconBits, setOemIconBits] = useState<Uint8Array>(new Uint8Array());
|
||||
const [oemIconHeight, setOemIconHeight] = useState<number>(0);
|
||||
const [oemIconWidth, setOemIconWidth] = useState<number>(0);
|
||||
const [oemText, setOemText] = useState<string>('');
|
||||
const [oemBytes, setOemBytes] = useState<Uint8Array>(new Uint8Array());
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
|
||||
useEffect(() => {
|
||||
setOemBytes(
|
||||
Protobuf.OEMStore.toBinary({
|
||||
oemAesKey,
|
||||
oemFont,
|
||||
oemIconBits,
|
||||
oemIconHeight,
|
||||
oemIconWidth,
|
||||
oemText,
|
||||
}),
|
||||
);
|
||||
}, [oemAesKey, oemFont, oemIconBits, oemIconHeight, oemIconWidth, oemText]);
|
||||
|
||||
const enumOptions = Protobuf.ScreenFonts
|
||||
? Object.entries(Protobuf.ScreenFonts).filter(
|
||||
(value) => typeof value[1] === 'number',
|
||||
)
|
||||
: [];
|
||||
|
||||
const readFile = (file: File) => {
|
||||
return new Promise((resolve: (value: string) => void, reject) => {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = (res) => {
|
||||
resolve(res.target.result as string);
|
||||
};
|
||||
reader.onerror = (err) => reject(err);
|
||||
|
||||
reader.readAsText(file);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Layout title="OEM Generator" description="OEM Bin Generator">
|
||||
<div className="container mt-8 flex flex-col gap-3">
|
||||
<span>AES Key</span>
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
onClick={() => {
|
||||
const key = new Uint8Array(128 / 8);
|
||||
setOemAesKey(crypto.getRandomValues(key));
|
||||
}}
|
||||
className="cursor-pointer rounded-md bg-tertiary p-2 hover:brightness-90"
|
||||
>
|
||||
Generate 128bit
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
const key = new Uint8Array(256 / 8);
|
||||
setOemAesKey(crypto.getRandomValues(key));
|
||||
}}
|
||||
className="mr-auto cursor-pointer rounded-md bg-tertiary p-2 hover:brightness-90"
|
||||
>
|
||||
Generate 256bit
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
name="oemAesKey"
|
||||
value={fromByteArray(oemAesKey)}
|
||||
onChange={(e) => {
|
||||
setOemAesKey(toByteArray(e.target.value));
|
||||
}}
|
||||
/>
|
||||
<span>Font</span>
|
||||
<select
|
||||
onChange={(e) => {
|
||||
setOemFont(parseInt(e.target.value));
|
||||
}}
|
||||
>
|
||||
{enumOptions.map(([name, value], index) => (
|
||||
<option key={index} value={value}>
|
||||
{name}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<span>Logo XBM</span>
|
||||
<input
|
||||
type="file"
|
||||
name="file"
|
||||
onChange={(e) => {
|
||||
readFile(e.target.files[0]).then((data) => {
|
||||
setOemIconBits(
|
||||
new Uint8Array(
|
||||
data.split(',').map((s) => parseInt(s.trim(), 16)),
|
||||
),
|
||||
);
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<span>Logo Height</span>
|
||||
<input
|
||||
type="number"
|
||||
name="oemIconHeight"
|
||||
onChange={(e) => {
|
||||
setOemIconHeight(parseInt(e.target.value));
|
||||
}}
|
||||
/>
|
||||
<span>Logo Width</span>
|
||||
<input
|
||||
type="number"
|
||||
name="oemIconWidth"
|
||||
onChange={(e) => {
|
||||
setOemIconWidth(parseInt(e.target.value));
|
||||
}}
|
||||
/>
|
||||
<span>Boot Text</span>
|
||||
<input
|
||||
type="text"
|
||||
name="oemText"
|
||||
onChange={(e) => {
|
||||
setOemText(e.target.value);
|
||||
}}
|
||||
/>
|
||||
<a
|
||||
className="cursor-pointer rounded-md bg-tertiary p-2 hover:brightness-90"
|
||||
download="OEM.bin"
|
||||
onClick={() => {
|
||||
const blob = new Blob([oemBytes], {
|
||||
type: 'application/octet-stream',
|
||||
});
|
||||
window.open(URL.createObjectURL(blob));
|
||||
}}
|
||||
>
|
||||
Download
|
||||
</a>
|
||||
{oemBytes.toString()}
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default OEM;
|
BIN
static/documents/mqtt/MapFlow.jpg
Normal file
BIN
static/documents/mqtt/MapFlow.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
BIN
static/documents/mqtt/Mapping.jpg
Normal file
BIN
static/documents/mqtt/Mapping.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 191 KiB |
Loading…
Reference in a new issue