bertrandmartel / fadecandy-android

:sparkles: Fadecandy server library to manage your Fadecandy USB controlled LED driver on Android
https://bertrandmartel.github.io/fadecandy-android
MIT License
25 stars 3 forks source link

Cannot connect to server in mobile(android) browser #5

Open minhyungko opened 6 years ago

minhyungko commented 6 years ago

screenshot_20180629-100554

Hi I'm trying to make fadecandy webapp client for fadecandy.

But When I connect through webview or browser, server response below message

home.js:429 WebSocket connection to 'ws://127.0.0.1:7890/' failed: Error during WebSocket handshake: Incorrect 'Sec-WebSocket-Accept' header value

Fadecandy server still works fine when I tried on fadecandy-app

Is any different on libwebsocket for android ?

bertrandmartel commented 6 years ago

As far as I remember the default server configuration set the LAN ip of your device as server ip adress : https://github.com/bertrandmartel/fadecandy-android/blob/7a23ed2f8be28eaaa773a8b8e91bac51e14feff4/fadecandy-service/src/main/java/fr/bmartel/android/fadecandy/service/FadecandyService.kt#L577 this way it can be used by other fadecandy client on the same network. But if you use the fadecandy service in library, you can set the config with startFcServer(config)