diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 03a8a6583..9ca33b80a 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -39,6 +39,7 @@ build_flags = -Isrc/platform/portduino -DRADIOLIB_EEPROM_UNSUPPORTED -DPORTDUINO_LINUX_HARDWARE + -DNXP_WIRE=Wire -DHAS_UDP_MULTICAST -lpthread -lstdc++fs diff --git a/platformio.ini b/platformio.ini index c0eb6fedb..a1d8880b0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -74,6 +74,8 @@ lib_deps = nanopb/Nanopb@0.4.91 # renovate: datasource=custom.pio depName=ErriezCRC32 packageName=erriez/library/ErriezCRC32 erriez/ErriezCRC32@1.0.1 + https://github.com/meshtastic/SE05X#031f8feccae62689ebbd06914b44bd88547535af + ; Used for the code analysis in PIO Home / Inspect check_tool = cppcheck diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 9e9441123..861088470 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -1,8 +1,8 @@ #include "ScanI2CTwoWire.h" #if !MESHTASTIC_EXCLUDE_I2C - #include "concurrency/LockGuard.h" +#include #if defined(ARCH_PORTDUINO) #include "linux/LinuxHardwareI2C.h" #endif @@ -507,6 +507,10 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) if (len == 5 && memcmp(expectedInfo, info, len) == 0) { LOG_INFO("NXP SE050 crypto chip found"); type = NXP_SE050; + if (SE05X.begin()) { + LOG_INFO("NXP Random %u", SE05X.random(65535)); + LOG_INFO("NXP Serial Number: %s", SE05X.serialNumber().c_str()); + } } else { LOG_INFO("FT6336U touchscreen found"); diff --git a/variants/rak4631/platformio.ini b/variants/rak4631/platformio.ini index ee134e87a..7926e6acb 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -11,6 +11,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631 -DRADIOLIB_EXCLUDE_SX128X=1 -DRADIOLIB_EXCLUDE_SX127X=1 -DRADIOLIB_EXCLUDE_LR11X0=1 + -DNXP_WIRE=Wire build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> + + + lib_deps = ${nrf52840_base.lib_deps}