Avatar for ArthurTent

ArthurTent

Member since Feb 2020 • Last active Apr 2020
  • 1 conversations
  • 4 comments

Most recent activity

  • in Bangle.js
    Avatar for ArthurTent

    I've just received the Puck.js and ran the code on the device.
    I guess Robin was right and i've mixed up HTTP over Wifi with Bluetooth BLE.
    From my naive understanding I've thought that, as soon as the device is connected/paired through Bluetooth, that the puck/bangle would have access to the Internet.
    Do I understand it right, that I have to run EspurinoHub on a computer to bridge the device to the internet?
    How would I bridge the puck.js through an android device to the internet?

    I guess one approach would be to run puck.js code in the browser?
    http://www.espruino.com/Web+Bluetooth

    I've also have a weird behaviour on my linux maschine. I've activated the chrome flag for web bluetooth and was capable to transfer code from the browser IDE to the device.

    However, when I run the first example code from here: http://www.espruino.com/Web+Bluetooth
    on my webserver and open it with the same linux browser, I get the message: "This Web Browser doesn't support We Bluetooth."

    I'm a little bit confused at the moment. Maybe somebody can point me into the right direction how i can do http get requests?

    Thank's in advance
    update: I've tried the example Web Bluetooth code also with my smartphone browser which was also capable of running the ide and connect through web bluetooth to the device. Same error message: This Web Browser doesn't support Web Bluetooth.
    update: my page wasn't delivered through https. after activating ssl i can connect via web bluetooth. however, I still need an answer for the bridge question(s) :)

  • in Bangle.js
    Avatar for ArthurTent

    Thank you for pointing that out. I'll be looking forward to get my hands on the Bangle.js :)

  • in Bangle.js
    Avatar for ArthurTent

    So do I understand it correct, that the issue with my code is, that the Bangle.js emulator does not support network connections?

  • in Bangle.js
    Avatar for ArthurTent

    I've tried the Emulator and tried a simple http request.
    I've checked this (http://www.espruino.com/Internet) site and the following code:

    var http = require("http");
    http.get("http://www.espruino.com", function(res) {
      res.on('data', function(data) {
        console.log(data);
      });
    });
    

    But the emulator throws an error: Module http not found.

    Does Bangle.js support http get requests?

    I also had the same error message when i've tried WebSocket. Then it's complaining about missing module "http" and "net".

    What am I doing wrong?
    Does actually Bangle.js support making simple http requests?
    What about WebSocket connections?

    Best regards and thanks for any kind of help in advance.
    ArthurT

Actions