Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with usage of library #19

Open
dronecz opened this issue Jul 13, 2016 · 8 comments
Open

Help with usage of library #19

dronecz opened this issue Jul 13, 2016 · 8 comments

Comments

@dronecz
Copy link

dronecz commented Jul 13, 2016

Hi @washo4evr

I want to use your library with this project #https://github.com/cheton/cnc and I opened this issue: #cncjs/cncjs#42. In short I want use your library but I can not send/ I don´t know how to send right sequence to server. Could you please look at that issue and help me with this?

Many thanks for reply.

@washo4evr
Copy link
Owner

Hey,

I will give it a look over the weekend
Im sure you can use my library for that project

We will figure it out

@washo4evr
Copy link
Owner

hi
did you try running the example provided with the library?
the process is pretty straightforward
you need to use client.send("");
all the parsing happens on the server to save memory on the ESP8266
we could work on a step by step together if you want

@dronecz
Copy link
Author

dronecz commented Jul 19, 2016

Hi,

to be honest I did not tryed your example because I don´t have accout at Sparkfun and I think is not really necessary to have one just for one test.
I don´t know if you had time look at that issue, but I can connect to server, I can send client.send("command","/dev/ttyAMA0", "reset"); but syntax is not right. When I look how is writen client for server, at first client send client.send('list'); to receive list of devices which can be used, and after that I will probably know what I should send. If I try compile my code with client.send('list'); I got error beacuse it is not implemented in your library. I´m very interested in this so we can try step by step ;-). I´m more HW than SW man so please be patient with me ;-), thanks.

P.S. : I posted wrong link for my issue in other project so I repaired it.

@dronecz
Copy link
Author

dronecz commented Dec 28, 2016

Hi @washo4evr

some time past and I got back with my project and I made some progress with it.
I can now use your library and connect my NodeMCU to Node.js server, and if I send this command:
client.send("list","",""); to the server I got back this reply: "serialport:list",[{"port":"/dev/ttyAMA0","inuse":false .
So far so good, but when I want move on and send this: client.send("open","/dev/ttyAMA0","115200"); I got this reply from the server: Invalid "baudRate" must be a number got: undefined , so my question is, can I tell it that this data is number?

Many thanks for help.

Miroslav

@washo4evr
Copy link
Owner

Hi,
do you have the code of the server
that would help a lot
plus, in ""serialport:list",[{"port":"/dev/ttyAMA0","inuse":false"
the baudrate is not even mentioned
that is weird

@dronecz
Copy link
Author

dronecz commented Jan 13, 2017

Hi @washo4evr

you can look at code here: https://github.com/cheton/cnc. I don´t think that´s problem because that command is just for listing availaible ports on server. I can send more printscreens if you want.

Thanks

@washo4evr
Copy link
Owner

heya,
screenshots would be great too
I will have more time this weekend to go over them

@dronecz
Copy link
Author

dronecz commented Jan 20, 2017

Hi @washo4evr ,

you want screenshot of server side or client side?

Edit:

Here is server side:
cncjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants