-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Linux Ant+ Serial #3
Comments
Like in the other thread, the reset system message is sent to the dongle ("a4 01 4a 00 ef") In the other thread you interrupted causing a program abort. "Probably some difference in the serial behavior in Windows and Linux?" is probably right. Please look at lines 324... in module antDongle.py
which is as antifier coded it. Easiest is to change 'Linux' into 'Linux' (which is never true) and hence the windows-branche is executed. I assume you can modify the antDongle.py module, right? |
Sorry that I do not know exactly how it all works (being new @ python) I use 'import usb.core' and the dongle is found with If I read pyusb documentation at it states it should be platform independant, so the "if Linux" should not be necessary. Looking down that page (dev.read(0x81, len(msg), 100)) I see another coding than what is used for Linux. Based upon that info, I would remove the linux-branch at all; I'm looking forward for your analysis. |
Thanks, will look into this tomorrow, thank you for the support, I will keep you updated! |
I basically removed all Linux specific code parts and usbserial.ko and usb-serial-simple.ko from the kernel drivers (to prevent blocking of the USB ANT+ device) and now the script works. I have some problems with the GUI. A couple of times it just crashes after starting..... Now I can get into the GUI, but when I push on "run down" or "start" its quits... segmentation fault. Will have to look into debugging/logging to provide you with some additional information. |
Wauw! So no changes to the python code untill now? In fact you do not need the GUI, start FortiusANT without the -g flag. |
I kept
I removed all Linux specific parts throughout antDongle.py. Yes I know that I do not need the GUI. I was just wondering which additional Information the GUI provides. |
Could you please upload the current antDongle.py? GUI? Antifier had a GUI which is quite simple. I start FortiusANT with -g -a (automatic start) and expect to use without GUI as soon as it is really operational. |
You keep
but is that necessary? Serial seems not referenced. |
Hi how are you doing with the Fortius? Check the wiki; it's about finished now. |
I have been a bit busy, I will upload the code ASAP. I am planning to use the tacx tomorrow evening. |
Echt top! cu on Strava! |
Hi Wouter, I am not very familiar with GitHub, can you please provide me with a short description how to upload te file (and not ruin the structure of your project)? Thanks |
I think you can attach to a comment. ... |
Actually I think it is more difficult.... probably have to create a pull request. |
Below the text I type (now) I see the box: "Attach files by dragging & dropping, selecting or pasting them.". If I hoover the mouse over that text it allows to select files. I dropped the requirements.txt there which causes the follow link to be createdm for the file being uploaded... |
Ok, I changed the extension to txt, otherwise GitHub would not allow me to upload... |
Just to be clear, I do not really have a lot of experience with Tacx, neither with Zwift. I primarily decided to buy the Fortius because I stumbled upon antifier and through antifier upon your solution. I used the original Tacx software (3.5) once and did a video bike ride (Amstel Gold). During that ride I really noticed that the wheel speed is similar to the virtual speed. When I climbed a mountain, I really had to change gears to cope with the increased resistance.... downhill I really could stop pedalling because the rear wheel was driven bij the Fortius motor. I just finished my first real Zwift ride and noticed that it basically measures my power delivered and depending on the slope it changes my virtual bike speed (which really does not correspond with my real wheel speed). I have to read in detail through your wiki, but is this the behaviour you suspect? Apparently my Zwift trial period is ending... I think I will extend to continue optimising your solution.... |
Thanks, let's close this issue "Linux Ant+ serial" since that one is solved |
As expected, I will update my code accordingly :-) |
To ensure access to the usb device I followed these instructions from the ant bridge project, I propose to add these to your Linux instructions: Remove usb-serial-simple.ko and usbserial.ko. These drivers will grab the dynastream usb device denying access to it from our application. LOC=/lib/modules/uname -r/kernel/drivers/usb/serial/ sudo mv $LOC/usb-serial-simple.ko ~/Documents sudo mv $LOC/usbserial.ko ~/Documents You may also need to rmmod the modules from running. sudo rmmod usb_serial_simple usbserial I think this is a rather hacky solution, will try something like this in the future |
Made a reference |
Just because this issue exists, I'll post here... I can confirm I get various modes of crash running the GUI on Linux. I think this is to do with GUI interaction on another thread. Very similar to https://stackoverflow.com/questions/14320836/wxpython-pango-error-when-using-a-while-true-loop-in-a-thread I have tried guarding calls to SetValues() and SetMessages() in FortiusAnt.py with wx.CallAfter(...), as per the link above, but either I've missed one or more, or this doesn't solve anything. Again, just adding this here because GUI crash was mentioned above. Possibly open a new issue for this, if I (or anyone else) can get it fixed. I don't want to run headless, because I would like to extend the GUI, and want to ditch Windows. |
Thanks for checking I'm 100% caught up with the i-Vortex integration. So will postpone all other suggestions till after |
* #184 Power in Rouvy issue * #173 Version 4.0 Communicates Much Higher Power vs. 3.8 * #184 Power in Rouvy issue #2 * #184 Power in Rouvy issue #2 * #184 Power in Rouvy issue #3 * Fortius Antifier v4.2 test IV * Fortius Antifier v5.1 test I * Fortius Antifier v5.1 test II * Fortius Antifier v5.1 test IIb * #201 * #201 * Fortius Antifier v5.1 test III * heart -> Heart2 * heart -> Heart2 * heart* -> heart.jpg * Fortius Antifier v5.1 test IV * Fortius Antifier v5.1 test V * Fortius Antifier v5.1 test VI * Fortius Antifier v5.1
* steering, integrated version #1 * steering, integrated version #2 documentation * steering, integrated version #3 bless commandline issue solved * steering, integrated version #4 error message update * #341 refactor ANT loop. First version * Some small improvements (#391) * New reading loop (in thread) ready for test * #404 #408 and some small corrections * Python complied into executable
(Follow up on the dependencies Issue) I have been trying to run FortiusANT in Linux (Mint). After satisfying all python dependencies (Python 3.5) I run into problems with the ANT+ stick. I have been debugging the code a bit and it seems the code gets stuck at reply = ResetDongle(devAntDongle).
I think the code ends up in an infinite loop in the ReadFromDongle subroutine. Once trv=b'\xa4\x01o \xea', afterwards it is empty each time. Probably some difference in the serial behavior in Windows and Linux?
The text was updated successfully, but these errors were encountered: