Connecting STM32

Hello there
for a school project I need to recognize a clap by using machine learning. Searching the web for information I came across Edge Impulse. I tried it out because it looked really cool but I have multiple issues when getting started.

  1. I can’t connect my board to the webinterface.
  2. My node.js always tells me “Uncaught SyntaxError: Unexpected identifier” when i type something in it.

I checked multiple tutorials and some different discussion, also checked some youtube videos but nothing seems to help.

Anybody got some ideas?

Thanks in advance.

Hi @Calamitatos,

Which board are you trying to connect? Also could you share the full logs from the CLI command?

Thanks,
Aurelien

1 Like

Also, which Node.js version are you using? You’ll need Node.js 12 or higher. I’ve seen that error when you have an old version.

Hey @aurel .
I am usign the STEVAL STWINKT1.

$ edge-impulse-data-forwarder
$ edge-impulse-data-forwarder
^^^^

Uncaught SyntaxError: Unexpected identifier

Thanks,

@janjongboom I am using v14.15.1 since it got recommended during the installation process.

Where do you run this command? You should not run node.js first, just open a command prompt or terminal window and run:

edge-impulse-data-forwarder

Either in the command window or node.js it doesn’t work.

This is strange, I updated my Node.js to 14.15.1 and don’t have any issue.

Can you reinstall with:

npm uninstall -g edge-impulse-cli
npm install -g edge-impulse-cli

and copy the full logs from your terminal?

If you’re on Windows:

  1. Open your Windows menu and search for cmd:

  1. Just type edge-impulse-data-forwarder and press Enter:

  1. Should run:

On macOS:

  1. Open Terminal.app
  2. Just type `edge-impulse-data-forwarder:

  1. Should run:

@aurel Reinstalling did the trick.
@janjongboom Now I was able to type in the command.

But it doesn’t receive any data from the board. Probably need to change the code. Thanks for the help you two.

? What is your password? [hidden]
Endpoints:
Websocket:
API:
Ingestion:

? Which device do you want to connect to? COM4 (STMicroelectronics)
[SER] Connecting to COM4
[SER] Serial is connected (00:23:00:2E:35:38:51:11:33:36:37:30)
[WS ] Connecting to wss://remote-mgmt.edgeimpulse.com
[WS ] Connected to wss://remote-mgmt.edgeimpulse.com
[SER] Detecting data frequency…
[SER] Failed to get information off device No valid sensor readings received from device:
[SER] Detecting data frequency…
(node:12700) UnhandledPromiseRejectionWarning: Error: No valid sensor readings received from device:
at getSensorInfo (C:\Users\luki\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\data-forwarder.js:524:15)
at async getAndConfigureProject (C:\Users\luki\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\data-forwarder.js:450:22)
at async Timeout.sendHello [as _onTimeout] (C:\Users\luki\AppData\Roaming\npm\node_modules\edge-impulse-cli\build\cli\data-forwarder.js:147:21)
(Use node --trace-warnings ... to show where the warning was created)
(node:12700) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12700) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Yeah you’ll need to send in baud rate 115200, and separate data readings by spaces (one for every sensor axis) and by lines (per time period).