Skip to content

Instantly share code, notes, and snippets.

@bewest bewest/Makefile
Last active Aug 29, 2015

Embed
What would you like to do?
checking syslog to debug carelink usb status

checking syslog for what happens

To run a quick check and share the output with me:

  1. fork this gist.
  2. run make
  3. run git commit -avm 'record diagnostics'
  4. run git push origin master
  5. share your fork of the gist with me

That's it, the Makefile will record the diagnostics I outline below. Feel free to repeat the steps outlined above while unplugging and plugging in the stick again.

Long version, the hard way

When I plug in the usb stick, and check syslog with something like tail /var/log/syslog, I see something like the following:

bewest@hither:~/src/openaps/docs$ tail /var/log/syslog
May 12 18:17:15 hither logger: START
May 12 18:17:22 hither kernel: [573484.127155] usb 3-3: new full-speed USB device number 96 using xhci_hcd
May 12 18:17:22 hither kernel: [573484.257462] usb 3-3: New USB device found, idVendor=0a21, idProduct=8001
May 12 18:17:22 hither kernel: [573484.257470] usb 3-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
May 12 18:17:22 hither kernel: [573484.258291] usbserial_generic 3-3:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
May 12 18:17:22 hither kernel: [573484.258300] usbserial_generic 3-3:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
May 12 18:17:22 hither kernel: [573484.258304] usbserial_generic 3-3:1.0: generic converter detected
May 12 18:17:22 hither kernel: [573484.258492] usb 3-3: generic converter now attached to ttyUSB0
May 12 18:17:22 hither mtp-probe: checking bus 3, device 96: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
May 12 18:17:22 hither mtp-probe: bus: 3, device: 96 was not an MTP device

There's some mention of usbserial, and various chatter from the USB udev system in the logs.

Next we'll try python -m decocare.scan to see if decocare can find the stick:

bewest@hither:~/src/openaps/docs$ python -m decocare.scan
/dev/serial/by-id/usb-0a21_8001-if00-port0
bewest@hither:~/src/openaps/docs$ 

If your output from syslog is similar in nature, but decocare.scan cannot the find stick, double check that you have permissions:

From the root of the decocare git repo, try fetching my latest bewest/dev branch. The commits from 2015-05-12 install udev rules, in the system location. They will take effect on next reboot or after issuing sudo udevadm control --reload.

After installing the rules, the python -m decocare.scan tool should be able to find a device. If the rules are installed, and no device is created, double check linux version using uname -r and let me know. If possible, also please include the last output from syslog, something like tail -n 30 /var/log/syslog should be fine. Finally, if possible, also include the output of lsusb with the stick plugged in. Here's what mine looks like:

$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 8087:07dc Intel Corp. 
Bus 003 Device 096: ID 0a21:8001 Medtronic Physio Control Corp. MMT-7305WW [Medtronic Minimed CareLink]
Bus 003 Device 007: ID 5986:0536 Acer, Inc 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 8087:07dc Intel Corp.
Bus 003 Device 097: ID 0a21:8001 Medtronic Physio Control Corp. MMT-7305WW [Medtronic Minimed CareLink]
Bus 003 Device 007: ID 5986:0536 Acer, Inc
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
all: clean lsusb.txt syslog.log uname.txt scan.md
clean:
rm -f lsusb.txt syslog.log uname.txt scan.md
scan.md:
python -m decocare.scan | tee $@
uname.txt:
uname -r > $@
lsusb.txt:
lsusb > $@
syslog.log:
tail -n 30 /var/log/syslog > $@

/dev/serial/by-id/usb-0a21_8001-if00-port0

May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:15 hither logger: START
May 12 18:17:22 hither kernel: [573484.127155] usb 3-3: new full-speed USB device number 96 using xhci_hcd
May 12 18:17:22 hither kernel: [573484.257462] usb 3-3: New USB device found, idVendor=0a21, idProduct=8001
May 12 18:17:22 hither kernel: [573484.257470] usb 3-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
May 12 18:17:22 hither kernel: [573484.258291] usbserial_generic 3-3:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
May 12 18:17:22 hither kernel: [573484.258300] usbserial_generic 3-3:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
May 12 18:17:22 hither kernel: [573484.258304] usbserial_generic 3-3:1.0: generic converter detected
May 12 18:17:22 hither kernel: [573484.258492] usb 3-3: generic converter now attached to ttyUSB0
May 12 18:17:22 hither mtp-probe: checking bus 3, device 96: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
May 12 18:17:22 hither mtp-probe: bus: 3, device: 96 was not an MTP device
May 12 18:41:58 hither kernel: [574962.005130] usb 3-3: USB disconnect, device number 96
May 12 18:41:58 hither kernel: [574962.005320] generic ttyUSB0: generic converter now disconnected from ttyUSB0
May 12 18:41:58 hither kernel: [574962.005344] usbserial_generic 3-3:1.0: device disconnected
May 12 18:42:12 hither kernel: [574975.681580] usb 3-3: new full-speed USB device number 97 using xhci_hcd
May 12 18:42:12 hither kernel: [574975.811921] usb 3-3: New USB device found, idVendor=0a21, idProduct=8001
May 12 18:42:12 hither kernel: [574975.811929] usb 3-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
May 12 18:42:12 hither kernel: [574975.812765] usbserial_generic 3-3:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
May 12 18:42:12 hither kernel: [574975.812772] usbserial_generic 3-3:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
May 12 18:42:12 hither kernel: [574975.812776] usbserial_generic 3-3:1.0: generic converter detected
May 12 18:42:12 hither kernel: [574975.813007] usb 3-3: generic converter now attached to ttyUSB0
May 12 18:42:12 hither mtp-probe: checking bus 3, device 97: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
May 12 18:42:12 hither mtp-probe: bus: 3, device: 97 was not an MTP device
3.16.0-30-generic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.