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

The device is currently offline. #1

Closed
hocnguyen opened this Issue Feb 26, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@hocnguyen

hocnguyen commented Feb 26, 2016

Hi guys,
I have a problem need to help.
I had build a android device as your sample , I had turn on/off claim mode and get trigger event from android hardware success. But when i send command from app simulator, I get error "The device is currently offline." although my android device still connect.
Also I use device simulator is ok.
please help me solve that.
Thanks you so much.

@honteng

This comment has been minimized.

Show comment
Hide comment
@honteng

honteng Feb 26, 2016

Contributor

Hi!
Thank you for using and developing MODE device. I hope you enjoy our development environment.

"The device is currently offline." means WebSocket from your device is disconnected. I guess disconnection happened when you used device simulator. Because a device can have only one WebSocket connection.

If you want to test now, close both device simulator and Android App and restart Android App only. Then try to send commands again.

But strange thing is that MODECommandListener should reconnect automatically when WebSocket is disconnected. It would be a bug so I will look into it.

Thanks,

Contributor

honteng commented Feb 26, 2016

Hi!
Thank you for using and developing MODE device. I hope you enjoy our development environment.

"The device is currently offline." means WebSocket from your device is disconnected. I guess disconnection happened when you used device simulator. Because a device can have only one WebSocket connection.

If you want to test now, close both device simulator and Android App and restart Android App only. Then try to send commands again.

But strange thing is that MODECommandListener should reconnect automatically when WebSocket is disconnected. It would be a bug so I will look into it.

Thanks,

@hocnguyen

This comment has been minimized.

Show comment
Hide comment
@hocnguyen

hocnguyen Feb 26, 2016

Hi !
I don't use device simulator, i built on my android hardware, and it still notice to me that message (device offline).
Also, if i use device simulator (from console), when I add it into my home (at app simulator) so status is connected. But when i use android hardware, after i enable claim mode, I added that device then status is disconnected.
please help me review again!
Thanks

hocnguyen commented Feb 26, 2016

Hi !
I don't use device simulator, i built on my android hardware, and it still notice to me that message (device offline).
Also, if i use device simulator (from console), when I add it into my home (at app simulator) so status is connected. But when i use android hardware, after i enable claim mode, I added that device then status is disconnected.
please help me review again!
Thanks

@honteng

This comment has been minimized.

Show comment
Hide comment
@honteng

honteng Feb 26, 2016

Contributor

I confirmed that the current websocket reconnect logic have a bug. I guess handler and looper problem. I will fix it soon. Can you wait?

Contributor

honteng commented Feb 26, 2016

I confirmed that the current websocket reconnect logic have a bug. I guess handler and looper problem. I will fix it soon. Can you wait?

@hocnguyen

This comment has been minimized.

Show comment
Hide comment
@hocnguyen

hocnguyen Feb 26, 2016

Thanks for your fervent . I can. Also i will try to fix it while you fixing.

hocnguyen commented Feb 26, 2016

Thanks for your fervent . I can. Also i will try to fix it while you fixing.

@honteng

This comment has been minimized.

Show comment
Hide comment
@honteng

honteng Feb 26, 2016

Contributor

Ok, I fixed the problem.

Please git pull and try it again. I confirmed it's working on real device (Samsung Galaxy Tab4) too.

Contributor

honteng commented Feb 26, 2016

Ok, I fixed the problem.

Please git pull and try it again. I confirmed it's working on real device (Samsung Galaxy Tab4) too.

@hocnguyen

This comment has been minimized.

Show comment
Hide comment
@hocnguyen

hocnguyen Feb 28, 2016

yes. it worked.
Thank you very much.

hocnguyen commented Feb 28, 2016

yes. it worked.
Thank you very much.

@honteng

This comment has been minimized.

Show comment
Hide comment
@honteng

honteng Feb 28, 2016

Contributor

np :-)

Contributor

honteng commented Feb 28, 2016

np :-)

@honteng honteng closed this Feb 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment