OpenEarable / open-earable

OpenEarable Arduino firmware.
MIT License
249 stars 33 forks source link

Burning bootloader #75

Closed knightron0 closed 11 months ago

knightron0 commented 11 months ago

Are there steps available anywhere to burn this bootloader onto an OpenEarable device that we built ourselves? The webpage mentions briefly about flashing the bootloader and then uploading the latest firmware via Arduino, but we were wondering if there's a more detailed README available!

TobiasRoeddiger commented 11 months ago

Hi, you‘ll need a J-Link Programmer. Then connect the Jlink to the 4 pads on the back of the main pcb and power OpenEarable via USB (make sure it‘s switched on). Then you can flash the bootloader using JFlash-Light from your computer.

knightron0 commented 11 months ago

Just to confirm, does it matter if we specifically use a J-Link programmer to do this? This tutorial mentions that we can use an AVR-ISP (in-system programmer), USBtinyISP or build a ParallelProgrammer. We also have an ST-Link programmer available so were wondering if there's a specific reason that the J-Link programmer is recommended?

TobiasRoeddiger commented 11 months ago

The ST-Link may work as it supports SWD. You may also use something like this: https://www.waveshare.com/arm-debugger.htm

However, we only have used J-Link to flash OpenEarable so I can not confirm it works with these alternatives.

knightron0 commented 10 months ago

Using an ST-Link programmer to program the chip is not well documented (see this).

Secondly, what is the software to be used with the ARM debugger? I can't seem to get it to work with J-Flash or the Keil IDE.

TobiasRoeddiger commented 10 months ago

We recommend using J-Link, we do not support the other options, sorry.

knightron0 commented 9 months ago

yep — it worked, thank you! just another question though — how does the microphone interface work? i can't seem to find any recordings on my SD card (it's exFAT formatted and the recommended one). is there a way via arduino/the dashboard i can just record audio?

all I'm getting in my SD card right now are just some 44 byte wav files every time i connect the openEarable to the dashboard. are there some triggers on when the device starts/stops recording audio?

TobiasRoeddiger commented 9 months ago

Have you tried using the record audio feature of the dashboard? https://openearable.github.io/dashboard/

knightron0 commented 9 months ago

The recorder section on the bottom right? Yes, I tried turning that on multiple times but all but once it just gave me an empty CSV file. I haven't gotten audio through that though, just some sensor readings (which were all constant for some reason).

TobiasRoeddiger commented 9 months ago

Hi, Sorry for the confusion:

knightron0 commented 9 months ago

Thank you — seems like it worked!

knightron0 commented 9 months ago

oops, really sorry for the constant questions but i just had a few more. i was trying to get audio data over BLE through the dashboard. however, when i start recording through the dashboard, i don't seem to collect any data (pressure/accelerometer) via BLE.

my plan was to just save the PDM mic data in the subscribeOnSensorDataReceived in RecordingManager.js but it seems like it's not being executed. any tips to debug? is there a better way to collect audio data through BLE or an example i can try to verify that it works?

TobiasRoeddiger commented 9 months ago

The current version of OpenEarable v1.3 does not have wireless audio streaming. You might try implementing it yourself but you can only achieve streaming rates of up to 15kHz, assuming all other sensors are turned off.

knightron0 commented 9 months ago

got it, i'll try and see how far i get. in the meanwhile, could you give some pointers on how to debug the blank recording issue? like the pressure etc sensors also don't return any data?