Question/Issue:
On Ubuntu 24.01 connecting to Grove Vision AI Module V2 via edge-impulse-daemon, device is shown in device list. Collect-Data for camera seems to work. Collect data for microphone fails with error message “Failed to start sampling - sample length is too long, maximum allowed 0 ms”.
Changing to 0ms triggers sampling at the device - but returns no data
Project ID:
Context/Use case:
Want to use the board for voice-sampling.
Summary:
Error message on start of sampling via microphone:
“Failed to start sampling - sample length is too long, maximum allowed 0 ms”.
Steps to Reproduce:
- Connect device via command-line
2.Check device is visible - Data collection for microphone
Expected Results:
Sampling to start
Actual Results:
“Failed to start sampling - sample length is too long, maximum allowed 0 ms”.
When using with “0” connections works, but doesnt sample anything
Reproducibility:
- [x] Always
- [ ] Sometimes
- [ ] Rarely
Environment:
Ubuntu 24.01 LTS
Log
From a sampling request with sample length=0
`[WS ] Incoming sampling request {
path: ‘/api/training/data’,
label: ‘GoodWatch’,
length: 0,
interval: 0.0625,
hmacKey: ‘05bb29fd95e125b7576d0fbad943a00e’,
sensor: ‘Microphone’
}
[SER] Configured upload settings
[SER] Sampling started
[SER] Sampling done
[SER] Device not connected to WiFi directly, reading from buffer (bytes 0 - 172, expecting to read ~229 bytes…
[SER] Reading from buffer OK
[SER] File is 172 bytes after decoding
[SER] Uploading to https://ingestion.edgeimpulse.com/api/training/data
[SER] Failed to upload to https://ingestion.edgeimpulse.com/api/training/data StatusCodeError: 400 - “Payload is missing, or payload length is 0”
at new StatusCodeError (/home/development/.nvm/versions/node/v21.6.1/lib/node_modules/edge-impulse-cli/node_modules/request-promise-core/lib/errors.js:32:15)
at plumbing.callback (/home/development/.nvm/versions/node/v21.6.1/lib/node_modules/edge-impulse-cli/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/development/.nvm/versions/node/v21.6.1/lib/node_modules/edge-impulse-cli/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/home/development/.nvm/versions/node/v21.6.1/lib/node_modules/edge-impulse-cli/node_modules/request/request.js:185:22)
at Request.emit (node:events:519:28)
at Request. (/home/development/.nvm/versions/node/v21.6.1/lib/node_modules/edge-impulse-cli/node_modules/request/request.js:1161:10)
at Request.emit (node:events:519:28)
at IncomingMessage. (/home/development/.nvm/versions/node/v21.6.1/lib/node_modules/edge-impulse-cli/node_modules/request/request.js:1083:12)
at Object.onceWrapper (node:events:633:28)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
statusCode: 400,
error: ‘Payload is missing, or payload length is 0’,
options: {
headers: {
‘x-api-key’: ‘ei_cdd32720e0ce0c2db0cad1808ebffed94fd9b84d09087c9a4a67b7f91dfd2f45’,
‘x-file-name’: ‘GoodWatch’,
‘x-label’: ‘GoodWatch’,
‘Content-Type’: ‘application/octet-stream’
},
body: <Buffer a3 69 70 72 6f 74 65 63 74 65 64 a2 63 76 65 72 62 76 31 63 61 6c 67 64 6e 6f 6e 65 69 73 69 67 6e 61 74 75 72 65 62 33 30 67 70 61 79 6c 6f 61 64 a5 … 122 more bytes>,
encoding: ‘binary’,
uri: ‘https://ingestion.edgeimpulse.com/api/training/data’,
method: ‘POST’,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: <ref 1> IncomingMessage {
_events: {
close: [Array],
error: [Function (anonymous)],
data: [Function (anonymous)],
end: [Array],
readable: undefined
},
_readableState: ReadableState {
highWaterMark: 16384,
buffer: [],
bufferIndex: 0,
length: 0,
pipes: [],
awaitDrainWriters: null,
[Symbol(kState)]: 200804220,
[Symbol(kDecoderValue)]: [StringDecoder],
[Symbol(kEncodingValue)]: ‘latin1’
},
_maxListeners: undefined,
socket: null,
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: ‘1.1’,
complete: true,
rawHeaders: [
‘Date’,
‘Sun, 01 Sep 2024 20:31:43 GMT’,
‘Content-Type’,
‘text/plain’,
‘Transfer-Encoding’,
‘chunked’,
‘Connection’,
‘keep-alive’,
‘Access-Control-Allow-Origin’,
'‘,
‘Content-Security-Policy’,
“default-src ‘none’; frame-ancestors ‘none’; form-action ‘none’;”,
‘X-Content-Type-Options’,
‘nosniff’,
‘X-Frame-Options’,
‘DENY’,
‘X-XSS-Protection’,
‘1; mode=block’,
‘Referrer-Policy’,
‘strict-origin’,
‘Cache-Control’,
‘s-maxage=0,public,no-cache,no-store,must-revalidate’,
‘Strict-Transport-Security’,
‘max-age=63072000’
],
rawTrailers: [],
joinDuplicateHeaders: undefined,
aborted: false,
upgrade: false,
url: ‘’,
method: null,
statusCode: 400,
statusMessage: ‘Bad Request’,
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: ‘ingestion.edgeimpulse.com’,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: ‘ingestion.edgeimpulse.com’,
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_writableState: [WritableState],
allowHalfOpen: false,
_maxListeners: undefined,
_sockname: null,
_pendingData: null,
_pendingEncoding: ‘’,
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
timeout: 5000,
parser: null,
_httpMessage: null,
autoSelectFamilyAttemptedAddresses: [Array],
[Symbol(alpncallback)]: null,
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: -1,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: Timeout {
_idleTimeout: 5000,
_idlePrev: [TimersList],
_idleNext: [TimersList],
_idleStart: 233999,
_onTimeout: [Function: bound ],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 1949,
[Symbol(triggerId)]: 1946
},
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 1,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: true,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 172,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: true,
_header: ‘POST /api/training/data HTTP/1.1\r\n’ +
‘x-api-key: ei_cdd32720e0ce0c2db0cad1808ebffed94fd9b84d09087c9a4a67b7f91dfd2f45\r\n’ +
‘x-file-name: GoodWatch\r\n’ +
‘x-label: GoodWatch\r\n’ +
‘Content-Type: application/octet-stream\r\n’ +
‘host: ingestion.edgeimpulse.com\r\n’ +
‘content-length: 172\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/api/training/data’,
_ended: true,
res: [Circular *1],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: ‘ingestion.edgeimpulse.com’,
protocol: ‘https:’,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: [TLSSocket],
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_eventsCount: 4,
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
headers: [Object],
body: <Buffer a3 69 70 72 6f 74 65 63 74 65 64 a2 63 76 65 72 62 76 31 63 61 6c 67 64 6e 6f 6e 65 69 73 69 67 6e 61 74 75 72 65 62 33 30 67 70 61 79 6c 6f 61 64 a5 … 122 more bytes>,
encoding: ‘binary’,
uri: [Url],
method: ‘POST’,
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function (anonymous)],
_rp_reject: [Function (anonymous)],
_rp_promise: [Promise [Object]],
_rp_callbackOrig: undefined,
callback: [Function (anonymous)],
_rp_options: [Object],
setHeader: [Function (anonymous)],
hasHeader: [Function (anonymous)],
getHeader: [Function (anonymous)],
removeHeader: [Function (anonymous)],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: ‘ingestion.edgeimpulse.com’,
path: ‘/api/training/data’,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: ‘https://ingestion.edgeimpulse.com/api/training/data’,
req: [ClientRequest],
ntick: true,
response: [Circular *1],
originalHost: ‘ingestion.edgeimpulse.com’,
originalHostHeaderName: ‘host’,
responseContent: [Circular 1],
_destdata: true,
_ended: true,
_callbackCalled: true,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: ‘Payload is missing, or payload length is 0’,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
date: ‘Sun, 01 Sep 2024 20:31:43 GMT’,
‘content-type’: ‘text/plain’,
‘transfer-encoding’: ‘chunked’,
connection: ‘keep-alive’,
‘access-control-allow-origin’: '’,
‘content-security-policy’: “default-src ‘none’; frame-ancestors ‘none’; form-action ‘none’;”,
‘x-content-type-options’: ‘nosniff’,
‘x-frame-options’: ‘DENY’,
‘x-xss-protection’: ‘1; mode=block’,
‘referrer-policy’: ‘strict-origin’,
‘cache-control’: ‘s-maxage=0,public,no-cache,no-store,must-revalidate’,
‘strict-transport-security’: ‘max-age=63072000’
},
[Symbol(kHeadersCount)]: 24,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
}
}
`