Comments (7)
The ANT+ usb dongle doesn't fit the ports of a RPiZero, so I plug a micro-usb cable adapter into the OTG port, and a Dynastream 1009 ANT+ USB dongle into the adapter. Power is from my mac powerbook (or from my mac powerbook 140W charger) into the RPi power microusb port. No additional hw attached to the RPi. No usb hubs are used. RPi sdcard is older (buster) but "plain jane" (i2c enabled, spi enabled, serial console disabled), and not programmed to use any special OTG capabilities.
from pizero_bikecomputer.
I saw that bullseye is the earliest OS for Rpizero2W so I created a new sdcard with 2023-05-03-raspios-bullseye-armhf-lite.img Running on RpizeroW and Rpizero2W now dmesg and lsusb both return expected results (ie the ant dongle is recognized).
I am using this USB OTG adapter https://www.adafruit.com/product/1099
Now examples run fine on RpizeroW
pi@raspberrypi:~/Documents/ant/openant $ python3 examples/scan.py
Driver available: [<class 'ant.base.driver.SerialDriver'>, <class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>]
- Using: <class 'ant.base.driver.USB3Driver'>
array('B', [4, 0, 228, 209, 95, 213, 4, 71, 128, 172, 30, 120, 1])
New Device Found: 7852 of type 120
array('B', [132, 0, 228, 209, 95, 213, 4, 71, 128, 172, 30, 120, 1])
New Device Found: 7852 of type 120
array('B', [132, 0, 95, 213, 214, 216, 5, 71, 128, 172, 30, 120, 1])
New Device Found: 7852 of type 120
array('B', [4, 0, 95, 213, 214, 216, 5, 71, 128, 172, 30, 120, 1])
New Device Found: 7852 of type 120
pi@raspberrypi:~/Documents/ant/openant $ python3 examples/heart_rate_monitor.py
Driver available: [<class 'ant.base.driver.SerialDriver'>, <class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>]
- Using: <class 'ant.base.driver.USB3Driver'>
<class 'usb.core.USBTimeoutError'>, (110, 'Operation timed out')
Heartrate: 63 [BPM]
However on the Rpizero2W the openant examples still fail e.g. python3 examples/scan.py
Driver available: [<class 'ant.base.driver.SerialDriver'>, <class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>]
- Using: <class 'ant.base.driver.USB3Driver'>
Traceback (most recent call last):
File "/home/pi/Documents/ant/openant/examples/scan.py", line 78, in <module>
main()
File "/home/pi/Documents/ant/openant/examples/scan.py", line 55, in main
node = Node()
File "/usr/local/lib/python3.9/dist-packages/ant/easy/node.py", line 55, in __init__
self.ant = Ant()
File "/usr/local/lib/python3.9/dist-packages/ant/base/ant.py", line 60, in __init__
self._driver.open()
File "/usr/local/lib/python3.9/dist-packages/ant/base/driver.py", line 202, in open
dev.set_configuration()
File "/usr/local/lib/python3.9/dist-packages/usb/core.py", line 915, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/local/lib/python3.9/dist-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/usb/core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/local/lib/python3.9/dist-packages/usb/backend/libusb1.py", line 812, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/local/lib/python3.9/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno None] Other error
Have you tried openant on Rpizero2W? If so which OS version? Which version of pyusb or libusb?
from pizero_bikecomputer.
from pizero_bikecomputer.
Hi, @pbljung ,
I am sorry, but I cannot imagine your situation.
Can you list the hardware used in the Raspberry Pi Zero/Zero2?
You are not using a usb hub or USB OTG with ANT+ dongle, are you?
USB OTG
https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget
from pizero_bikecomputer.
a micro-usb cable adapter
Is the difference between RPi3 and RPi Zero the USB adapter?
Is it a proper USB OTG adapter?
Can you try to connect a USB keyboard with your micro-usb cable adapter and HDMI cable to the RPi zero and operate the console?
from pizero_bikecomputer.
I mainly use Raspberry Pi OS bullseye.
I use libusb and python3-usb, as described in the document.
$ sudo apt-get install libusb-1.0-0 python3-usb
$ sudo pip3 install git+https://github.com/hishizuka/openant.git
Did you successfully execute pizero_bikecomputer.py with Raspberry Pi zero?
from pizero_bikecomputer.
BTW,
Why don't you try this one? I use this combination.
https://www.adafruit.com/product/2910
https://ja.aliexpress.com/item/1005001355302356.html?spm=a2g0o.detail.0.0.3a904ff3U9iMFH&gps-id=pcDetailTopMoreOtherSeller&scm=1007.40050.362094.0&scm_id=1007.40050.362094.0&scm-url=1007.40050.362094.0&pvid=1569c3aa-928f-4f63-b961-2ebcd9091824&_t=gps-id:pcDetailTopMoreOtherSeller,scm-url:1007.40050.362094.0,pvid:1569c3aa-928f-4f63-b961-2ebcd9091824,tpp_buckets:668%232846%238111%231996&isseo=y&pdp_npi=4%40dis%21JPY%211095%21612.0%21%21%217.15%21%21%402141113616989611252423464e1314%2112000026755529768%21rec%21JP%21%21AB
from pizero_bikecomputer.
Related Issues (20)
- touchscreen compatibility HOT 4
- Wiringpi deprecated HOT 1
- MIP_640 direct update HOT 1
- GPS cutoff values HOT 2
- Back button on non touch device HOT 2
- Incorrect course points distance HOT 6
- I2C GPS HOT 2
- log filename format HOT 4
- Error; coroutine awaited (qasync) HOT 3
- I can't use MIP display (MIP display dosen't work). HOT 10
- Change layout (question) HOT 1
- Google direction API doesn't work HOT 2
- Adding GPS to the main screen. HOT 1
- Can't seem to get Ride with gps working (Question) HOT 1
- Simple map HOT 1
- frequent timeouts when starting HOT 2
- Download custom tiles HOT 1
- PA1010D I2C sensor HOT 1
- Demo mode speed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pizero_bikecomputer.