eriptic / uoscore-uedhoc

C implementations for constrained (and non-constrained) devices of the IETF protocols OSCORE and EDHOC
Other
15 stars 15 forks source link

Error code: -1 on ESP32 responder linux initatior #66

Open Reneta2003 opened 1 month ago

Reneta2003 commented 1 month ago

Hello, I am trying to replicate the steps from https://github.com/eriptic/uoscore-uedhoc/blob/a03997fc698db562527d95ea531985678d7a0954/samples/zephyr_edhoc/README.MD but after flashing onto the ESP-32 that I'm using, I don't see

uart:~$ Booting Zephyr OS build zephyr-v3.1.0-4283-g5108c4f21d3d [00:00:00.264,709] bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) [00:00:00.264,739] bt_hci_core: HW Variant: nRF52x (0x0002) [00:00:00.264,770] bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.1 Build 99 [00:00:00.265,686] bt_hci_core: Identity: D0:21:3D:B1:36:09 (random) [00:00:00.265,716] bt_hci_core: HCI: version 5.3 (0x0c) revision 0x0000, manufacturer 0x05f1 [00:00:00.265,716] bt_hci_core: LMP: version 5.3 (0x0c) subver 0xffff uart:~$ IPv6 server with address 2001:db8::1 started! waiting to receive message 1... waiting to receive in rx()

but rather, I see

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3ffbdb60,len:18224 load:0x40080000,len:121216 1162 mmu set 00010000, pos 00010000 1162 mmu set 00020000, pos 00020000 entry 0x4008f364 I (75) boot: ESP Simple boot I (75) boot: compile time Jun 7 2024 15:10:21 W (75) boot: Unicore bootloader I (75) spi_flash: detected chip: generic I (78) spi_flash: flash io: dio I (81) boot: chip revision: v1.0 I (84) boot.esp32: SPI Speed : 40MHz I (87) boot.esp32: SPI Mode : DIO I (91) boot.esp32: SPI Flash Size : 4MB I (94) boot: Enabling RNG early entropy source... [esp32] [INF] DRAM: lma 0x00001020 vma 0x3ffbdb60 len 0x4730 (18224) [esp32] [INF] IRAM: lma 0x00005758 vma 0x40080000 len 0x1d980 (121216) [esp32] [INF] padd: lma 0x000230e8 vma 0x00000000 len 0xcf10 (53008) [esp32] [INF] IMAP: lma 0x00030000 vma 0x400d0000 len 0x43ef4 (278260) [esp32] [INF] padd: lma 0x00073efc vma 0x00000000 len 0xc0fc (49404) [esp32] [INF] DMAP: lma 0x00080000 vma 0x3f400000 len 0x13724 (79652) [esp32] [INF] Image with 6 segments [esp32] [INF] DROM segment: paddr=00080000h, vaddr=3f400000h, size=13724h ( 79652) map [esp32] [INF] IROM segment: paddr=00030000h, vaddr=400d0000h, size=43EF4h (278260) map

Booting Zephyr OS build v3.6.0-5587-g2d44b48cec84 error during socket initialization (error code: -1)waiting to receive message 1... waiting to receive in rx()

in the serial monitor, do you have an idea what I can do to resolve this issue?

StefanHri commented 1 month ago

It looks like your network configuration is not working. But if you have an ESP32 you may want to use wifi instead of BLE. Just make sure that you can send and receive messages. Then implement tx() and rx() functions as described in https://github.com/eriptic/uoscore-uedhoc/tree/a03997fc698db562527d95ea531985678d7a0954?tab=readme-ov-file#uedhoc