{"id":13826777,"url":"https://github.com/pyblendnet-js/realtermbuspiratesniff","last_synced_at":"2025-07-09T01:31:23.874Z","repository":{"id":48328833,"uuid":"44100620","full_name":"pyblendnet-js/RealTermBusPirateSniff","owner":"pyblendnet-js","description":"Bus Pirate SPI sniffer using RealTerm for highspeed transfer","archived":false,"fork":false,"pushed_at":"2015-10-18T09:27:57.000Z","size":136,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-05T09:15:41.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Visual Basic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyblendnet-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-12T10:31:24.000Z","updated_at":"2022-07-22T18:44:59.000Z","dependencies_parsed_at":"2022-08-29T18:31:20.797Z","dependency_job_id":null,"html_url":"https://github.com/pyblendnet-js/RealTermBusPirateSniff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyblendnet-js%2FRealTermBusPirateSniff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyblendnet-js%2FRealTermBusPirateSniff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyblendnet-js%2FRealTermBusPirateSniff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyblendnet-js%2FRealTermBusPirateSniff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyblendnet-js","download_url":"https://codeload.github.com/pyblendnet-js/RealTermBusPirateSniff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476383,"owners_count":17480215,"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","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":"2024-08-04T09:01:43.975Z","updated_at":"2024-11-20T05:31:05.592Z","avatar_url":"https://github.com/pyblendnet-js.png","language":"Visual Basic","funding_links":[],"categories":["\u003ca id=\"7bf0f5839fb2827fdc1b93ae6ac7f53d\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"32739127f0c38d61b14448c66a797098\"\u003e\u003c/a\u003e嗅探\u0026\u0026Sniff"],"readme":"\u003chtml\u003e\n\u003cbody\u003e\n\u003ch1\u003eRealTerm BusPirate Sniff\u003c/h1\u003e\nApplies faster baud rate to real term and launches bus pirate SPI sniffer.\n\u003ch2\u003eIntroduction\u003c/h2\u003e\n\u003cp\u003eThe \u003ca href=\"http://dangerousprototypes.com/docs/Bus_Pirate\"\u003eBus Pirate\u003c/a\u003e has at least three other out-of-the-box methods of sniffing SPI data from a Master and Slave communication:\u003cp\u003e\n\u003cul\u003e\n  \u003cli\u003eThe Bus Pirate GUI\u003c/li\u003e\n  \u003cli\u003e\u003ca href=http://dangerousprototypes.com/docs/Bus_Pirate_binary_SPI_sniffer_utility\u003e\n      Bus Pirate SPI Sniffer Utility\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003eThird party tools such as the Sump Logic Analyzer Client - an example \u003ca href=\"\"\u003ehere\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eI believe the fastest of these may be the sniffer utility.\n   I used BusPirate.SPIsniffer.v0.3 application with a version 3.0 Spark Fun Bus Pirate Clone to sniff the SPI data between a microcontroller and a BK2421 tranceiver slave device from an MJX RC helicopter.\n   This was fine to grab the initialisation sequence but the 115200 baud FTDI USB link to the laptop could not keep up long after that.  I was able to interpret the hex code grabbed using my own parser - see my GitHub project at \u003ca href=\"https://github.com/pyblendnet-js/parseSPI\"/\u003eParseSPI\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eFor higher speed comms, I discovered the solution had been found on this post:\u003ca href=\"http://dangerousprototypes.com/forum/viewtopic.php?f=4\u0026t=6765\u0026p=59413\u0026hilit=SPIsniffer#p59413\"\u003eUsing Bus Pirate with SPI Sniffer\u003c/a\u003e.  Armed with this, the \u003ca href=\"http://dangerousprototypes.com/docs/SPI_(binary)\"\u003eBus Pirate SPI API\u003c/a\u003e and the \u003ca href=\"http://realterm.sourceforge.net/\"\u003eReal Term\u003c/a\u003e help file, iwas able to develop this small console program in visual basic (VS2010) to automate the process of receiving the sniffed data at 800000 baud.\u003c/p\u003e\n\u003ch2\u003eInstallation\u003c/h2\u003e\n\u003cp\u003eI will never include executables in my github repositories so if you find one there - beware.\u003c/p\u003e  \n\u003cp\u003eThis project was compiled with Visual Studio 2010 but there should be no reason why it cannot be compiled with Visual Studio Community 2013.\n  Once you have installed Visual Studio, open the .sln project file and rebuild.\n  Install \u003ca href=\"https://sourceforge.net/p/realterm\"\u003eRealTerm\u003c/a\u003e from\n   \u003ca href=\"http://realterm.sourceforge.net/index.html#downloads_Download\"\u003ehere\u003c/a\u003e with all the recommended service registrations \n   (I don't understand how these work but they allow RealTerm to be included as an activeX component in the visual studio project).\n  The installer I used was named \u003ci\u003eRealterm_2.0.0.70_Signed_Wrapper_setup.exe\u003c/i\u003e\u003c/p\u003e \n\u003ch2\u003eUsage\u003c/h2\u003e\n\u003cp\u003eThe compiled executable can found in the debug directory and can be run with an optional path for the captured data followed by an optional virtual com port number.\u003c/p\u003e\n\u003cp\u003e e.g. \u003cb\u003e\u003ci\u003eRealTermBusPirateSniff.exe C:\\Users\\home\\Documents\\bp1.txt 4\u003c/i\u003e\u003c/b\u003e\u003cp\u003e\n\u003cp\u003eThe default is to save it to the executable directory as bp.txt.\u003c/p\u003e\n\u003cp\u003eThe default com port is COM9, but this is just the port that bus pirate was given when I first used it.\u003c/p\u003e\n  After some issues with a faulty USB cable, the port changed to COM5 as could be seen in the Device Manager.\u003c/p\u003e\n  The program will open an instance of RealTerm (assuming it has been registered as an ActiveX control as per the installation process) and will attempt to open the bus pirated at Com9 (or your selected Com port).\n\u003cp\u003eIf all goes well, the Real Term application will establish contact with the bus pirate, renegotiate baud rate from\n    115200 up to 800000 baud and then prepare the bus pirate for SPI sniffing.\u003c/p\u003e\n\u003cp\u003eFor sniffing the master and slave systems using the Bus Pirate, I have 3K9 resistors on the inputs to the Bus Pirate.\u003c/p\u003e\t \n\u003cp\u003eEven with this protection, and though it should be safe to do otherwise anyhow,\n\tI do not power the master and slave system until this stage is reached.\u003c/p\u003e.\n\u003cp\u003eNote:I also use 3K9 resistors in the all the connected lines to attempt to protect the devices from output mismatches.\u003cp\u003e\n\u003cp\u003eAt this stage it is possible to make further configeration changes directly in the RealTerm gui if required.\n   Otherwise return to the RealTermBusPirateSniff console.\u003c/p\u003e\n    \u003cp\u003eOnce the system is ready to sniff, press any key to commence sniffing and once more to stop.\u003c/p\u003e\n    \u003cp\u003eThe program should then restore to Bus Pirate to it's original state and close the program.\u003c/p\u003e\n\t\u003cp\u003eIf things go belly up and the Bus Pirate is left in the higher baud rate mode, running my program again will still reach a position ready for capture.\u003c/p\u003e\n    \u003cp\u003eYou will notice that the data is prefixed with hex 01, but otherwise follows the raw hex protocol with 0xHB to start a packet, 0xHD to end a packet, and 0xHC to start each Master and Slave data pairs.\u003cp\u003e\n\t\u003cp\u003eI have not found a way to tell how much data that RealTerm has downloaded until I stop the capture - if anyone knows please let me know.\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyblendnet-js%2Frealtermbuspiratesniff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyblendnet-js%2Frealtermbuspiratesniff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyblendnet-js%2Frealtermbuspiratesniff/lists"}