Comments (13)
I'm away from my linux box and will take a look into details later. Somehow udev rules are not used hence missing /dev/schwinn810
. Did you install a package or did you just clone this repo? If schwinn rules file is in /lib/udev/rules.d/
and udev/computer has been restarted , take a look at udevadm
output. Though I did use it as is on all these Ubuntu versions.
Does it work with /dev/ttyUSB0
? You might want to add yourself into dialout group.
from schwinn810.
- On one box I used the ppa, the other I installed using the zip file.
- schwinn rules file is there. Not sure what to do with udevadm?
- How do I specify it to use /dev/ttyUSB0? I'm in the dialout group already
from schwinn810.
- Try udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0). I think it should mention subsystem etc. Can't say details now.
./download.py --help
lists all supported options. Take a look at shell script used to initiate download.
If you decide to modify this script, you can define shell variables in ~/.schwinn810.conf
like
PORT=/dev/ttyUSB0
# HOOK=/path/to/babelize.sh # if you want automatic conversions and/or uploads to MapMyRun or whatever you place there
DIR=$HOME/Documents/My Runs
NOTIFY=true
Note that this is temporary solution as how it works now. With some code overhaul, I'll follow XDG guidelines (below $XDG_CONFIG_HOME)
from schwinn810.
Running download.py --port /dev/ttyUSB0 still gives me a port error...
Here's the udevadm output:
udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0)
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB0':
KERNELS=="ttyUSB0"
SUBSYSTEMS=="usb-serial"
DRIVERS=="cp210x"
ATTRS{port_number}=="0"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0':
KERNELS=="3-1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="cp210x"
ATTRS{bInterfaceClass}=="ff"
ATTRS{bInterfaceSubClass}=="00"
ATTRS{bInterfaceProtocol}=="00"
ATTRS{bNumEndpoints}=="02"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
ATTRS{interface}=="CP2102 USB to UART Bridge Controller"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1':
KERNELS=="3-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1"
ATTRS{idVendor}=="10c4"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="3"
ATTRS{devnum}=="4"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0100"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="8887"
ATTRS{version}==" 1.10"
ATTRS{urbnum}=="133"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Silicon Labs"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="ea61"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="CP2102 USB to UART Bridge Controller"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3':
KERNELS=="usb3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="3"
ATTRS{devnum}=="1"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="2"
ATTRS{bcdDevice}=="0311"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0000:00:1d.1"
ATTRS{version}==" 1.10"
ATTRS{urbnum}=="140"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 3.11.0-18-generic uhci_hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0001"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="UHCI Host Controller"
looking at parent device '/devices/pci0000:00/0000:00:1d.1':
KERNELS=="0000:00:1d.1"
SUBSYSTEMS=="pci"
DRIVERS=="uhci_hcd"
ATTRS{irq}=="20"
ATTRS{subsystem_vendor}=="0x103c"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0300"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003"
ATTRS{device}=="0x2831"
ATTRS{msi_bus}==""
ATTRS{local_cpulist}=="0-1"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x30d9"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="0"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
from schwinn810.
Any chance this is a hardware issue with the watch/connector? It worked without a problem until recently...
from schwinn810.
I don't think it is a hardware issue. It wouldn't detect if the cable with converter was damaged.
Another possible reason is that something else is using that port. Modem manager is known to probe for new hardware. Udev rule adds an exception for that. sudo apt-get purge modemmanager
will remove one for sure.
Did you always download it manually? Even when it used to work? I mean if you still have a tray app listening to HAL notifications, it may interfere with manual runs... Make sure the screen on the watch simply says "Charging" without transfer indication before running download.py
.
from schwinn810.
Removed modemmanager, no change. If by "download it manually" you mean download the tcx with download.py, then yes, I've always done that. I couldn't get the tray app to work, and never had a need for it. Yes, it only says "charging". Upgraded to 14.04 on my main box, and am now getting this:
Fetching track 0508201 [1/1] with 3677 points
0%
Traceback (most recent call last):
File "/usr/share/schwinn810/download.py", line 88, in
main()
File "/usr/share/schwinn810/download.py", line 71, in main
d.read(w, p)
File "/usr/share/schwinn810/core/device.py", line 139, in read
point = self.reader.read_point()
File "/usr/share/schwinn810/core/reader_schwinn.py", line 92, in read_point
point['Latitude'] = pack_coord(b"\x00" + lat0, b'S')
File "/usr/share/schwinn810/core/utils.py", line 18, in pack_coord
c2=[unpack_bcd(x) for x in c1[0:3]]
File "/usr/share/schwinn810/core/utils.py", line 10, in unpack_bcd
raise Exception("Non-BCD argument {:X} in {:X}".format(digit, x00))
Exception: Non-BCD argument F in F6
If I run it again, I get something different:
usr/share/schwinn810/download.py
schwinn810 Copyright (C) 2012 Mikhail Titov
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under the terms of GPL-3 or later version.
0x25DA != 0xFA003D03
Traceback (most recent call last):
File "/usr/share/schwinn810/download.py", line 88, in
main()
File "/usr/share/schwinn810/download.py", line 71, in main
d.read(w, p)
File "/usr/share/schwinn810/core/device.py", line 122, in read
tracks_with_points = self._read_tracks(writer, tracks)
File "/usr/share/schwinn810/core/device.py", line 93, in _read_tracks
track = self.reader.read_track()
File "/usr/share/schwinn810/core/reader_schwinn.py", line 36, in read_track
raise BadSignature
core.reader.BadSignature
from schwinn810.
Yet another different error:
schwinn810 Copyright (C) 2012 Mikhail Titov
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under the terms of GPL-3 or later version.
0x1E96 != 0xFA002501
Traceback (most recent call last):
File "./download.py", line 88, in
main()
File "./download.py", line 48, in main
d = Device(args.port[0], args.debug)
File "/usr/share/schwinn810/core/device.py", line 32, in init
self.open()
File "/usr/share/schwinn810/core/device.py", line 50, in open
self.connect()
File "/usr/share/schwinn810/core/device.py", line 86, in connect
.format(serial.decode('ascii'), v1.decode('ascii'), ee.decode('ascii'),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xfe in position 0: ordinal not in range(128)
from schwinn810.
If by "download it manually" you mean download the tcx with download.py, then yes, I've always done that. I couldn't get the tray app to work
The version on github uses deprecated hal. It can be installed with sudo apt-get install hal
. Newer version (not uploaded yet) will talk to udev directly.
Yet another different error:
Well that is frustrating. Would it be possible to run it with --dump
option and share a copy of /tmp/schwinn810.bin
with me either with dropbox or somehow else?
File "/usr/share/schwinn810/core/reader_schwinn.py", line 36, in read_track
raise BadSignature
core.reader.BadSignature
...
File "/usr/share/schwinn810/core/device.py", line 86, in connect
.format(serial.decode('ascii'), v1.decode('ascii'), ee.decode('ascii'), \
UnicodeDecodeError: 'ascii' codec can't decode byte 0xfe in position 0: ordinal not in range(128)
What model do you have? You shouldn't get into line 86 in that file if you have Schwinn alike. And according to your previous post it used to be detected as Schwinn.
from schwinn810.
Yes, it's a schwinn 810, and it used to work. I don't see a dump option?
/usr/share/schwinn810/download.py --dump
schwinn810 Copyright (C) 2012 Mikhail Titov
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under the terms of GPL-3 or later version.
usage: download.py [-h] [--port PORT] [--hook HOOK] [--dir DIR] [--debug]
[--delete] [--progress {none,text,gtk,qt}]
[--read-settings] [--shift SHIFT]
download.py: error: unrecognized arguments: --dump
from schwinn810.
Weird. I deleted the stored tracks on the watch. Everything seems to be working now. I'll try to go on a ride tomorrow and get another long track to see what happens...
EDIT: I'm also getting this:
ls -l /dev/schwinn810
lrwxrwxrwx 1 root root 7 May 11 11:11 /dev/schwinn810 -> ttyUSB0
Before I got null from that command.
from schwinn810.
Well, went on a ride today. Tried connecting and got no errors. I guess the original track on the watch was corrupted somehow?
from schwinn810.
I don't see a dump option?
My bad. I meant --debug
as you might see from the summary.
Before I got null from that command.
Device file creation is up to udev. If installing from source (non-packaged)
sudo cp debian/udev /lib/udev/rules.d/30-schwinn.rules
sudo service udev reload
followed by reinsertion of USB cable should have resulted in the file creation. Once again this "device" is in the cord, no need to attach watch itself to test that.
Tried connecting and got no errors. I guess the original track on the watch was corrupted somehow?
I'm glad to hear it is working well and thank you for letting me know. Something similar about BCD unpacking for latitude happened to me a couple of times a while ago. I did not have time to investigate the issue back then so I also had to sacrifice those tracks. It is still strange you were getting other errors you described.
from schwinn810.
Related Issues (20)
- Broken postinst on Ubuntu 12.04 HOT 6
- Listen to D-Bus and have an applet instead of relying on udev's RUN
- It would be sweet to know past weather
- Can we guess sport/activity for TCX from stats?
- Missing Cresta PM808 support HOT 16
- Port can't be opened on Ubuntu 12.04 HOT 14
- Lack of forum/mailing list?
- Watch dumps data using units it is set for
- Missing pytrainer GPS import plug-in
- path error in PPA/debian installation HOT 1
- --Delete? HOT 2
- newbie linux person with port error HOT 3
- Windows 8 and driver signature enforcement HOT 6
- modemmanager interferes resulting in inability to open port and SerialException
- Managed to make it work on Ubuntu 12.10, but there is a bug line 67 in reader_cresta.py HOT 23
- no errors but not working HOT 3
- 1st point latitude may contain invalid data causing "Non-BCD argument F in 7F63" alikes
- TriggerMethod field in TCX HOT 2
- Support for settings extraction on Cresta alike watch 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 schwinn810.