Skip to content

Wifi Wixel Network Setup

Mark Francis edited this page Nov 12, 2016 · 6 revisions

full setup

Wifi Wixel Network Setup:

This adds a way to connect the xDrip to cheep (~40-50$) android mini-pc in order to collect readings from many places. For example, one can have 3 mini-pcs running in different rooms at home and 2 at school.

Think of it like a little network of wixels, all listening as you move throughout your house!

Theoretically, it could also be used with an android phone instead of an android mini-pc (perhaps an old phone you no longer use!?)

The device you use will open a tcp port that the xDrip can connect to. If connecting at home, then connection does not depend on remote servers availability (like azure or mongo-labs).

At home, you can use a router to forward your external ip to the devices port. This would allow you to read the data from anywhere over the Internet.

The devices can also write the data that they capture to a mongo-db. This helps in some network connections like a NAT that one can not configure for example at school.

The Devices also write every 5 minutes we are alive, in order to help one know the system status. As of writing this document there is no program that reads it, but we hope to have soon.

IN order to connect xDrip to an android mini pc you will need to get the following:

  1. A wixel.

  2. Some android mini pc or other easily rooted android device. (Was tested on android 4.1 and 4.2.2)

Preparing the wixel.

Please follow the instructions on the xDrip project. Set your wixel code up using usbEnabled = 1 and do_close_usb = 0 (we will probably add a dont sleep option in the future as power conservation should not be a concern in this setup)

Android mini-pc/device:

Choosing the mini-pc/device

If using a mini pc it is nice to get one with two usb ports. This is needed since in order to configure it you will need to connect a keyboard-mouse and a wixel. Alternatively you could get one with one usb port and a BT keyboard for setup.

It must run android 4.1.1 or higher

one option is the mk808b (though they are not the best quality and dont always last for very long)

Configuring the mini-pc:

If multiple devices are connected its important that they all are set to the same time. So be sure to set timezone to your time zone and "automatic data and time" (settings->Date & Time->Set Automatic data and time.)

Install the tzachi-dar/dexterity app on your phone:

  • Make sure that on the settings you allow to install programs from unknown sources. (settings->security->unknown sources).

  • run "git clone https://github.com/tzachi-dar/dexterity.git" and run gradlew build, or select 'Build -> Build APK' from the main menu of Android Studio to generate an APK.

Note: on newer versions of Android Studio the build might fail with Could not find method runProguard() if so, try this.

I usually send the apk to myself through email and install it on the mini-pc from there.

  • Connect the wixel to the mini-pc. A popup will ask you what program to connect to this USB port. choose dexterity and make sure it will always be used.

  • Dexterity will start running

On settings you can configure 3 things (all are optional, you don't have to do anything...).

  • The tcp port that will be used. (see introduction)

  • The name of the machine (for debug only).

  • The mongodb to upload the data. Please note that currently there is no program reading the data from the mongodb, but in the future I hope that there will be. The application also writes I'm alive every 5 minutes, and this is why machine name is needed...

Make sure you know the ip and port that you are using. (The ip can be found in settings->about phone->status).

Configure the xDrip to work with the mini-pc.

In settings, choose the wifi wixel collection method.

Enter the ip and the port of the wixel. format is ip1:port1,ip2:port2.

For example 37.142.132.220:50006,37.142.132.220:50005

Everything should be running now!!