diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 1d731f6b7..e5be8f86c 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 f0756cb89..ebbbde7a2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -71,6 +71,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 9781cbf56..44bd57448 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 @@ -492,6 +492,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 1c6bdabcf..555e0c775 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -12,6 +12,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}