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

problem with executing channel sync() function #33

Closed
abijahm opened this issue Jul 25, 2017 · 1 comment
Closed

problem with executing channel sync() function #33

abijahm opened this issue Jul 25, 2017 · 1 comment

Comments

@abijahm
Copy link

abijahm commented Jul 25, 2017

var MikroNode = require('mikronode');

var device = new MikroNode('192.168.43.182');
device.setDebug(MikroNode.DEBUG);
device.connect('admin', 'admin').then(function (conn) {
    conn.closeOnDone(true); 
    let chan = conn.openChannel('1')
    //chan.sync(true);
    chan.sync(true)
    chan.write('/tool/user/user/add',{
        'customer':'admin',
        'username':'user',
        'password':'user'
    })
    chan.write('/tool/user/user/print')
});

will not complete it gets stuck creating channel 1

but without it it works

var MikroNode = require('mikronode');

var device = new MikroNode('192.168.43.182');
device.setDebug(MikroNode.DEBUG);
device.connect('admin', 'admin').then(function (conn) {
    conn.closeOnDone(true); 
    let chan = conn.openChannel('1')
    //chan.sync(true)
    chan.write('/tool/user/user/add',{
        'customer':'admin',
        'username':'user',
        'password':'user'
    })
    chan.write('/tool/user/user/print')
});
@Trakkasure
Copy link
Owner

Published version 2.1.0

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