9 Commits
2.83 ... 2.85

Author SHA1 Message Date
atc1441
46c8b73fa0 Added V2 ATC_BLE_OEPL Advertising Handling 2026-01-18 14:53:44 +01:00
Steven Cooreman
c65c8b749e Merge pull request #518 from stevew817/master
Add boilerplate definitions for more now-known Solum BWRY tags
2025-12-14 20:06:22 +01:00
atc1441
f61c2e3d04 Update 4E.json 2025-12-11 16:21:05 +01:00
atc1441
0dc406b865 Added M3 2.6" BW 2025-12-11 12:37:56 +01:00
Steven
25b185da28 Use correct base templates for BWRY variants 2025-12-07 19:36:58 +01:00
atc1441
496d4d382f Update contentmanager.cpp 2025-12-03 21:34:48 +01:00
atc1441
d09e89c9dd Updated the WebFiles as well 2025-11-16 22:04:44 +01:00
Steven
0e8e7b5b75 Add 11.6" BWRY and fix previous BWRY definitions 2025-10-28 23:18:15 +01:00
Steven
e8a92c4fcb Add definitions for more now-known Solum BWRY tags
https://github.com/OpenEPaperLink/Tag_FW_EFR32xG22/issues/11
2025-10-22 01:09:26 +02:00
12 changed files with 241 additions and 27 deletions

Binary file not shown.

View File

@@ -64,7 +64,7 @@ uint8_t gicToOEPLtype(uint8_t gicType) {
}
}
struct BleAdvDataStruct {
struct BleAdvDataStructV1 {
uint16_t manu_id; // 0x1337 for us
uint8_t version;
uint16_t hw_type;
@@ -73,6 +73,16 @@ struct BleAdvDataStruct {
uint16_t battery_mv;
uint8_t counter;
} __packed;
struct BleAdvDataStructV2 {
uint16_t manu_id; // 0x1337 for us
uint8_t version;
uint16_t hw_type;
uint16_t fw_version;
uint16_t capabilities;
uint16_t battery_mv;
int8_t temperature;
uint8_t counter;
} __packed;
bool BLE_filter_add_device(BLEAdvertisedDevice advertisedDevice) {
Serial.print("BLE Advertised Device found: ");
@@ -91,16 +101,16 @@ bool BLE_filter_add_device(BLEAdvertisedDevice advertisedDevice) {
uint8_t manuData[100];
if (manuDatalen > sizeof(manuData))
return false; // Manu data too big, could never happen but better make sure here
#if ESP_ARDUINO_VERSION_MAJOR == 2
memcpy(&manuData, (uint8_t*)advertisedDevice.getManufacturerData().data(), manuDatalen);
#else
// [Nic] suggested fix for arduino 3.x by copilot, but I cannot test it
memcpy(&manuData, (uint8_t*)advertisedDevice.getManufacturerData().c_str(), manuDatalen);
#endif
Serial.printf(" Address type: %02X Manu data: ", advertisedDevice.getAddressType());
for (int i = 0; i < advertisedDevice.getManufacturerData().length(); i++)
Serial.printf("%02X", manuData[i]);
Serial.printf("\r\n");
#if ESP_ARDUINO_VERSION_MAJOR == 2
memcpy(&manuData, (uint8_t*)advertisedDevice.getManufacturerData().data(), manuDatalen);
#else
// [Nic] suggested fix for arduino 3.x by copilot, but I cannot test it
memcpy(&manuData, (uint8_t*)advertisedDevice.getManufacturerData().c_str(), manuDatalen);
#endif
if (manuDatalen == 7 && manuData[0] == 0x53 && manuData[1] == 0x50) { // Lets check for a Gicisky E-Paper display
struct espAvailDataReq theAdvData;
@@ -125,23 +135,63 @@ bool BLE_filter_add_device(BLEAdvertisedDevice advertisedDevice) {
processDataReq(&theAdvData, true);
return true;
} else if (manuDatalen >= sizeof(BleAdvDataStruct) && manuData[0] == 0x37 && manuData[1] == 0x13) { // Lets check for a Gicisky E-Paper display
} else if (manuDatalen >= 3 && manuData[0] == 0x37 && manuData[1] == 0x13) { // Lets check for a Gicisky E-Paper display
Serial.printf("ATC BLE OEPL Detected\r\n");
struct espAvailDataReq theAdvData;
struct BleAdvDataStruct inAdvData;
memset((uint8_t*)&theAdvData, 0x00, sizeof(espAvailDataReq));
memcpy(&inAdvData, manuData, sizeof(BleAdvDataStruct));
/*Serial.printf("manu_id %04X\r\n", inAdvData.manu_id);
Serial.printf("version %04X\r\n", inAdvData.version);
Serial.printf("hw_type %04X\r\n", inAdvData.hw_type);
Serial.printf("fw_version %04X\r\n", inAdvData.fw_version);
Serial.printf("capabilities %04X\r\n", inAdvData.capabilities);
Serial.printf("battery_mv %u\r\n", inAdvData.battery_mv);
Serial.printf("counter %u\r\n", inAdvData.counter);*/
if (inAdvData.version != 1) {
printf("Version currently not supported!\r\n");
return false;
uint8_t versionAdvData = manuData[2];
switch (versionAdvData) {
case 1: {
if (manuDatalen >= sizeof(BleAdvDataStructV1)) {
struct BleAdvDataStructV1 inAdvData;
memcpy(&inAdvData, manuData, sizeof(BleAdvDataStructV1));
printf("Version 1 ATC_BLE_OEPL Received\r\n");
/*Serial.printf("manu_id %04X\r\n", inAdvData.manu_id);
Serial.printf("version %02X\r\n", inAdvData.version);
Serial.printf("hw_type %04X\r\n", inAdvData.hw_type);
Serial.printf("fw_version %04X\r\n", inAdvData.fw_version);
Serial.printf("capabilities %04X\r\n", inAdvData.capabilities);
Serial.printf("battery_mv %u\r\n", inAdvData.battery_mv);
Serial.printf("counter %u\r\n", inAdvData.counter);*/
theAdvData.adr.batteryMv = inAdvData.battery_mv;
theAdvData.adr.lastPacketRSSI = advertisedDevice.getRSSI();
theAdvData.adr.hwType = inAdvData.hw_type & 0xff;
theAdvData.adr.tagSoftwareVersion = inAdvData.fw_version;
theAdvData.adr.capabilities = inAdvData.capabilities & 0xff;
} else {
printf("Version 1 data length incorrect!\r\n");
return false;
}
} break;
case 2: {
if (manuDatalen >= sizeof(BleAdvDataStructV2)) {
struct BleAdvDataStructV2 inAdvData;
memcpy(&inAdvData, manuData, sizeof(BleAdvDataStructV2));
printf("Version 2 ATC_BLE_OEPL Received\r\n");
/*Serial.printf("manu_id %04X\r\n", inAdvData.manu_id);
Serial.printf("version %02X\r\n", inAdvData.version);
Serial.printf("hw_type %04X\r\n", inAdvData.hw_type);
Serial.printf("fw_version %04X\r\n", inAdvData.fw_version);
Serial.printf("capabilities %04X\r\n", inAdvData.capabilities);
Serial.printf("battery_mv %u\r\n", inAdvData.battery_mv);
Serial.printf("temperature %i\r\n", inAdvData.temperature);
Serial.printf("counter %u\r\n", inAdvData.counter);*/
theAdvData.adr.batteryMv = inAdvData.battery_mv;
theAdvData.adr.temperature = inAdvData.temperature;
theAdvData.adr.lastPacketRSSI = advertisedDevice.getRSSI();
theAdvData.adr.hwType = inAdvData.hw_type & 0xff;
theAdvData.adr.tagSoftwareVersion = inAdvData.fw_version;
theAdvData.adr.capabilities = inAdvData.capabilities & 0xff;
} else {
printf("Version 2 data length incorrect!\r\n");
return false;
}
} break;
default:
printf("Version %02X currently not supported!\r\n", versionAdvData);
return false;
break;
}
uint8_t macReversed[6];
memcpy(&macReversed, (uint8_t*)advertisedDevice.getAddress().getNative(), 6);
@@ -153,11 +203,6 @@ bool BLE_filter_add_device(BLEAdvertisedDevice advertisedDevice) {
theAdvData.src[5] = macReversed[0];
theAdvData.src[6] = manuData[0]; // We use this do find out what type of display we got for compression^^
theAdvData.src[7] = manuData[1];
theAdvData.adr.batteryMv = inAdvData.battery_mv;
theAdvData.adr.lastPacketRSSI = advertisedDevice.getRSSI();
theAdvData.adr.hwType = inAdvData.hw_type & 0xff;
theAdvData.adr.tagSoftwareVersion = inAdvData.fw_version;
theAdvData.adr.capabilities = inAdvData.capabilities & 0xff;
processDataReq(&theAdvData, true);
return true;
}

View File

@@ -3135,7 +3135,7 @@ uint32_t convert_tm_to_seconds(struct tm *t) {
void prepareTIME_RAW(const uint8_t *dst, time_t now) {
uint8_t *data;
size_t len = 1 + 4 + 4;
size_t len = 1 + 4 + 4 + 1;
struct tm timeinfo;
localtime_r(&now, &timeinfo);
uint32_t local_time = convert_tm_to_seconds(&timeinfo) + 20;// Adding 20 seconds for the average of upload time
@@ -3151,6 +3151,7 @@ void prepareTIME_RAW(const uint8_t *dst, time_t now) {
data[7] = ((uint8_t*)&unix_time)[1];
data[8] = ((uint8_t*)&unix_time)[2];
data[9] = ((uint8_t*)&unix_time)[3];
data[10] = 1; // Design, 1 = Full DateTime 2 = Just Time Segment Style
prepareDataAvail(data, len + 1, DATATYPE_TIME_RAW_DATA, dst);
}
#endif

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"name": "M3 2.9\" BWRY",
"width": 384,
"height": 168,
"rotatebuffer": 3,
"bpp": 2,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 255, 255, 0 ]
},
"perceptual": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 200, 200, 0 ]
},
"shortlut": 0,
"zlib_compression": "27",
"options": [ "led" ],
"contentids": [ 22, 23, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 14, 16, 17, 18, 19, 20, 21, 27 ],
"usetemplate": 51
}

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"name": "M3 4.3\" BWRY",
"width": 522,
"height": 152,
"rotatebuffer": 3,
"bpp": 2,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 255, 255, 0 ]
},
"perceptual": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 200, 200, 0 ]
},
"shortlut": 0,
"zlib_compression": "27",
"options": [ "led" ],
"contentids": [ 22, 23, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 14, 16, 17, 18, 19, 20, 21, 27 ],
"usetemplate": 47
}

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"name": "M3 1.6\" 200px BWRY",
"width": 200,
"height": 200,
"rotatebuffer": 0,
"bpp": 2,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 255, 255, 0 ]
},
"perceptual": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 200, 200, 0 ]
},
"shortlut": 0,
"zlib_compression": "27",
"options": [ "led" ],
"contentids": [ 22, 23, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 14, 16, 17, 18, 19, 20, 21, 27 ],
"usetemplate": 48
}

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"name": "M3 2.2\" BWRY",
"width": 296,
"height": 160,
"rotatebuffer": 3,
"bpp": 2,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 255, 255, 0 ]
},
"perceptual": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 200, 200, 0 ]
},
"shortlut": 0,
"zlib_compression": "27",
"options": [ "led" ],
"contentids": [ 22, 23, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 14, 16, 17, 18, 19, 20, 21, 27 ],
"usetemplate": 49
}

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"name": "M3 7.5\" BWRY",
"width": 800,
"height": 480,
"rotatebuffer": 0,
"bpp": 2,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 255, 255, 0 ]
},
"perceptual": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 200, 200, 0 ]
},
"shortlut": 0,
"zlib_compression": "27",
"options": [ "led" ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"usetemplate": 54
}

View File

@@ -0,0 +1,25 @@
{
"version": 3,
"name": "M3 11.6\" BWRY",
"width": 960,
"height": 640,
"rotatebuffer": 0,
"bpp": 2,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 255, 255, 0 ]
},
"perceptual": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ],
"yellow": [ 200, 200, 0 ]
},
"shortlut": 0,
"zlib_compression": "27",
"options": [ "led" ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"usetemplate": 55
}

View File

@@ -0,0 +1,18 @@
{
"version": 2,
"name": "M3 2.6\" BW",
"width": 360,
"height": 184,
"rotatebuffer": 3,
"bpp": 1,
"colortable": {
"white": [ 255, 255, 255 ],
"black": [ 0, 0, 0 ]
},
"highlight_color": 5,
"shortlut": 0,
"zlib_compression": "27",
"options": [ "button", "led" ],
"contentids": [ 22, 23, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 16, 17, 18, 19, 20, 26, 27 ],
"usetemplate": 1
}