Saturday, May 14, 2016

Smartstrap Debugging



It's getting near to a year on the transmitter, so I needed to get my battery levels to the watch, where I can keep an eye on it.  The current plan is to add a battery to an old "thick" transmitter that I have saved.  This will give me a backup, while I try to change the batteries in my current "thin" transmitter.  There are some excellent tutorials out there, so expect to hear something about that over the next few months.  Currently the battery is at 0xD6.

Meanwhile, I needed to get the battery levels to the watch.  This didn't go smoothly, and I was frustrated by the lack of debugging information since I'm bound directly to the watch, so cloud pebble can't help me.  A while back I looked into the smartstrap functionality, but for day to day use, the amount of hardware would be bulky, and the connector looked problematic, and the parts are extremely small.  I went as far as having shapeways print the connector for me, but it didn't come out right.  Anyway, I realized this would be perfect for debugging.  So, above, you see a Teensy 3.1, a WT12 bluetooth module and a Wixel.  Took 2 days to get all this working, but I now have battery levels, and a way to see what's going on in the watch.

I also want to get the Pebble pairing code onto the Wixel, which would allow me to re-pair or add another watch to the module I carry, without hooking jumpers to everything and wiring up a Teensy when I need it.

The Pebble round is working great after some of the initial horrors.  Earlier, the Pebble update process was problematic, one update blew away my pairing to the WT12.  Also, the watch is stable now.  No guarantees, but I'm not seeing app restarts any longer, and I've got the calibration persisting.  It still appears possible to lose it, at least on my Pebble Time, possibly when bad code causes the app to crash outright.  Life on the bleeding edge, I can deal.

Another interesting feature, at least with the Round, the WT12 is paired using bluetooth, but the BLE channel is still accessible.  One day, I noticed by accident that the Pebble was still able to show me the Weather and Sunrise/Sunset day summary.  I should be able to pair the BLE Mini with the watch and maybe push glucose values to it.  Would allow me to store readings someplace (if I felt the need...), I add a custom alert device to really wake me up at night, the vibration on the Round doesn't wake me up as quickly as I'd like.  My other thought is changing the Pebble app to require a double tap to stop alerts.  I'll probably add this first, then do the hardware thing some rainy day.

Finally, thought I'd include a picture of the current device.  Similar to the part mockup in an earlier post.
This time, I used a small amount of hot glue to put the parts onto a piece of paper, then wired everything point to point.  This avoids the added thickness of a PCB.  If I do it again, I'll use smaller wires.  Also the "dead bugged" WT12 doesn't appear to interfere with the Wixel, which was a happy surprise.



Update:  Be careful when updating the Round with new code.  If it doesn't show you a status bar indicating an app is being loaded, it's not actually loading it.  Cloud Pebble will report the installation as successful.  From the Pebble app, you may see your application in the unsupported apps's category.  Remove it, then redeploy.

2 comments:

  1. Hello, Don.

    Can you help me with RF parameters of Dexcom G4 transmitter?

    At present I am try to port parakeet project (https://github.com/jamorham/wixel-xDrip) from Wixel to Arduino and CC2500 board as radio signal receiver.

    In this project I found next Rf parameters:

    Base Frequency - 2424.999756 MHz
    Channel Number - 0 (project also listen 100, 199, 209 chanels, but I don't understand how it works.)
    Channel Spacing - 249.755859 kHz
    Carrier Frequency - 2424.999756
    Data rate - 49.9878 kBaud
    Rx Filter BandWidth - 375.000000 kHz

    May be you know more about this parameters?
    Is this parameters optimal?

    Egor. (gorgy70@mail.ru)

    ReplyDelete
  2. You need to use the code from https://github.com/brownedon/CC2500-Project. This will do everything for you and has all the settings. The crystal frequency is different between the wixel and the cc2500, so most of the RF parameters need to change. I've already done this. To repeat the process you would need to download RF Studio from TI.
    Multiple channels: Every 5 minutes a packet is sent on channel 1, then X ms later, packet is sent on channel 2 etc.

    ReplyDelete