219
Views
16
Comments
Connection with a Port COM (Serial)
Question

Hi, I need to read the weight from a scale installed on a COM (Serial) port in an application developed in outsystems, someone did something similar or  have any idea how to enhance this conversation between application and peripherals in the machine??

mvp_badge
MVP
Rank: #6

Hi Guilherme,

Man... You are swimming in deep water, without safe devices... lol

OutSystems applications, being web applications, have some limitations.

One of them is that the app runs in a browser, for security reasons, basically prevents you from accessing the client machine (hardware included).

So, you will mostly NOT be able to access the com port directly from the OutSystems app.

I recommend reading this: https://stackoverflow.com/questions/15171522/how-can-a-web-page-read-from-the-users-serial-port-in-the-year-2017

Basically, you will have to create a native app that will be able to connect to your app (websockets or webservice) and you will retrieve the info through it.

Maybe someone else knows an easier way, but I don't think so...

Anyway, good luck!

Cheers

Eduardo Jauch

Rank: #3893

thanks man, i gonna study about this, i started my work with outsystems at 3 month ago and this is my first real difficult, i saw somenthing about uses a node.js aplication running in second plane on my client listening the COM port, and the aplication send the content for browser by a port, i'm so happy to know that i can have fast support in community, again, thanks


Cheers


Guilherme Silva

Hi Guilherme,

I am doing a similar development, but from an android device.  Have you been successful in the integration?  My route that I am taking is Cordova plugins from a native app, but serial plugin integration seems more difficult that I expected.

Thanks

Rank: #1463

Hi Guilherme,

Have you done the integration?

I am also stuck in the same dependency.

If you got the answer, please be needful.


Thanks,

Kalai

Hi Kalai, 

Are you on Mobile or web?  What are you trying to achieve?


mvp_badge
MVP
Rank: #2

Hi Kalai,

Did you read the previous answer, e.g. the one by Eduardo? OutSystems Web Apps run on a server, which is probably somewhere in the cloud. That server can't reach whatever you attach to your laptop (and that's a good thing!). There are various possible solutions for this, but if you haven't thought of them yourself, they're probably way over your head :).

Rank: #1463


Thanks Killan for your reply,

I think of creating the SOAP or Rest service to access the ports and consume it in the Web / Mobile apps.

Whether is the good idea to proceed to work on this?

:)

Thanks,

Kalai

mvp_badge
MVP
Rank: #2

Hi Kalai,

You could do that, but the problem would then be that the server the app runs on (whether web or mobile) needs to have access to the REST service that runs locally on the specific machine. This could work if there's just a single computer with a device to the COM port, but if it's a scenario like the OP had, a number of computers each with a scale attached, that's not going to work.

Rank: #187

I know is an old post but did you get a solution for this problem? We did a similar solution with python but the problem is to get the weight when offline, did you manage that?

Rank: #5482

Hi All,


In case anybody runs into this thread again in the future, you can use the following Forge component to achieve this using an OutSystems mobile 

https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=9561