{"id":35015662,"url":"https://github.com/mdda/usb-scope","last_synced_at":"2026-05-19T20:32:04.059Z","repository":{"id":28704811,"uuid":"32225304","full_name":"mdda/usb-scope","owner":"mdda","description":" Oscilloscope GUI for the Pololu USB Programmer ","archived":false,"fork":false,"pushed_at":"2015-03-14T18:37:23.000Z","size":208,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-11T07:58:15.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-14T18:10:14.000Z","updated_at":"2019-04-14T16:11:27.000Z","dependencies_parsed_at":"2022-09-12T23:50:42.157Z","dependency_job_id":null,"html_url":"https://github.com/mdda/usb-scope","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/mdda/usb-scope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdda%2Fusb-scope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdda%2Fusb-scope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdda%2Fusb-scope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdda%2Fusb-scope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdda","download_url":"https://codeload.github.com/mdda/usb-scope/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdda%2Fusb-scope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28072870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T05:19:29.735Z","updated_at":"2025-12-27T05:19:30.107Z","avatar_url":"https://github.com/mdda.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# usb-scope\n\n( Automatically exported from code.google.com/p/usb-scope )\n\nThe Pololu USB Programmer device includes two extra ports that can sample analog data at 10KHz.\n\nPololu has created a Windows-only oscilloscope utility. However, now that robotics is attracting more and more 'software types', a cross-platform version SLOscope is essential.\n\nThis project provides both a configuration utility for the USB device, and a 'wxWidgets-based' SLOscope oscilloscope GUI. While Pololu have provided some help (like hardware specs, and moral support), this is a totally independent project.\n\nIt's all cross-platform, easily buildable, and open source. Have fun!\nCode Coming Soon !\n\n## Building the SLOscope code\n\n### Introduction\n\nThe SLOscope source was developed on a Linux box running Fedora.  However, the tools used means that it should be seamlessly buildable on each of these platforms : \n\n  * Linux\n    * Fedora\n    * Ubuntu\n    * etc...\n  * MacOS\n  * Windows\n    * Microsoft compilers\n    * GNU compilers\n    * etc...\n\nOnce you've managed to build the project on your platform (especially if it's not Linux), please let us know your experiences!  Ideally, we'll be able to host installable binaries here too, so that _regular users_ of the Windows and Mac platforms can install it quickly too.\n\n\n###  Building the project : Generic \n\nThe prerequisite for doing these steps is an installation of 'cmake', and 'svn'.\n\n # Check out the code (this will create a new sub-directory with the code in it) : \n   * `svn checkout http://usb-scope.googlecode.com/svn/trunk/ usb-scope-read-only`\n # Go to the build directory within the downloaded code : `cd build`\n # To create a suitable Makefile  v. cool), execute : `cmake ..`\n   * Did you type that in correctly?  The 'cmake' is followed by space and two dots...\n # Finally, execute : `make`\n\nOn Linux, because of it's security model, you'll have to inform the usb device manager that ordinary users should have permission to write to the device (see [LinuxUSBdev]).\n\nTo run the software, just type one of the following (still in the build directory) :\n  * `usb-programmer-config`\n  * `SLOscope`\n\n\n### Specific Instructions : Linux (Fedora) \n\nTo install cmake and svn initially just type : `yum install cmake svn`.\n\nThe `cmake ..` automatically detects the installed software, so that it can build the makefile appropriately.  Along the way it may request wxWidgets (which, on the Fedora machine means an installation of the platform-specific library wxGTK, plus its headers) :\n  * `yum install wxGTK wxGTK-devel`\n\nSomehow, the correct libusb was already installed.\n\nThen, the rest of the build / run process works seamlessly (after applying the [LinuxUSBdev] magic).\n\n\n##  Modifying (and hopefully improving) the software\n\n### Modifying the GUI : Generic \nFor modifying the GUI, you'll need wxglade installed.  This has the capability of modifying the C++ source code in-place, without destroying the customisation that was developed 'on top'.\n\n*  Launch 'wxglade src/USBconfig.wxg' or 'wxglade src/SLOscope.wxg' \n*  Generate code (don't overwrite existing code - let it update the existing)\n*  Rebuild\n\n\n### Developing on Linux\n\nOn Fedora, to install wxGlade : `yum install wxGlade`\n\nTo build and (if successful) run in the ./build directory : \n`make \u0026\u0026 ./SLOscope`\n\n\n## Command-line options for the configuration tool\n\n### Introduction\n\n```\n$ ./usb-programmer-config --help\nUsage: usb-programmer-config [-h] [-g] [-q] [-d] [-s \u003cnum\u003e] [-p \u003cnum\u003e] [-a \u003cstr\u003e] [-b \u003cstr\u003e]\n  -h, --help        \tdisplays help on the command line parameters\n  -g, --gui         \tenables the GUI (not yet)\n  -q, --quiet       \tdon't show device settings\n  -d, --dump        \tview current settings in parsable format\n  -s, --slo=\u003cnum\u003e   \tset SLO scope state: 0=off, 1=2A, 2=1A.1D\n  -p, --period=\u003cnum\u003e\tset SLO scope period (new reading every (period+1)/12 microseconds, normal=539)\n  -a, --line_a=\u003cstr\u003e\tset line A state : { i|input, 0|low, 1|high }\n  -b, --line_b=\u003cstr\u003e\tset line B state : { i|input, 0|low, 1|high }\n```\n\nNB: If the usb-programmer-config complains : 'USB error: error sending control message: Operation not permitted', then try rerunning it as root - something funky was happening on one of my machines without that.  This may be a 'udev' problem (to do with the permissions that linux gives the device nodes when it finds them).  More info soon.\n\n```\n# ./usb-programmer-config --slo=1 --line_a=i --line_b=0\nusb_set_debug: Setting debugging level to 2 (on)\nPololu USB programmer : HW version 15, SW version 2.10\n  SLOscope mode : 2 analog inputs, 10KHz\n    Sampling every 45.000 us\n    Reference Voltage (1.024V) registers : 14400\n    Direction of external lines :\n      Line A : Input\n      Line B : Ouput Low\n```\n\n\n## Running the SLOscope Oscilloscope GUI \n\n\n## Linux USBDev :   Getting user access to the USB device\n\n### Problem\n\nSince the Linux kernel doesn't 'know' the Pololu device, it doesn't give regular users privileges to write to it.\n\n### Details - and quick fix \n\n```\n$ usb-programmer-config\nGives meaning-less, and inconsistent results for the HW version (for instance)\n```\n\nwhile (doing the same as root) :\n```\n# usb-programmer-config\nLook different (and correct)\n```\n\nCheck the device permissions :\n\n```\n# lsusb \nBus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\nBus 004 Device 003: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse\nBus 004 Device 002: ID 413c:2003 Dell Computer Corp. Keyboard\nBus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\nBus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\nBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\nBus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\nBus 007 Device 011: ID 1ffb:0081  \nBus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\nBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\nBus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\n\n[root@madison build]# ls -l /dev/bus/usb/007/011 \ncrw-rw-r-- 1 root root 189, 778 2009-10-13 20:59 /dev/bus/usb/007/011\n\n[root@madison build]# chmod 666 /dev/bus/usb/007/011 \n```\n\nNow : \n```\n$ usb-programmer-config\nWorks beautifully...\n```\n\n### Details - and permanent fix  *work in progress* \n\nNeed to create a 'udev rule' to assign the permissions when the device is plugged in.\n\nCreate a file called `/etc/udev/rules.d/65-pololu.rules` that contains :\n\n\n(for Linux Ubuntu 7.10 - based on what I've read) :\n```\n# udev rules file for Pololu SLOscope USB device (for udev 0.98 version)\n\nSUBSYSTEM!=\"usb_device\", GOTO=\"pololu_rules_end\"\nACTION!=\"add\", GOTO=\"pololu_rules_end\"\n\nATTRS{idVendor}==\"1ffb\", ATTRS{idProduct}==\"0081\", MODE=\"0666\"\n\nLABEL=\"pololu_rules_end\" \n```\n\n(for Fedora 11 - this is tested, and really works) :\n```\n# udev rules file for Pololu SLOscope USB device (for udev 0.98 version)\n\nSUBSYSTEM!=\"usb\", GOTO=\"pololu_rules_end\"\nACTION!=\"add\", GOTO=\"pololu_rules_end\"\n\nSYSFS{idVendor}==\"1ffb\", SYSFS{idProduct}==\"0081\", MODE=\"0666\"\n\nLABEL=\"pololu_rules_end\" \n```\n\nTest this with : `udevtest /bus/usb/devices/7-1`, if the device is under `/dev/bus/usb/007` ...\n\n\n###  Complaint \n\nAnd, yes, I'm aware that this should be done with !ConsoleKit and HAL (and / or !DeviceKit).  But don't you think I would have been able to figure it out if it were documented properly ??  YMMV.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdda%2Fusb-scope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdda%2Fusb-scope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdda%2Fusb-scope/lists"}