-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with MiaoMiao 2 ? #11
Comments
Now I have noticed the new info in the documentation https://docs.google.com/document/d/1955quKMUfaVHyQZLw3k8IEkPFv3od00bA0AoJKY96xE/edit?usp=sharing |
You can install it on the sam rpi. |
Dear @tzachi-dar thank you very much on your valuable time spent to provide support!! |
What happens if you don't do this step?
Doesn't the program work without it?
…On Sun, 23 May 2021 at 19:54, bordeb ***@***.***> wrote:
Dear @tzachi-dar <https://github.com/tzachi-dar> thank you very much on
your valuable time spent to provide support!!
When going through the documentation and trying to execute
sudo cp bluepy/*.py /usr/local/lib/python3.7/dist-packages/bluepy/
it returns error that cp target is not a directory. Probably there is some
issue with python 3 version?
I started from scratch with blank installation of
2018-03-13-raspbian-stretch as it is suggested in the latest version of
guidance.
Can you please provide some guidance!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZD5MNHFAGYMTEWMRA3TPEXOBANCNFSM45LNX2RQ>
.
|
I will report it here. Now I have started the apt-get upgrade but it takes long time as it is RPI-zero. Thanks for such a quick response |
Hi @tzachi-dar clean install of the 2018-03-13-raspbian-stretch and then following commands: `sudo apt-get update sudo apt-get install git sudo apt-get install screen sudo apt-get install python3-pip build-essential libglib2.0-dev sudo pip3 install bluepy sudo pip3 install pymongo sudo pip3 install dnspython git clone https://github.com/IanHarvey/bluepy.git cd bluepy python3 setup.py build sudo python3 setup.py install git clone https://github.com/tzachi-dar/LibreAllHouse.git cd LibreAllHouse sudo nano config.cfg sudo nano /etc/rc.local tail -F ~/LibreAllHouse/screen.log EDIT: Something must be happening regarding Bluetooth connection as it seams that RPI is somehow connecting to MM2 because it is not visible for other devices until the RPI is shut down. Then it becomes visible. Nevertheless, the glucose data is not transmitted. |
So, now please continue with:
$ sudo apt-get install git build-essential libglib2.0-dev
$ git clone https://github.com/IanHarvey/bluepy.git
$ cd bluepy
$ python3 setup.py build
$ sudo python3 setup.py install
Tru running the code again, and see if it will start to run.
If it does not work.
Please do:
sudo cp bluepy/*.py /usr/local/lib/python3.7/dist-packages/bluepy/
sudo cp ./build/lib.linux-armv7l-2.7/bluepy/bluepy-helper
/usr/local/lib/python3.7/dist-packages/bluepy/bluepy-helper
If this directories do not exist, please look at what version of python
you are using, and what version of lib.linux you are using.
Thanks
Tzachi
…On Sun, 23 May 2021 at 22:12, bordeb ***@***.***> wrote:
Hi @tzachi-dar <https://github.com/tzachi-dar>
Here is my report. Unfortunately it does not work for me. Here is the
exact steps
*clean install of the 2018-03-13-raspbian-stretch and then following
commands:*
`sudo apt-get update
sudo apt-get install git
sudo apt-get install screen
sudo apt-get install python3-pip build-essential libglib2.0-dev
sudo pip3 install bluepy
sudo pip3 install pymongo
sudo pip3 install dnspython
git clone https://github.com/IanHarvey/bluepy.git
cd bluepy
python3 setup.py build
sudo python3 setup.py install
git clone https://github.com/tzachi-dar/LibreAllHouse.git
cd LibreAllHouse
sudo nano config.cfg
*MAC address of the MM2 inserted manually*
sudo nano /etc/rc.local
*/usr/bin/screen -L -Logfile /home/pi/LibreAllHouse/screen.log -dmS tomato
python3 /home/pi/LibreAllHouse/main.py*
tail -F ~/LibreAllHouse/screen.log
`
The screen log says:
2021-05-23 19:10:42.991: event wait ended, ret = False
INFO 2021-05-23 19:11:25,149 restarting since time from last packet is 298
already acumulated 60
10
2021-05-23 19:11:42.998: event wait ended, ret = False
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZHKXLX243DJWHTLZMDTPFHSPANCNFSM45LNX2RQ>
.
|
Please send the logs, like you have done before if this doesn't work.
…On Sun, 23 May 2021 at 23:27, Tzachi Dar ***@***.***> wrote:
So, now please continue with:
$ sudo apt-get install git build-essential libglib2.0-dev
$ git clone https://github.com/IanHarvey/bluepy.git
$ cd bluepy
$ python3 setup.py build
$ sudo python3 setup.py install
Tru running the code again, and see if it will start to run.
If it does not work.
Please do:
sudo cp bluepy/*.py /usr/local/lib/python3.7/dist-packages/bluepy/
sudo cp ./build/lib.linux-armv7l-2.7/bluepy/bluepy-helper
/usr/local/lib/python3.7/dist-packages/bluepy/bluepy-helper
If this directories do not exist, please look at what version of python
you are using, and what version of lib.linux you are using.
Thanks
Tzachi
On Sun, 23 May 2021 at 22:12, bordeb ***@***.***> wrote:
> Hi @tzachi-dar <https://github.com/tzachi-dar>
> Here is my report. Unfortunately it does not work for me. Here is the
> exact steps
>
> *clean install of the 2018-03-13-raspbian-stretch and then following
> commands:*
>
> `sudo apt-get update
>
> sudo apt-get install git
>
> sudo apt-get install screen
>
> sudo apt-get install python3-pip build-essential libglib2.0-dev
>
> sudo pip3 install bluepy
>
> sudo pip3 install pymongo
>
> sudo pip3 install dnspython
>
> git clone https://github.com/IanHarvey/bluepy.git
>
> cd bluepy
>
> python3 setup.py build
>
> sudo python3 setup.py install
>
> git clone https://github.com/tzachi-dar/LibreAllHouse.git
>
> cd LibreAllHouse
>
> sudo nano config.cfg
> *MAC address of the MM2 inserted manually*
>
> sudo nano /etc/rc.local
> */usr/bin/screen -L -Logfile /home/pi/LibreAllHouse/screen.log -dmS
> tomato python3 /home/pi/LibreAllHouse/main.py*
>
> tail -F ~/LibreAllHouse/screen.log
> `
> The screen log says:
> 2021-05-23 19:10:42.991: event wait ended, ret = False
> INFO 2021-05-23 19:11:25,149 restarting since time from last packet is
> 298 already acumulated 60
> 10
> 2021-05-23 19:11:42.998: event wait ended, ret = False
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#11 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB4TBZHKXLX243DJWHTLZMDTPFHSPANCNFSM45LNX2RQ>
> .
>
|
Hi @tzachi-dar , tnx very much After runing the code again nothing improved so I continued with two making copies of the two files: My python is 3.5 so I was able to copy with the first command sligthly changed to: But with the seconda command I have no luck and can not detect exact numbers version to change. I have detected that my rpi os is armv6l instead of armv7l , but other two numbers can not detect. I have tried with 2.6 and 2.7 and also without them but no luck here:?
|
I must say that I did not test it with rpi zero only with rpi 3 and rpi 4.
you can use the following command to find where you have built bluepy-helper
find /home/pi/bluepy -name bluepy-helper
Than you can find the dest of it running
find /usr/local/lib -name bluepy-helper
Each command might return more than one of these.
From the source, please look at the dates of the files and copy the most
recent one.
On the dest, copy to all of them.
In order to get some more debug information:
In the file main.py
there is a line
#*btle*.Debugging = True
please remove the # from it (remove the comment).
After that it will create some more logging including when bluepy-helper
was built.
Thanks
Tzachi
…On Mon, 24 May 2021 at 00:29, bordeb ***@***.***> wrote:
Hi @tzachi-dar <https://github.com/tzachi-dar> , tnx very much
After runing the code again nothing improved so I continued with two
making copies of the two files:
My python is 3.5 so I was able to copy with the first command sligthly
changed to:
sudo cp bluepy/*.py /usr/local/lib/python3.5/dist-packages/bluepy/
But with the seconda command I have no luck and can not detect exact
numbers version to change. I have detected that my rpi os is armv6l instead
of armv7l , but other two numbers can not detect. I have tried with 2.6 and
2.7 and also without them but no luck here:?
sudo cp ./build/lib.linux-armv6l-?.?/bluepy/bluepy-helper
/usr/local/lib/python3.5/dist-packages/bluepy/bluepy-helper
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZA2IXVK26I3JRCPU4DTPFXRXANCNFSM45LNX2RQ>
.
|
Thank you very much on your support! File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in del I am not sure what is happening. MM1 works for years with RPI Zero W. |
I think that right now the simplest thing to try is either instal a new
version of rpi OS or use a bigger pi.
I have recently installed lately "Raspbian GNU/Linux 10 (buster)" on pi 4
and this works well.
Thanks
Tzachi
…On Mon, 24 May 2021 at 01:33, bordeb ***@***.***> wrote:
Thank you very much on your support!
Seams that I have broken something with this coping. Now the logs says
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in
*del*
self.disconnect()
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 453, in
disconnect
self._writeCmd("disc\n")
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 305, in
_writeCmd
self._helper.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
I am not sure what is happening. MM1 works for years with RPI Zero W.
Maybe I should try again from clean install od the raspbian and then
update to the latest "stretch" version. This will update the python to
3.5.3 so it might work better. I think python 3.5.3 is latest for now on
raspbian stretch. Should I try to manually install python 3.7?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZHTDCSVABCO2O7EPBLTPF7EPANCNFSM45LNX2RQ>
.
|
Thanks so so much!! If it goes wrong again, I will try "buster" then. On buster, is it also necessary to?: $ sudo apt-get install git build-essential libglib2.0-dev ? |
Yes, this part is a must.
The only question is whether doing the manual copy later is a must as well.
…On Mon, 24 May 2021 at 11:50, bordeb ***@***.***> wrote:
Thanks so so much!!
I have now prepared clean install fully updated (apt-get update) of the
"stretch" raspbian OS version and will now proceed with the tutorial once
more and report here the result.
If it goes wrong again, I will try "buster" then. On buster, is it also
necessary to?:
$ sudo apt-get install git build-essential libglib2.0-dev
$ git clone https://github.com/IanHarvey/bluepy.git
$ cd bluepy
$ python3 setup.py build
$ sudo python3 setup.py install
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZAFUMXJJQ6E7DZUMH3TPIHO5ANCNFSM45LNX2RQ>
.
|
I have performed clean install of the stretch, full update, full install LibreAllHouse according to the guidance but it does not work. Linux rpi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l
How to properly try to copy the files? |
What are the dates of these files ?
**/home/pi/bluepy/build/lib/bluepy/bluepy-helper**
**/home/pi/bluepy/bluepy/bluepy-helper**
please run ls -l on each of them
…On Mon, 24 May 2021 at 14:11, bordeb ***@***.***> wrote:
I have performed clean install of the stretch, full update, full install
LibreAllHouse according to the guidance but it does not work.
Only thing I did not perform yest is the manual copy that last time broke
my installation. Please advise me not to kill this installation:
*Linux rpi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l*
find /home/pi/bluepy -name bluepy-helper
returns:
**/home/pi/bluepy/build/lib/bluepy/bluepy-helper**
**/home/pi/bluepy/bluepy/bluepy-helper**
find /usr/local/lib -name bluepy-helper
returns:
**/usr/local/lib/python3.5/dist-packages/bluepy-1.3.0-py3.5.egg/bluepy/bluepy-helper**
**/usr/local/lib/python3.5/dist-packages/bluepy/bluepy-helper**
python3 --version
*Python 3.5.3*
How to properly try to copy the files?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZER7ARYNQ5DOYUSTSDTPIX7PANCNFSM45LNX2RQ>
.
|
here they are: |
Please copy from:
/home/pi/bluepy/build/lib/bluepy/bluepy-helper
to
**/usr/local/lib/python3.5/dist-packages/bluepy-1.3.0-py3.5.egg/bluepy/bluepy-helper**
**/usr/local/lib/python3.5/dist-packages/bluepy/bluepy-helper**
And also:
sudo cp bluepy/*.py /usr/local/lib/python3.5/dist-packages/bluepy/
Thanks
Tzachi
…On Mon, 24 May 2021 at 14:27, bordeb ***@***.***> wrote:
here they are:
$ ls -l /home/pi/bluepy/build/lib/bluepy/bluepy-helper
-rwxr-xr-x 1 root root 702776 May 24 11:37
/home/pi/bluepy/build/lib/bluepy/bluepy-helper
$ ls -l /home/pi/bluepy/bluepy/bluepy-helper
-rwxr-xr-x 1 root root 702776 May 24 11:37
/home/pi/bluepy/bluepy/bluepy-helper
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZAQWPLC3IYQ2QLXY53TPIZZHANCNFSM45LNX2RQ>
.
|
Thank you very much! I did it, but unfortunately, it seams that again it broke. Here is the log: |
Did the copy of the python files succeed?
Please run again with:
In order to get some more debug information:
In the file main.py
there is a line
#*btle*.Debugging = True
please remove the # from it (remove the comment).
After that it will create some more logging including when bluepy-helper
was built.
And send the logs.
…On Mon, 24 May 2021 at 15:01, bordeb ***@***.***> wrote:
Thank you very much! I did it, but unfortunately, it seams that again it
broke. Here is the log:
Waiting for connections
INFO 2021-05-24 13:58:05,184 cought btle.BTLEException Failed to connect
to peripheral d8:c1:7a:f5:a1:d0, addr type: random
2021-05-24 13:58:24.395: event wait ended, ret = False
Connecting...
2021-05-24 13:59:24.405: event wait ended, ret = False
Services...
INFO 2021-05-24 13:59:31,647 cought btle.BTLEException Helper exited
Exception ignored in: <bound method Peripheral.*del* of
<bluepy.btle.Peripheral object at 0xb6a7de10>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in
*del*
self.disconnect()
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 453, in
disconnect
self._writeCmd("disc\n")
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 305, in
_writeCmd
self._helper.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZCVDYVWLFP6IOB2YV3TPI5YJANCNFSM45LNX2RQ>
.
|
Yes, the copy was sucesfull. No errors. After enabling Debugging the log is: Connecting... Waiting for connections Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n' Got: "rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n" Exception ignored in: <bound method Peripheral.del of <bluepy.btle.Peripheral object at 0xb5bbedb0>> Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n' Got: "rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n" Exception ignored in: <bound method Peripheral.del of <bluepy.btle.Peripheral object at 0xb69b0e10>> Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n' Got: "rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n" Exception ignored in: <bound method Peripheral.del of <bluepy.btle.Peripheral object at 0xb691ce10>> Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n' |
I'm not sure what else can be done from remote here.
You can try to upgrade your python to something newer.
I'll try to install a rpi zero, and see if it works, but this will probably
take a week or two.
Thanks
Tzachi
…On Mon, 24 May 2021 at 15:12, bordeb ***@***.***> wrote:
Yes, the copy was sucesfull. No errors.
After enabling Debugging the log is:
Connecting...
2021-05-24 14:06:24.469: event wait ended, ret = False
INFO 2021-05-24 14:06:34,623 cought btle.BTLEException Failed to connect
to peripheral d8:c1:7a:f5:a1:d0, addr type: random
['BTDevice', 'MongoData', 'TcpSockets']
/home/pi/LibreAllHouse/LibreReadings.db
2021-05-24 14:08:21.298: Mongo caught exception in first write A '/' is
required between the host list and any options.InvalidURI
2021-05-24 14:08:21.336: Starting mongo thread
Connecting...
Running /usr/local/lib/python3.5/dist-packages/bluepy/bluepy-helper
Socket created
Waiting for connections
Sent: conn d8:c1:7a:f5:a1:d0 random
Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n'
Got:
"rsp=$stat\x1estate=$tryconn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Services...
Sent: svcs
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n"
Got: ''
Got: ''
Got: ''
Got: ''
INFO 2021-05-24 14:08:22,300 cought btle.BTLEException Helper exited
Sent: disc
Exception ignored in: <bound method Peripheral.*del* of
<bluepy.btle.Peripheral object at 0xb5bbedb0>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in
*del*
self.disconnect()
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 453, in
disconnect
self._writeCmd("disc\n")
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 305, in
_writeCmd
self._helper.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
2021-05-24 14:09:21.345: event wait ended, ret = False
Connecting...
Running /usr/local/lib/python3.5/dist-packages/bluepy/bluepy-helper
Sent: conn d8:c1:7a:f5:a1:d0 random
Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n'
Got:
"rsp=$stat\x1estate=$tryconn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Services...
Sent: svcs
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n"
Got: ''
Got: ''
Got: ''
INFO 2021-05-24 14:09:23,681 cought btle.BTLEException Helper exited
Sent: disc
Exception ignored in: <bound method Peripheral.*del* of
<bluepy.btle.Peripheral object at 0xb69b0e10>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in
*del*
self.disconnect()
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 453, in
disconnect
self._writeCmd("disc\n")
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 305, in
_writeCmd
self._helper.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
2021-05-24 14:10:21.356: event wait ended, ret = False
Connecting...
Running /usr/local/lib/python3.5/dist-packages/bluepy/bluepy-helper
Sent: conn d8:c1:7a:f5:a1:d0 random
Got: '# bluepy-helper.c version 1.3.0 built at 11:35:31 on May 24 2021\n'
Got:
"rsp=$stat\x1estate=$tryconn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Services...
Sent: svcs
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n"
Got: ''
Got: ''
INFO 2021-05-24 14:10:24,754 cought btle.BTLEException Helper exited
Sent: disc
Exception ignored in: <bound method Peripheral.*del* of
<bluepy.btle.Peripheral object at 0xb691ce10>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in
*del*
self.disconnect()
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 453, in
disconnect
self._writeCmd("disc\n")
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 305, in
_writeCmd
self._helper.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZC2FQIE7QMKSPHKCETTPI7DXANCNFSM45LNX2RQ>
.
|
Thank you very very much! Your expertise will be so valuable to evaluate rpi zero w. Please let me know if I can buy a test RPI zero W for you or any other contribution! Just to provide additional info: The debug logfile now says: Waiting for connections Got: '# bluepy-helper.c version 1.3.0 built at 18:29:15 on May 24 2021\n' Got: "rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n" Got: "rsp=$find\x1ehnd=hF\x1eprops=hC\x1evhnd=h10\x1euuid='6e400002-b5a3-f393-e0a9-e50e24dcca9e\x1ehnd=h11\x1eprops=h10\x1evhnd=h12\x1euuid='6e400003-b5a3-f393-e0a9-e50e24dcca9e\n" Got: "rsp=$desc\x1ehnd=h13\x1euuid='00002902-0000-1000-8000-00805f9b34fb\x1ehnd=h14\x1euuid='00002800-0000-1000-8000-00805f9b34fb\x1ehnd=h15\x1euuid='00002803-0000-1000-8000-00805f9b34fb\x1ehnd=h16\x1euuid='8ec90003-f315-4f60-9fb8-838830daea50\x1ehnd=h17\x1euuid='00002902-0000-1000-8000-00805f9b34fb\n" Got: 'rsp=$wr\n' Got: 'rsp=$wr\n' Select timeout |
I must say that it seems to me that this one is working (at least the ble
part).
See the message:
INFO 2021-05-24 19:05:34,190 restarting since time from last packet is 5
already accumulated 363
363 bytes is what we should get.
Please keep running and see if it keeps getting 363 bytes.
Thanks
Tzachi
…On Mon, 24 May 2021 at 20:12, bordeb ***@***.***> wrote:
Thank you very very much! Your expertise will be so valuable to evaluate
rpi zero w. Please let me know if I can buy a test RPI zero W for you or
any other contribution!
Just to provide additional info:
I tried with clean install of the buster instead of scratch but with no
sucess at the end. Only thing that is better is that the copy/paste thing
did not broke the installation.
The debug logfile now says:
bad start byte 201
bad end byte 0
bad length of buffer 968
2021-05-24 19:05:29.169: event wait ended, ret = True
INFO 2021-05-24 19:05:29,168 tryAgainAlowed numberOfCrcErrors_ = 1
NumberOfDiscnections_ = 0
INFO 2021-05-24 19:05:29,179 We are still allowed to retry
INFO 2021-05-24 19:05:34,186 Sending a request for more data after send
failure
INFO 2021-05-24 19:05:34,190 restarting since time from last packet is 5
already acumulated 363
INFO 2021-05-24 19:05:34,706 cought btle.BTLEException Device disconnected
['BTDevice', 'MongoData', 'TcpSockets']
/home/pi/LibreAllHouse/LibreReadings.db
2021-05-24 19:06:48.462: Mongo caught exception in first write A '/' is
required between the host list and any options.InvalidURI
2021-05-24 19:06:48.499: Starting mongo thread
Socket created
Waiting for connections
Connecting...
Running /usr/local/lib/python3.7/dist-packages/bluepy/bluepy-helper
Sent: conn d8:c1:7a:f5:a1:d0 random
Got: '# bluepy-helper.c version 1.3.0 built at 18:29:15 on May 24 2021\n'
Got:
"rsp=$stat\x1estate=$tryconn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=h0\x1esec='low\n"
Services...
Sent: svcs
Got:
"rsp=$stat\x1estate=$conn\x1edst='d8:c1:7a:f5:a1:d0\x1emtu=hF7\x1esec='low\n"
Got:
"rsp=$find\x1ehstart=h1\x1ehend=h9\x1euuid='00001800-0000-1000-8000-00805f9b34fb\x1ehstart=hA\x1ehend=hD\x1euuid='00001801-0000-1000-8000-00805f9b34fb\x1ehstart=hE\x1ehend=h13\x1euuid='6e400001-b5a3-f393-e0a9-e50e24dcca9e\x1ehstart=h14\x1ehend=hFFFF\x1euuid='8ec9fe59-f315-4f60-9fb8-838830daea50\n"
Service <uuid=Generic Access handleStart=1 handleEnd=9>
Service <uuid=Generic Attribute handleStart=10 handleEnd=13>
Service <uuid=6e400001-b5a3-f393-e0a9-e50e24dcca9e handleStart=14
handleEnd=19>
Service <uuid=8ec9fe59-f315-4f60-9fb8-838830daea50 handleStart=20
handleEnd=65535>
charterstics...
Sent: char E 13
Got:
"rsp=$find\x1ehnd=hF\x1eprops=hC\x1evhnd=h10\x1euuid='6e400002-b5a3-f393-e0a9-e50e24dcca9e\x1ehnd=h11\x1eprops=h10\x1evhnd=h12\x1euuid='6e400003-b5a3-f393-e0a9-e50e24dcca9e\n"
Characteristic <6e400002-b5a3-f393-e0a9-e50e24dcca9e>
Characteristic <6e400003-b5a3-f393-e0a9-e50e24dcca9e>
nrfGattCharacteristic = [<bluepy.btle.Characteristic object at 0xb4d87230>]
NOTIFY
Sent: desc 13 FFFF
Got:
"rsp=$desc\x1ehnd=h13\x1euuid='00002902-0000-1000-8000-00805f9b34fb\x1ehnd=h14\x1euuid='00002800-0000-1000-8000-00805f9b34fb\x1ehnd=h15\x1euuid='00002803-0000-1000-8000-00805f9b34fb\x1ehnd=h16\x1euuid='8ec90003-f315-4f60-9fb8-838830daea50\x1ehnd=h17\x1euuid='00002902-0000-1000-8000-00805f9b34fb\n"
Sent: wr 13 0100
Got: 'rsp=$wr\n'
Init called.
b'\xf0'
Sent: wr 10 f0
Got: 'rsp=$wr\n'
Got:
'rsp=$ntfy\x1ehnd=h12\x1ed=b28016B0ECE98FE980700A007E0530004100152E1D01803000000000000000000000000000000000000003BD50E1CBC03C8D8D700B203C8D09700AB03C8B09700A803C8A8D7009F03C8A817809603C8B017808D03C8B417808D03C8AC17808D03C89C57808503C8A057008303C8A057007F03C88817808003887217807B03C8641780\n'
INFO 2021-05-24 19:06:51,902 restarting since time from last packet is 3
already acumulated 0
Select timeout
Select timeout
Select timeout
Select timeout
Select timeout
Select timeout
Select timeout
Select timeout
... ... ... etc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZDT7FXK5UXXKCCHHXTTPKCHJANCNFSM45LNX2RQ>
.
|
Ok, tnx, I will keep it running and report. I am suspicious about result as it was collecting for half an hour (master phone was away) and nothing collected... But we will see.. |
For now it still works and keeps getting 363 but it seams that it does not understand data properly. The serial number of the sensor is showing wrong. There are also multiple checksum_ok1 = False, checksum_ok2 = False, checksum_ok3 = False. EDIT: I can also see in the log file that the master xDrip+ phone is connecting to rpi, but xDrip+ obviously does not receive usable glucose data. |
Are you running with libre1?
What is the version of the fw of the miaomiao 2? (you can see this in xDrip
in system status->bt status).
…On Mon, 24 May 2021 at 20:41, bordeb ***@***.***> wrote:
For now it still works and keeps getting 363 but it seams that it does not
understand data properly. The serial number of the sensor is showing wrong.
There are also multiple checksum_ok1 = False, checksum_ok2 = False,
checksum_ok3 = False.
I will report in addition
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZBN534T7MOWWINBX6TTPKFS5ANCNFSM45LNX2RQ>
.
|
This is for my little doughter. For last couple of days we are running for her with new MM2 and the firmware is 0004 (tomato firmware as xdrip displays). |
Sorry, I now seen what actually you were asking? Apologies! |
So, next step.
Let's comment again the line
#*btle*.Debugging = True
On line 498, you have
*#print*('total = ' ,binascii.b2a_hex(self.data_))
please enable it and run again (send me the logs after).
Thanks
Tzachi
…On Mon, 24 May 2021 at 21:12, bordeb ***@***.***> wrote:
Sorry, I now seen what actually you were asking? Apologies!
Yes, we are using Libre1 sensors! 100%
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZGE5J5HWHBPKU7TZ3DTPKJH3ANCNFSM45LNX2RQ>
.
|
In the meanwhile I performed clean install and setup on another RPI Zero W using buster raspbian and after copying the relevant files at first rpi successfully collected some data from MM2 and than xdrip successfully collected that data (I was so happyat at the moment thinking that it is resolved, but...), but after that no additional data from MM2 was collected. In the log file I can not see anything special. That old glucose data collected at first from MM2 is visible but no newer glucose data is collected. The log constantly says that connection to MM2 is not successfull (btle.BTLEException Failed to connect to peripheral xx:xx:xx:xx:xx:xx, addr type: random) but I am sure that it is somehow "partially" connected because the MM2 is not visible to other devices (phones scanning within xdrip app) untill the RPI is shutdown. I am 100% sure that phone can not be blamed for "stealing" the connection with MM2, so this can not be the reason that RPI can not connect to MM2. In contrary, it seams that there is some connection between rpi and MM2, but it fails to collect data from MM2, but again in some rare ocasions (I don't know why and when) it succeed. I am very confused. |
You can try and reboot the pi to see if this is the one that is holding the
miaimiao.
Thanks
Tzachi
…On Tue, 25 May 2021 at 00:37, bordeb ***@***.***> wrote:
In the meanwhile I performed clean install and setup on another RPI Zero W
using buster raspbian and after copying the relevant files at firts the rpi
successfully collected some data from MM2 and than xdrip successfully
collected that data but after that no additional data from MM2 was
collected. In the log file I can not see anything special. That old data
collected at first from MM2 is visible but no newer glucose data is
collected. The log constantly says that connection to MM2 is not
successfull (btle.BTLEException Failed to connect to peripheral
xx:xx:xx:xx:xx:xx, addr type: random) but I am sure that it is somehow
"partially" connected because the MM2 is not visible to other devices
(phones scanning within xdrip app) untill the RPI is shutdown. I am 100%
sure that phone can not be blamed for "stealing" the connection with MM2,
so this can not be the reason that RPI can not connect to MM2. In contrary,
it seams that there is some connection between rpi and MM2, but it fails to
collect data from MM2, but again in some rare ocasions (I don't know why
and when) it succeed. I am very confused.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZELDRJG6KBHEIACU6DTPLBJ7ANCNFSM45LNX2RQ>
.
|
Any progress on this?
Thanks
Tzachi
… |
Hi @tzachi-dar , tnx very very much for asking! |
After several clean installs and setups, the only thing consistent is that there is some connection between RPI Zero W and MM2 but the data received is not good. I have enabled print('total = ' ,binascii.b2a_hex(self.data_)) |
I have just installed the system on the latest version of pi zero. Thanks |
Thank you for the info!! |
mm2 firmware is 4.0 On the install I have run the commands as written in the instructions and also did: By the way, the python version that I have there is 3.7.3 If it will continue to work for a few more days without a problem, I'll create an image of the pi and upload it. |
Tnx so much! So, you did NOT need to perform: Yes, on buster the python is 3.7 while on stretch it is 3.5. In the meanwhile, do you maybe want me to send you the log file after I enabled print('total = ' ,binascii.b2a_hex(self.data_)) ? |
No, you should be running with the copy line above. So, far all is working for 24 hours on a test system. If things will continue to be well, I'll switch tomorrow to a real system. If you have logs from such a buster system, please mail them to [email protected] |
Thank you! |
Looking at the logs that you have sent, me it seems that data is arriving correctly, however it is ariving too slowly. Please replace it with: This should sovle your problem. If this will not help, please replace the line (498): |
Thank you @tzachi-dar !! It works! In addition, for me it was also enough just to do Also, I would suggest the revision of the tutorial regarding the distro. - at the beginning to say "buster" raspbian |
I hope things are still working well. My test system is still running. Background: The problem that I saw in your logs is that the 3 packets got mixed for some reason, that is it started with the second one, than the third, than the first one. This happened after the retransmit was done. I thought that increasing the timeout should help things work better, but I'm not sure on it anymore. Thanks |
Dear Tzachi, thank you very much an all your support! It still works, two Rpi zeros and one Rpi 3B. It really is that this change from 3 to 10 was the solution in my case.
Yes, I will gladly send you whatever you think is useful! Please let me know exactly what you want. At the moment all rpis all clean install from scratch and then following the online tutorial. The only differences (three in total) from the tutorial is the use of "buster" insted of the older OS version, then skipping the step Do you want me to enable: Regards! |
Please replace it with:
logging.info('total = ' ,binascii.b2a_hex(self.data_))
…On Wed, 2 Jun 2021 at 00:27, bordeb ***@***.***> wrote:
I hope things are still working well. My test system is still running.
Dear Tzachi, thank you very much an all your support! It still works, two
Rpi zeros and one Rpi 3B. It really is that this change from 3 to 10 was
the solution in my case.
If you can send me the logs again, I can try and understand what is going
on there.
Yes, I will gladly send you whatever you think is useful! Please let me
know exactly what you want.
At the moment all rpis all clean install from scratch and then following
the online tutorial. The only differences (three in total) from the
tutorial is the use of "buster" insted of the older OS version, then
skipping the step sudo cp bluepy/*.py
/usr/local/lib/python3.7/dist-packages/bluepy/ which was not needed in my
case, and most importantly changing the value from "3" to "10" in the
main.py
Do you want me to enable:
print('total = ' ,binascii.b2a_hex(self.data_))
or replace it with
logging.info('total = ' ,binascii.b2a_hex(self.data_))
or...?
Regards!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZBQE7DUEONZI4UWPYTTQVGCVANCNFSM45LNX2RQ>
.
|
Hi! I have just shared the log file with you on gdrive. Thank you so much! |
Hi, Thanks |
Hi! |
Well, it seems that after a new connection there is some problem that I do not understand, but it seems that after 5 minutes things start to work well again. |
Interesting! Yes. As not an expert, I have noticed that there is some problem in the beginning but after a while it somehow starts to collect data and functioning is ok. The key point is that it is necessary to change the value from 3 to 10 in the 456 line of the main.py When such an expert as you and after thorough examination thinks that a change is not necessary, I can easily fully agree and be happy continuing to use such a great software! P.S. when you tested with your RPi Zero W, did you have to change from 3 to 10 or in your case it was operating even with default value of 3? |
Dear @tzachi-dar , yesterday I have made a switch from MiaoMiao 1 to MiaoMiao 2 and it seams that LibreAllHouse is not collecting data any more. Is it a compatibility issue with MiaoMiao 2 or am I missing something? We are using libreallhouse for at least 3 years and I am afraid that this is a compatibility issue which I was not aware till now. Is there anything I could do to resolve this? THANK YOU very much in advance!
The text was updated successfully, but these errors were encountered: