Skip to content

Instantly share code, notes, and snippets.

@grundyoso
Created November 26, 2019 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grundyoso/3e63254ce952633083dcece936da9ee4 to your computer and use it in GitHub Desktop.
Save grundyoso/3e63254ce952633083dcece936da9ee4 to your computer and use it in GitHub Desktop.
RPI0 scanning of bioconnect demo pass (ninja airlines)
pi@SmartBasket:~/passninja-cli $ node out/pn.js scan --http
>>>
>>>
>>> publishing scans via http POST to: http://localhost:3080
>>>
>>>
>>>
>>> SCANNER STARTED
>>>
>>> POLLING FOR
>>>
>>> collectorId: 77501435
>>> passTypeIdentifier: pass.com.passninja.bioconnect.demo
>>>
>>>
{"uuid":"85144f8b-66ad-46bc-97e2-69862a0cfe2a","reader":{"type":"FloBLE-Plus","serial_number":"RR499-002585","firmware":"ACR1255U-J1 SWV 3.01.00"},"type":"smart-tap","data":{"redemptions":[{"smartTapValue":"3175895186863635130.PassNinjaDemoFlightBoardingPass.a24be2dc-2e75-4c02-8a05-b67e58850216","kind":"walletobjects#flightObject"}]},"collectorId":77501435}
{ Error: connect ECONNREFUSED 127.0.0.1:3080
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1189:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3080,
config:
{ url: 'http://localhost:3080',
method: 'post',
data: '{"uuid":"85144f8b-66ad-46bc-97e2-69862a0cfe2a","reader":{"type":"FloBLE-Plus","serial_number":"RR499-002585","firmware":"ACR1255U-J1 SWV 3.01.00"},"type":"smart-tap","data":{"redemptions":[{"smartTapValue":"3175895186863635130.PassNinjaDemoFlightBoardingPass.a24be2dc-2e75-4c02-8a05-b67e58850216","kind":"walletobjects#flightObject"}]},"collectorId":77501435}',
headers:
{ Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'axios/0.19.0',
'Content-Length': 359 },
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus] },
request:
Writable {
_writableState:
WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: true,
domain: null,
_events:
{ response: [Function: handleResponse],
error: [Function: handleRequestError] },
_eventsCount: 2,
_maxListeners: undefined,
_options:
{ protocol: 'http:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/',
method: 'POST',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'localhost',
port: '3080',
nativeProtocols: [Object],
pathname: '/' },
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 359,
_requestBodyBuffers: [ [Object] ],
_onNativeResponse: [Function],
_currentRequest:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
socket: [Socket],
connection: [Socket],
_header: 'POST / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nUser-Agent: axios/0.19.0\r\nContent-Length: 359\r\nHost: localhost:3080\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/',
_ended: false,
res: null,
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: [Circular],
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object] },
_currentUrl: 'http://localhost:3080/' },
response: undefined,
isAxiosError: true,
toJSON: [Function] }
(node:2455) UnhandledPromiseRejectionWarning: TypeError: reader.disconnect is not a function
at Reader.eject (/home/pi/passninja-cli/out/pn.js:1007:18)
at Reader.<anonymous> (/home/pi/passninja-cli/out/pn.js:853:22)
at Generator.throw (<anonymous>)
at rejected (/home/pi/passninja-cli/out/pn.js:116051:65)
at <anonymous>
(node:2455) 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(). (rejection id: 4)
(node:2455) [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.
{"uuid":"e6cc7d75-276d-48eb-b00c-9c3c1b065006","reader":{"type":"FloBLE-Plus","serial_number":"RR499-002585","firmware":"ACR1255U-J1 SWV 3.01.00"},"type":"smart-tap","data":{"redemptions":[{"smartTapValue":"3175895186863635130.PassNinjaDemoFlightBoardingPass.a24be2dc-2e75-4c02-8a05-b67e58850216","kind":"walletobjects#flightObject"}]},"collectorId":77501435}
{ Error: connect ECONNREFUSED 127.0.0.1:3080
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1189:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3080,
config:
{ url: 'http://localhost:3080',
method: 'post',
data: '{"uuid":"e6cc7d75-276d-48eb-b00c-9c3c1b065006","reader":{"type":"FloBLE-Plus","serial_number":"RR499-002585","firmware":"ACR1255U-J1 SWV 3.01.00"},"type":"smart-tap","data":{"redemptions":[{"smartTapValue":"3175895186863635130.PassNinjaDemoFlightBoardingPass.a24be2dc-2e75-4c02-8a05-b67e58850216","kind":"walletobjects#flightObject"}]},"collectorId":77501435}',
headers:
{ Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'axios/0.19.0',
'Content-Length': 359 },
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus] },
request:
Writable {
_writableState:
WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: true,
domain: null,
_events:
{ response: [Function: handleResponse],
error: [Function: handleRequestError] },
_eventsCount: 2,
_maxListeners: undefined,
_options:
{ protocol: 'http:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/',
method: 'POST',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'localhost',
port: '3080',
nativeProtocols: [Object],
pathname: '/' },
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 359,
_requestBodyBuffers: [ [Object] ],
_onNativeResponse: [Function],
_currentRequest:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
socket: [Socket],
connection: [Socket],
_header: 'POST / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nUser-Agent: axios/0.19.0\r\nContent-Length: 359\r\nHost: localhost:3080\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/',
_ended: false,
res: null,
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: [Circular],
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object] },
_currentUrl: 'http://localhost:3080/' },
response: undefined,
isAxiosError: true,
toJSON: [Function] }
{"uuid":"c38d19f1-5bd2-4e10-b674-64c28b8a42f7","reader":{"type":"FloBLE-Plus","serial_number":"RR499-002585","firmware":"ACR1255U-J1 SWV 3.01.00"},"type":"smart-tap","data":{"redemptions":[{"smartTapValue":"3175895186863635130.PassNinjaDemoFlightBoardingPass.a24be2dc-2e75-4c02-8a05-b67e58850216","kind":"walletobjects#flightObject"}]},"collectorId":77501435}
{ Error: connect ECONNREFUSED 127.0.0.1:3080
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1189:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3080,
config:
{ url: 'http://localhost:3080',
method: 'post',
data: '{"uuid":"c38d19f1-5bd2-4e10-b674-64c28b8a42f7","reader":{"type":"FloBLE-Plus","serial_number":"RR499-002585","firmware":"ACR1255U-J1 SWV 3.01.00"},"type":"smart-tap","data":{"redemptions":[{"smartTapValue":"3175895186863635130.PassNinjaDemoFlightBoardingPass.a24be2dc-2e75-4c02-8a05-b67e58850216","kind":"walletobjects#flightObject"}]},"collectorId":77501435}',
headers:
{ Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'axios/0.19.0',
'Content-Length': 359 },
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus] },
request:
Writable {
_writableState:
WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: true,
domain: null,
_events:
{ response: [Function: handleResponse],
error: [Function: handleRequestError] },
_eventsCount: 2,
_maxListeners: undefined,
_options:
{ protocol: 'http:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/',
method: 'POST',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'localhost',
port: '3080',
nativeProtocols: [Object],
pathname: '/' },
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 359,
_requestBodyBuffers: [ [Object] ],
_onNativeResponse: [Function],
_currentRequest:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
socket: [Socket],
connection: [Socket],
_header: 'POST / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nUser-Agent: axios/0.19.0\r\nContent-Length: 359\r\nHost: localhost:3080\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/',
_ended: false,
res: null,
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: [Circular],
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object] },
_currentUrl: 'http://localhost:3080/' },
response: undefined,
isAxiosError: true,
toJSON: [Function] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment