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

please help me #1

Open
thucngocle opened this issue Nov 19, 2015 · 4 comments
Open

please help me #1

thucngocle opened this issue Nov 19, 2015 · 4 comments

Comments

@thucngocle
Copy link

  • I'm a developer. I'm coding a program listen on port: 1337.
  • Firt press on pebble, i recive data:

GET /api/values/3 HTTP/1.1
Host: 192.169.6.202:1337
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; LG-P920 Build/ICS) Appl
eWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
X-Wap-Profile: http://gsm.lge.com/html/gsm/P920-M3-D2-ICS.xml
Accept-Encoding: gzip,deflate
Accept-Language: en-US
Accept-Charset: utf-8, iso-8859-1, utf-16, ;q=0.7
Accept: */

  • But, second press on pebble: nothing happenned.
@orviwan
Copy link
Owner

orviwan commented Nov 19, 2015

Hi,

I'd recommend putting some logging in the code to see at which point it's failing.

In the C code of the Pebble app, you can do:

APP_LOG(APP_LOG_LEVEL_DEBUG, "Log this");

In the PebbleKit JS you can do:

console.log("Log this");

Then connect to the Pebble with logs and try to find out where it's failing.

@thucngocle
Copy link
Author

Hi.I have not code. I just run nc -k -l 0.0.0.0 1337 (netcat as server on port 1337) or on windows run nc -l -p 1337. I think ControlR-for-Pebble app don't break command.

Vào ngày 18:34 Thứ Năm, 19 tháng 11 2015, Jon Barlow <[email protected]> đã viết:

Hi,I'd recommend putting some logging in the code to see at which point it's failing.In the C code of the Pebble app, you can do:APP_LOG(APP_LOG_LEVEL_DEBUG, "Log this");In the PebbleKit JS you can do:console.log("Log this");Then connect to the Pebble with logs and try to find out where it's failing.—
Reply to this email directly or view it on GitHub.

@thucngocle
Copy link
Author

Here is my code, can you help me:
Try
            Dim l As New TcpListener(1337)
            'Lắng nghe dữ liệu
            l.Start()
            Control.CheckForIllegalCrossThreadCalls = False
            Dim s As Socket
            s = l.AcceptSocket
            Dim ntStream As New NetworkStream(s)
            Dim reader As New StreamReader(ntStream)

            While True
                Dim strData As String
                'Nhận dữ liệu
                strData = reader.ReadLine
                If strData <> "" Then
                    txtKetQua.Text &= strData & vbNewLine
                End If
            End While
            ntStream.Close()
            s.Close()
            l.Stop()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Vào ngày 18:34 Thứ Năm, 19 tháng 11 2015, Jon Barlow <[email protected]> đã viết:

Hi,I'd recommend putting some logging in the code to see at which point it's failing.In the C code of the Pebble app, you can do:APP_LOG(APP_LOG_LEVEL_DEBUG, "Log this");In the PebbleKit JS you can do:console.log("Log this");Then connect to the Pebble with logs and try to find out where it's failing.—
Reply to this email directly or view it on GitHub.

@thucngocle
Copy link
Author

I have resolved the problem.This is Program help pebble control runing on windows.
Requirement: windows vista or higher, or .net framework 2.0

Vào ngày 18:34 Thứ Năm, 19 tháng 11 2015, Jon Barlow <[email protected]> đã viết:

Hi,I'd recommend putting some logging in the code to see at which point it's failing.In the C code of the Pebble app, you can do:APP_LOG(APP_LOG_LEVEL_DEBUG, "Log this");In the PebbleKit JS you can do:console.log("Log this");Then connect to the Pebble with logs and try to find out where it's failing.—
Reply to this email directly or view it on GitHub.

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