Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash deinit(true) #724

Open
AlexSmirnov9107 opened this issue Oct 1, 2024 · 1 comment
Open

Crash deinit(true) #724

AlexSmirnov9107 opened this issue Oct 1, 2024 · 1 comment

Comments

@AlexSmirnov9107
Copy link

AlexSmirnov9107 commented Oct 1, 2024

NimBle installed from zip from master branch

        BLEDevice::init(deviceName);
	BLEDevice::setSecurityAuth(true, true, true); // Disable bonding, MITM, and secure connections
	BLEDevice::setSecurityIOCap(BLE_HS_IO_NO_INPUT_OUTPUT);
	// BLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY);
	// BLE_HS_IO_DISPLAY_ONLY
	// BLEDevice::setSecurityPasskey(123456);

	pServer = BLEDevice::createServer();
	pServer->setCallbacks(this);

	hid = new BLEHIDDevice(pServer);
	inputKeyboard = hid->inputReport(KEYBOARD_ID); // <-- input REPORTID from report map
	outputKeyboard = hid->outputReport(KEYBOARD_ID);
	inputMediaKeys = hid->inputReport(MEDIA_KEYS_ID);

	hid->manufacturer()->setValue(deviceManufacturer);

	hid->pnp(0x02, 0xe502, 0xa111, 0x0210);
	hid->hidInfo(0x00, 0x01);

	hid->reportMap((uint8_t *)_hidReportDescriptor, sizeof(_hidReportDescriptor));
	hid->setBatteryLevel(batteryLevel);
	hid->startServices();
	pCustomService = pServer->createService(CUSTOM_SERVICE_UUID);
	pCustomCharacteristic = pCustomService->createCharacteristic(
		CUSTOM_CHARACTERISTIC_UUID,
		NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
	pCustomService->start();

	onStarted(pServer);

	advertising = pServer->getAdvertising();
	advertising->setAppearance(HID_KEYBOARD);
	advertising->addServiceUUID(hid->hidService()->getUUID());
	advertising->setScanResponse(false);
	advertising->addServiceUUID(CUSTOM_SERVICE_UUID);
	advertising->start();

Caliing deinit(true) produce crash

13:45:51.332 -> 
13:45:51.332 -> 
13:45:51.332 -> Backtrace: 0xfffffffd:0x3ffc86f0 0x400d573c:0x3ffc8710 0x400d4e27:0x3ffc8730 0x400d30fe:0x3ffc8750 0x400d2ce9:0x3ffc8770 0x400e85e4:0x3ffc87d0 0x40095cee:0x3ffc87f0
13:45:51.332 -> 
13:45:51.332 -> 
13:45:51.332 -> 
13:45:51.332 -> 
13:45:51.332 -> ELF file SHA256: 1e895c879a3550a0
13:45:51.332 -> 
13:45:51.462 -> Rebooting...
13:45:51.462 -> ets Jul 29 2019 12:21:46
13:45:51.462 -> 
13:45:51.462 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:45:51.494 -> configsip: 0, SPIWP:0xee
13:45:51.494 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:45:51.494 -> mode:DIO, clock div:1
13:45:51.494 -> load:0x3fff0030,len:4604
13:45:51.494 -> ho 0 tail 12 room 4
13:45:51.494 -> load:0x40078000,len:15488
13:45:51.494 -> load:0x40080400,len:4
13:45:51.494 -> load:0x40080404,len:3180
13:45:51.494 -> entry 0x400805b8
@AlexSmirnov9107 AlexSmirnov9107 changed the title Crash deinit Crash deinit(true) Oct 1, 2024
@h2zero
Copy link
Owner

h2zero commented Oct 2, 2024

Thanks for the report, could you provide more logs and if possible a decode of the backtrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants