netbrain / zwift

Easily zwift on linux
The Unlicense
241 stars 27 forks source link

ANT+ USB #2

Closed december-soul closed 2 years ago

december-soul commented 2 years ago

can you add ANT+ support?

i have taken your docker image and add this howto https://github.com/Tigge/openant

after that the python scan.py can find my ANT+ HR Strap under linux

Zwift did not find them :-( Maybe it is a wine problem.

Here are some commands i did

    ls /dev/ttyUSB0  
    sudo apt update
    sudo apt install git python3-pip
    git clone https://github.com/Tigge/openant.git
    cd openant/
    sudo apt-get install python-setuptools
    sudo python3 setup.py install
    sudo pip install pyusb
    sudo python3 setup.py udev_rules
    cd examples/
    sudo python3 scan.py

Scan shows, so ANT+ works in your docker

sudo python3 scan.py 
Driver available: [<class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>]
 - Using: <class 'ant.base.driver.USB2Driver'>
array('B', [4, 0, 98, 196, 136, 200, 58, 57, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [4, 0, 163, 204, 203, 208, 60, 57, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [132, 0, 203, 208, 31, 213, 61, 57, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [4, 0, 31, 213, 121, 217, 62, 57, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [132, 0, 124, 221, 51, 225, 64, 57, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [4, 0, 124, 221, 51, 225, 64, 57, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [132, 0, 51, 225, 134, 228, 65, 58, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
array('B', [4, 0, 153, 231, 176, 234, 67, 60, 128, 114, 237, 120, 1])
New Device Found: 60786 of type 120
netbrain commented 2 years ago

Have you checked if the ant dongle is mapped to wine?

See https://wiki.winehq.org/Wine_User%27s_Guide#Serial_and_Parallel_Ports

On Fri, Feb 11, 2022, 23:05 decembersoul @.***> wrote:

can you add ANT+ support?

i have taken your docker image and add this howto https://github.com/Tigge/openant

after that the python scan.py can find my ANT+ HR Strap under linux

Zwift did not find them :-( Maybe it is a wine problem.

Here are some commands i did

ls /dev/ttyUSB0
sudo apt update
sudo apt install git python3-pip
git clone https://github.com/Tigge/openant.git
cd openant/
sudo apt-get install python-setuptools
sudo python3 setup.py install
sudo pip install pyusb
sudo python3 setup.py udev_rules
cd examples/
sudo python3 scan.py

Scan shows, so ANT+ works in your docker

sudo python3 scan.py Driver available: [<class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>]

  • Using: <class 'ant.base.driver.USB2Driver'> array('B', [4, 0, 98, 196, 136, 200, 58, 57, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [4, 0, 163, 204, 203, 208, 60, 57, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [132, 0, 203, 208, 31, 213, 61, 57, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [4, 0, 31, 213, 121, 217, 62, 57, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [132, 0, 124, 221, 51, 225, 64, 57, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [4, 0, 124, 221, 51, 225, 64, 57, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [132, 0, 51, 225, 134, 228, 65, 58, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120 array('B', [4, 0, 153, 231, 176, 234, 67, 60, 128, 114, 237, 120, 1]) New Device Found: 60786 of type 120

— Reply to this email directly, view it on GitHub <netbrain/zwift#2>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTNCZDBCFCWOJQWJNALJ3U2WB2FANCNFSM5OFOXZPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

december-soul commented 2 years ago

it seems that wine has problems with Bluetooth or ANT+. I have two USB sticks. One for Bluetooth and one for ANT+. Both are recognized by Docker and the Linux. Unfortunately Zwift does not recognize either. I have also tried with various permissions and settings. Unfortunately without success. Thereby it would be nice. In my setup I can not use the companion app unfortunately.

netbrain commented 2 years ago

Yeah, I don't think bluetooth is coming to wine any time soon. But maybe it would be possible to get ant+ working. However im not going to actively pursuit this as i'm comfortable with using the companion app in my setup. If you figure it out, let me know so i can incorporate it into the image.