Can't get WebBLE working

Posted on
  • Hi, working on the Smart Meter project on the tutorial site and am trying to connect to my Puck to read data onto my iPhone using the 'Try Me' code . I have the WebBLE app loaded and I can connect to the Puck with this and toggle LEDs etc. but I can't get it to work. I just get told to go to the App Store and get WebBLE (which I have). Any ideas? BTW - this works fine from my Mac.


    1 Attachment

    • IMG_1197.PNG
  • That's an odd one - it looks like it, but you're definitely viewing that page from within WebBLE, not from Safari on the same phone? Are you on the HTTP version of the page, or the HTTPS version?

  • Gordon, I was using Chrome but did try Safari as well. Both were https and had the same message. Not sure what you mean by viewing the page from within WebBLE? Maybe I’m not using it correctly? Thanks

  • Ok. Think I’ve sorted it now. Thanks

  • Just to help others, what did you do to fix it?

    Was it that you hadn't started the WebBLE app and viewed the page within it?

  • Sure. Basically I misunderstood what WebBLE did!. I thought it was a 'driver' of some sort that enabled Web Bluetooth apps running from Chrome or Safari. I now realise that it's a browser and you need to run the scripts from WebBLE. Thanks

  • Gordon, another question on this. I want to collect data from my Puck connected to my elect meter and load into a spreadsheet. Given my meter is out of bluetooth range, I wanted to use my phone as a more portable and frequent way of collecting data (rather that running around with a laptop). I've been playing with the html code you used in your Data Collection tutorial and using the same getData() function to output data in the info.csv file. This works fine on my laptop. However, it does not seem to work when I run the same code from WebBLE on my phone - i.e It does not seem to create a file on my phone that I can find but generates no error messages. Any ideas? Thanks


    1 Attachment

  • I thought it was a 'driver' of some sort that enabled Web Bluetooth apps running from Chrome or Safari

    It would be great if that was the case, but I think iOS is locked down enough that it isn't possible :(

    That's odd about the code... Maybe you could try changing getData so it just did saveFile("blah blah", "myfile.txt") and see if that works?

    I guess if not it might be something to do with WebBLE blocking file saves (in which case you could file an issue on WebBLE's GitHub page for this).

    A workaround might be to actually load the data into an online spreadsheet directly... If you mashed in the code from https://developers.google.com/sheets/api/quickstart/js you might actually be able to get the web app to automatically add the new energy data to a Google Sheets spreadsheet, without the download step

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Can't get WebBLE working

Posted by Avatar for Aggers @Aggers

Actions