Ryder Simulator Tutorial

Ryder V2 prototype

Intro

Pre-requisite

Download and setup

Installing Ryder-CLI

npm install -g @lightlabs/ryder-cli-proto
ryder-cli-proto –-help

Downloading & installing com0com

Status for device COM4: 
-----------------------
Baud: 1200
Parity: None
Data Bits: 7
Stop Bits: 1
Timeout: OFF
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit:
ON RTS circuit: ON
Status for device COM5:
-----------------------
Baud: 1200
Parity: None
Data Bits: 7
Stop Bits: 1
Timeout: OFF
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit: ON
RTS circuit: ON

Downloading the Ryder simulator

cd Documents/Ryder/ryder-sim-v2-win64_0.0.2
ryder-sim-v2-win64.exe COM4

Setting up device

ryder-cli-proto setup -R 'COM5'
ryder-cli-proto export identity 0 https://ryder.id -R 'COM5'

RyderSerial JS library

npm install @lightlabs/ryderserial-proto
const RyderSerial = require('ryderserial-proto');
let ryder_port = 'COM5';
const options = {
reconnectTime: 1000, // how long to wait before reconnect (ms).
debug: true // enable debug output to stdout.
};
const ryder_serial = new RyderSerial(ryder_port, options);
ryder_serial.on('open', async ()=>
{
const response = await ryder_serial.send(RyderSerial.COMMAND_INFO);
console.log(response);
const appkeyresponse = await request_app_key(0, 'https://ryder.id');
console.log(`Response: ${appkeyresponse}`)
});
async function request_app_key(identity_number,app_domain){
const data = [RyderSerial.COMMAND_EXPORT_APP_KEY,identity_number];
const response = await ryder_serial.send(data);
if (response === RyderSerial.RESPONSE_SEND_INPUT)
{
// Send the app domain terminated by a null byte.
const app_key = await ryder_serial.send(`${app_domain}\0`);
// app key will be RyderSerial.RESPONSE_REJECTED if the user
// presses Cancel, otherwise the response will be in the following
// format:
// "https://ryder.id,app_key_here"
return app_key;
}else{
console.log('Signin rejected by user');
}
}

Get going

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

ACID Properties in DBMS

Seamless Deployment of AWS VPC Interface Endpoints without any Downtime

Centralize VPC interface endpoint

Learning in Reverse

Calculating the Error on JupyterLab

It’s about the process…

How to Write an Effective Mobile App Product Requirements Document?

What to Expect from a Drupal 9 CMS Upgrade

Computer code

Let’s see if Flipper can make me a 1.1x engineer 🧐

Website of Flipper

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Niclas Wimmerstedt

Niclas Wimmerstedt

More from Medium

Overview of the AXELAR project

Dante Pro lab Review

Kaira Network

The Story Behind the Image: Skywalker #03