11-22-2023 02:13
11-22-2023 02:13
I am trying to build and install an app I wrote on my new sense 2. I can now build the app, but I can't get the app to install as I can't connect to the device. I am using sdk 7.2.0-pre.0 and sdk-cli 1.8.0-pre.11 under linux.
I may need some help configuring the ttyACM0 interface with the cdc_acm driver. (I don't think I've done this part properly and this is the reason I can't load the app.)
All my google searches indicate that it is not possible to sideload an app on the sense 2. Has anyone done this successfully?
The steps I've taken ...
$ npm i @Fitbit/sdk
$ npm i @Fitbit/sdk-cli
$ npx fitbit
Logged in as Chris Gorman <email_address>
fitbit$ build
> fitbit-planets@0.0.4 build /home/chris/src/javascript/fitbit-planets
> fitbit-build
[05:07:01][warn][companion] This project is being built without a companion component. Create a file named companion/index.ts or companion/index.js to add a companion component to your project.
[05:07:01][warn][settings] This project is being built without a settings component. Create a file named settings/index.tsx, settings/index.ts, settings/index.jsx or settings/index.js to add a settings component to your project.
[05:07:04][info][app] Building app for Fitbit Sense 2
[05:07:04][info][app] Building app for Fitbit Versa 4
[05:07:04][info][build] App UUID: uuid, BuildID: build_id
$fitbit connect phone
Auto-connecting only known phone: Samsung Model
fitbit$ connect device
No devices are connected and available
And this is where I'm stuck. Anyone with any ideas?
Answered! Go to the Best Answer.
11-22-2023 20:34
11-22-2023 20:34
Hi @chrisjohgorman - you may be able to install a USB driver but there are some simpler solutions.
First develop for a Sense and use the simulator to debug.
Then build the project for the Sense 2 and add it to your GAM project.
Then click the link at the top which will open it in the browser and click OPEN APP to install it on the watch using the private link.
In some cases there can be incompatable features and it may crash but without proper documentation it will be hard to debug.
Author | ch, passion for improvement.
11-22-2023 06:19
11-22-2023 06:19
@chrisjohgorman I moved your post to the SDK Development forum, a better fit for your question. I think you will get a faster response here.
Laurie | Maryland
Sense 2, Luxe, Aria 2 | iOS | Mac OS
Take a look at the Fitbit help site for further assistance and information.
11-22-2023 20:34
11-22-2023 20:34
Hi @chrisjohgorman - you may be able to install a USB driver but there are some simpler solutions.
First develop for a Sense and use the simulator to debug.
Then build the project for the Sense 2 and add it to your GAM project.
Then click the link at the top which will open it in the browser and click OPEN APP to install it on the watch using the private link.
In some cases there can be incompatable features and it may crash but without proper documentation it will be hard to debug.
Author | ch, passion for improvement.
11-27-2023 04:20
11-27-2023 04:20
11-27-2023 07:36
11-27-2023 07:36
Hello List,
I just tried to debug my install of the app I've written. When I select a menu entry I get the following ..
[10:07:03][info][build] App UUID: appid, BuildID: 0x04d8437846df7411
No app package specified. Using default ./build/app.fba.
Loaded appID:appid buildID:0x04d8437846df7411
App install complete (full)
Launching app
RPCError: App terminated
at Peer.handleError (/home/chris/src/javascript/fitbit-planets/node_modules/@fitbit/jsonrpc-ts/lib/peer.js:316:24)
at Peer._write (/home/chris/src/javascript/fitbit-planets/node_modules/@fitbit/jsonrpc-ts/lib/peer.js:250:26)
at writeOrBuffer (internal/streams/writable.js:358:12)
at Peer.Writable.write (internal/streams/writable.js:303:10)
at StreamTap.ondata (internal/streams/readable.js:731:22)
at StreamTap.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at StreamTap.Readable.push (internal/streams/readable.js:206:10)
at StreamTap.Transform.push (internal/streams/transform.js:166:32)
This is using "@fitbit/sdk": "^7.2.0-pre.0", "@fitbit/sdk-cli": "^1.8.0-pre.11" and "@fitbit/sdk-build-targets": "cmengler/fitbit-sdk-build-targets" and is develped for "rhea". When I develop for vulcan, I get "proper" output.
Loaded appID:appid buildID:0x07059a4296106cb6
App requires a device, connecting...
Auto-connecting only known device: Versa 3 Simulator
App install complete (partial)
Launching app
[10:15:59 AM] App: App Closed
[10:15:59 AM] App: App Started
[10:15:59 AM] App: Launch complete - durations: foregrounding(73ms), first paint(30ms), total(528ms).
[10:16:04 AM] App: sun clicked (app/views/sun.js:10,3)
[10:16:04 AM] App: Latitude: 48.13194 (app/views/sun.js:16,3)
[10:16:04 AM] App: Longitude: 11.54944 (app/views/sun.js:16,3)
[10:16:04 AM] App: sun RA: 16.2120 (app/views/sun.js:54,3)
[10:16:04 AM] App: sun Decl: -21.1492 (app/views/sun.js:55,3)
[10:16:04 AM] App: sun Dist: 0.9868 (app/views/sun.js:56,3)
[10:16:04 AM] App: sun azimuth: 236.7135 (app/views/sun.js:57,3)
[10:16:04 AM] App: sun altitude: 0.4222 (app/views/sun.js:58,3)
Does anyone know how to fix this?
Thanks in advance,
Chris
11-27-2023 08:19
11-27-2023 08:19
@chrisjohgorman- Just in case you are reinventing the wheel check here
Author | ch, passion for improvement.
11-27-2023 08:32
11-27-2023 08:32
11-27-2023 09:27
11-27-2023 09:27
@chrisjohgorman- unfortunately I think it is why Fitbit stopped porting clock faces to the Sense 2/Versa 4 as too many were crashing, yours might just be another example. Why the SDKs are not compatible is a mystery and probably why the new SDKs were never released. In short what runs on a Sense/Versa 3 but doesn't on a Sense 2/Versa, is what it is at this stage without more assistance from Fitbit.
Author | ch, passion for improvement.
11-27-2023 09:38
11-27-2023 09:38
11-27-2023 10:55
11-27-2023 10:55
There's a small chance that a slow-to-start app will be killed before it achieves consciousness. I've had occasional success by maxing the screen timeout in the watch's Settings app, as though the allowed start-up time were linked to that.
To further test this theory/superstition, try bypassing lengthy start-up routines just to see if it makes and difference.
11-27-2023 11:14
11-27-2023 11:14
11-27-2023 11:29
11-27-2023 11:29
I checked out git commit a1899d23585ed24786b80bd0d3683a4e16952fa7 of the sdk-demo-app and built it and it runs "properly". (For the one test I've preformed.) I will work at moving my from "per scenario files" to one monolith as it was done in the initial release. A bit of a shame as I liked the nice way the per scenario files breaks up the work for my app. Hoping this is a step in the right direction.
Take care and thanks for all the help.
Chris
11-27-2023 11:35
11-27-2023 11:35
While I'm still only guessing at the issue, I'd still be careful with start-up time. You don't get much of it. I do like the idea of per-scenario modularity. Maybe consider if you can implement the concept of 'lazy loading'.
11-27-2023 11:49
01-30-2024 14:10
01-30-2024 14:10
Hiya,
Just wondering if a music app can be added by sideloading apps?
Thanks!
01-30-2024 15:25
01-30-2024 15:25
01-30-2024 16:50
01-30-2024 16:50
In practice, I don't think so. The public API doesn't provide access to Bluetooth or any other way of playing audio. I think that previous audio apps were developed in partnership with Fitbit and made use of APIs that mere mortals can't access.
You might be able to sideload such an app if you could get the .fba for it, but I don't think that's possible.