Avatar for myxor

myxor

Member since Mar 2020 • Last active Feb 2023
  • 12 conversations
  • 101 comments

Most recent activity

    • 24 comments
    • 846 views
  • in Bangle.js
    Avatar for myxor

    I'd have hoped you'd have seen messages like t: "gps_power", status: true}

    Yes i saw that in the log.

    The frustrating thing is that when disconnected, it should work as normal - but the second you connect to see what's going on it would switch to the Gadgetbridge mode.

    That would explain why it worked sometimes but most of the times not.

    There is a PR for some changes to this

    I have seen that. Take your time :)

  • in Bangle.js
    Avatar for myxor

    I found a code block here:
    https://github.com/espruino/BangleApps/b­lob/master/apps/widgps/widget.js#L12

    After deinstalling the GPS widget the function definition is different:

    >Bangle.setGPSPower.toString()
    ="function (isOn,ap" ... "wr});return pwr;}"
    

    But GPS still not working.

    Then i found that in android.settings.json the key "overwriteGps" was set to true.
    I set it manually to false in the json file via the IDE and GPS works again!

    I am pretty sure that i never turned this on in the Bangle.js android app but who actually knows...

    So if the Bangle.js android app expects GPS coming from GadgetBridge but the setting in GP is turned off then the Bangle.js will never get any GPS.

    I feel sorry for the time the hunt for this consumed.

    Thank you for your help, this seems to be solved!

  • in Bangle.js
    Avatar for myxor

    I grabbed a new backup from the Bangle and greped the files:

    ❯ grep -iRl "isGPSon"
    .boot0
    widgps.wid.js
    android.boot.js
    info.app.js
    
    
    ❯ grep -iR "isGPSon;"
    widgps.wid.js:(ª(){settings=Object.assig­n(require('Storage').readJSON("widgps.de­fault.json",´) {},require('Storage').rea­dJSON("widgps.json",´) {});¬interval;¬ol­dSetGPSPower=Bangle.setGPSPower;Bangle.s­etGPSPower=ª(on,id){¬isGPSon=oldSetGPSPo­wer(on,id);WIDGETS.gps.width=!isGPSonset­tings.hideWhenGpsOff?0:24;Bangle.drawWid­gets();«isGPSon;};WIDGETS.gps={area:"tr"­,width:!Bangle.isGPSOn()settings.hideWhe­nGpsOff?0:24,draw:ª(){g.reset();£(Bangle­.isGPSOn()interval·){interval=setInterva­l(ª(){WIDGETS.gps.draw(WIDGETS.gps);},10­*1000);}¤£(!Bangle.isGPSOn()interval·){c­learInterval(interval);interval=·;}£(set­tings.crossIcon){£(Bangle.isGPSOn()){®gp­sObject=Bangle.getGPSFix();£(gpsObjectgp­sObject.fix>0){g.setColor("#0F0");}¤{g.s­etColor("#FD0");}g.drawImage(atob("GBiBA­AAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYG­BgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+­A//8AAAAAAAAAAAAA=="),¯.x,2+¯.y);}¤{£(!s­ettings.hideWhenGpsOff){g.setColor("#888­");g.drawImage(atob("GBiBAAAAAAAAAAAAAA/­/8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+Bg­YGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAA­AAA=="),¯.x,2+¯.y);}}}¤{£(Bangle.isGPSOn­()){®gpsObject=Bangle.getGPSFix();£(gpsO­bjectgpsObject.fix>0){g.drawImage(atob("­GBiBAAAAAAAAAAB+AAD/AAHDgAMAwAcAwAY8YAY8­YAY8YAY8YAMAwAMAwAOBwAGBgAHDgADDAABmAAB+­AAA8AAAYAAAAAAAAAAAAAA=="),¯.x,2+¯.y);}¤­{g.drawImage(atob("GBiBAAAAAAAAAAh+AA3/g­A+B4A8AcA+AMAA8GAB+GADnDADDDADDDDDDADBmA­DB+ABg8ABgYAAwB8A4A8AeB8AH/sAB+EAAAAAAAA­A=="),¯.x,2+¯.y);}}¤{£(!settings.hideWhe­nGpsOff){g.drawImage(atob("GBiBAAAAAAAAA­AB+ABj/ABxDgA4AwAcAwAeMYAfEYAbgYAZwYAM4w­AMcQAOOAAGHAAHDgADDwABm4AB+cAA8OAAYGAAAA­AAAAAAAAA=="),¯.x,2+¯.y);}}}}};})();
    
    
    ❯ grep -iRl "return isGPSon;"
    
    
  • in Bangle.js
    Avatar for myxor

    Good idea, sadly no luck:

    >require("Storage").list().filter(f => require("Storage").read(f).includes("isG­PSOn;"))
    =[  ]
    

    My apps are up to date. I don't have sensor tools installed:

    Firmware Version	2v16.45
    Apps Installed	activityreminder (0.10), banglexercise (0.03), owmweather (0.02), poweroff (0.01), qmsched (0.09), run (0.14), waypoints (0.01), kbmulti (0.05), locale (0.17), widgps (0.09), bledetect (0.04), flappy (0.06), magnav (0.05), info (0.03), sevenmin (0.01), mylocation (0.09), wid_a_battery_widget (0.04), widbthide (0.01), widsleepstatus (0.02), openstmap (0.15), sleeplog (0.12), fastload (0.03), wid_edit (0.02), torch (0.11), widhrm (0.06), hrm (0.11), boot (0.55), widalarm (0.01), messages (0.58), iconlaunch (0.15), widlock (0.08), slopeclockpp (0.08), widmessages (0.04), a_dndtoggle (0.01), setting (0.56), alarm (0.37), agenda (0.11), notify (0.12), altimeter (0.02), quicklaunch (0.08), gbmusic (0.11), sched (0.19), stopwatch (0.04), ha (0.09), mtnclock (0.01), mmind (0.02), messageicons (0.04), messagegui (0.64), android (0.21), agpsdata (0.06), health (0.22), recorder (0.21), weather (0.24), gpsinfo (0.12), circlesclock (0.24)
    
  • in Bangle.js
    Avatar for myxor

    I do not have the Gadgetbridge's GPS functionality enabled.

    It says

    >Bangle.setGPSPower
    =function (on,id) { ... }
    
    >Bangle.setGPSPower.toString()
    ="function (on,id) " ... ";return isGPSon;}"
    
  • in General
    Avatar for myxor

    I just found out that the forum only sends one notification per thread and if you don't read that new message it won't send any new notification about that thread.

    Consider this closed :)

Actions