echicken / node-dra818

Control a Dorji DRA818 module on a serial port using node.js.
5 stars 1 forks source link

Access the prog-818 via a webinterface #1

Open ghost opened 6 years ago

ghost commented 6 years ago

Hello, I'm very happy with the code you wrote to programm sa818 modules.Very handy. I have just a question, how would it be possible to "call" the prog-818 code from a webinterface? I'm thinking on our windoze users which have always to install putty to access a terminal, login with ssh etc and then access the prog818 code to change a simple frequencie.This all when the moduleis connected to a Orange or Raspberry Pi. On the market you can find orange pi compatible pcb boards where you can fit a sa818 module, and a few components, and having a transmitter running...within an hour soldering... A lot of Hamradio operators dont want to know about (tricky) terminal commands instaed having a webinterface, just opening in a web browser... Thanks for comments Hans F4VSJ@florhans.bzh

echicken commented 6 years ago

Hi Hans,

This is a node.js module and it's designed to be included in other projects. It could definitely be incorporated into a simple web application that adjusts settings on an 818 module.

It's difficult to give a quick answer on how to do that without diving into a lot of example code. I would start by setting up an Express web application and then adding some routes to it, for example:

router.get( '/volume/:v', (req, res, next) => { dra818.volume = req.params.v; } ); A web page/view would need to be created to take input from the user and send queries to the appropriate routes on the server.

I hope that gives you the general idea.

ghost commented 6 years ago

Ok Thanks a lot for the explications I'll look after this possibilities with some body who can use this code an include on a website I'll let you know an maybe you are interested to publish as well

Hans f4vsj

Sent from my iPhone

On 26 Jun 2018, at 19:36, echicken notifications@github.com wrote:

Hi Hans,

This is a node.js module and it's designed to be included in other projects. It could definitely be incorporated into a simple web application that adjusts settings on an 818 module.

It's difficult to give a quick answer on how to do that without diving into a lot of example code. I would start by setting up an Express web application and then adding some routes to it, for example:

router.get( '/volume/:v', (req, res, next) => { dra818.volume = req.params.v; } ); A web page/view would need to be created to take input from the user and send queries to the appropriate routes on the server.

I hope that gives you the general idea.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.