Giter Site home page Giter Site logo

usb-sniffer-lite's People

Contributors

ataradov avatar telix001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

usb-sniffer-lite's Issues

Does not function yet

Hi Ataradov,

I installed the UF2 and made me a primitive cable.
Can get the menu in a terminal screen, but i can't get it to capture any data.
Both USB connectors are connected to the same bus.

And i do not understand the function of the start key, can you explain this to me?

Kind regards,
Willem Ouwerkerk

Excuse me to take your time, 1250364116

Thanks, i saw some of those devices but i want something a little bit different.
Excuse me to take your time,
as you said if the pio usb sampler finds the start of the bit then it will
sample the data synchronized till something stopes it, so if nothing stops
the pio, i do not think the pio would miss the start of the bit.
Second, you mean the keyboard has low Performance which causes noises? Or
this is microcontroller?

Originally posted by @1250364116 in #20 (comment)

Before opening this issue, had this project 9 issue open. 6 of them were opened by @1250364116. All six got an answer from @ataradov. None those answers were used by @1250364116 to improve the documentation. However @1250364116 keeps taking without giving back.

This issue is for creating awareness of that unbalanced situation.

development environment

hi, i'm trying to use your code. my question is what sort of SDK or toolchain can compile your code?
i tried to compile your code by official SDK that raspbery has published for pico boards, but it seems that sdk has been designed to work
with pico/stdlib.h not your rp2040.h library.

Here is an udev rule

Hi,
this set of udev rules does:

  • Puts device into group plugdev
  • Create symlink /dev/usbsniffer
  • Ensure the ModemManager does not touch our device

Reasons:

If the user is member of group plugdev, there is no need for sudo.
/dev/ttyACMx is volatile and the x can change from boot to boot. The symlink stays constant.
(You could also use the /dev/serial/by-id/xxxxxx, but that is not too easy to remember.
The Modem Manager tries to talk to ttyACMx devices for about 20 seconds after plugin. That can disturb communication.

70-UsbSniffer.rules.txt

Remove the .txt from the name and copy to /etc&udev/rules.d.

Feel free to add it to the repo.

Contents:

# CDC-ACM interface for USB Sniffer
# Create symlinks for CDC-ACM
# Put device into group plugdev
# Ensure the ModemManager does not touch our device

ATTRS{idVendor}=="6666", SUBSYSTEM=="tty", SYMLINK+="usbsniffer", MODE="660", GROUP="plugdev"

ATTRS{idVendor}=="6666", SUBSYSTEM=="tty", \
	ENV{ID_MM_PORT_IGNORE}="1", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_CANDIDATE}="0"

continuous data capture

Hi, your program always needs a start button to be pushed to capture the data, and it will stop after a few moments.
how it will be if I try to make the logger to capture the data continuously without any start command?
Is there any consideration I need to make about changing the program in this way?

synchronization error

hi alex. when i work with keyboard the device prints accidently synchronization error message. in other words device captures the strokes in some cycles and does not capture anything in other times because of synchronization error while I have configured the device speed correctly. what this synchronization error exactly means? because I saw when the size is more than 0xffff this message is printed out. what does this criteria mean?

Error issue

hi, i am testing your code. it gives for each keystroke an error. can you help me?

Capture

PIO frequency

Hello,

I would like to know the PIO clock frequency. From what I understand, in low-speed mode the PIO clock divider is set to 8, and in full-speed mode, the divider is set to 1. Given that the system clock frequency is 120 MHz, this means that the PIO clock would be 120 MHz in full-speed mode and 15 MHz in low-speed mode.Similarly, for the USB clock, in low-speed mode, the frequency is 1.5 MHz, and in full-speed mode, it is 12 MHz.
Is this correct? If so, why is the PIO frequency ten times higher than the USB clock frequency?

Synchronization issue

Hi,
I have to say, this is really handy tool for USB FS debugging!
It already helped me to analyze some issues and improve bandwidth of device I am working on.
Now, I am trying to capture high load conditions. Unfortunately, I get:

Capture started
Capture stopped
Synchronization error. Check your speed setting.

I read though #4 and understood, that synchronization is problematic under load.
In my case, I have to open connection and then provide some data to load the bus. When I start capture and then open connection, packet buffer fills up before I manage to push some data.

Using trigger does not help, because it synchronizes on trigger.

Would it be possible to synchronize on start (s) and stay synced until capture is triggered?
Trigger input would serve only as a trigger for capture (storing into memory)

When I connect both the D+ and D- wires to the board, the connection between the testing Cool Disk with the computer is lost!

Hello
Thanks for your interesting design.

I made the circuit and I saw its menu with the Putty terminal program and the LED was blinking and I used a cool disk for testing, but there was a problem.

When I disconnect one of the wires connected to GPIO 10 or GPIO 11 from the pico board, Cool Disk works and is recognized by the computer.

But when I connect both the D+ (Green) and D- (White) wires to the board, the connection between the Cool Disk and the computer is disconnected.

Please advise.

Thanks

Pokken Tournament DX Controller Spewing Errors

So I am trying to sniff the communication between a Nintendo Switch and a Pokken Tournament DX controller and am just seeing it spew errors. The controller is working fine on the switch and I have sniffed other controllers hooked up to the switch with no problems, but I am stumped as to why this controller is having issues. I have attached a pretty typical capture of the controller. Any advice would be appreciated.
teraterm.log

UART problem

I'm not quite sure how to use UART0 in your "baremetal development environment." I don't want to make a mess, haha. Could you send me a small proof of concept to print some debug information at 115200 on the USB sniffer?

this dont works

static void uart_init(uint32_t baud)
{
  RESETS_CLR->RESET = RESETS_RESET_uart0_Msk;
  while (0 == RESETS->RESET_DONE_b.uart0);

  baud = (F_PER * 4) / baud;

  UART0->UARTIBRD = baud / 64;
  UART0->UARTFBRD = baud % 64;

  UART0->UARTLCR_H = (3/*8 bits*/ << UART0_UARTLCR_H_WLEN_Pos) | UART0_UARTLCR_H_FEN_Msk;
  UART0->UARTCR = UART0_UARTCR_UARTEN_Msk | UART0_UARTCR_RXE_Msk | UART0_UARTCR_TXE_Msk;

  HAL_GPIO_UART_TX_init();
  HAL_GPIO_UART_RX_init();
}

awesome project @ataradov

I need to use UART+ VCP

BIN2UF2 PROBLEM

Hi. i tried to compile your code in Ubuntu, I have ARM GCC and Make in my Linux PATH. but when i try to run Makefile it gives an error
that bin2uf2 does not exist. I tried to find bin2uf2 for ubuntu but didn't find something useful. Where did you find bin2uf2?

other rp2040 libraries

hello. i think your libraries for rp2040 is far more better for developing new programs by rp2040 than its SDK libraries distributed by its company. i want to know, have you developed libraries for other rp2040 peripherals like SPI or UART? if yes, can I have those?

contents of the buffer

hello. As I see, the pio0 for each 32-bit sampled data fills the buffer by two values: the size of the sampled data and the sampled 32-bit data itself. then you add the end time of sampling that data as the third element. thus for each 32 data sampling, the buffer is filled by 3 elements in a row. but sometimes pio0 pushes out another element as a fourth value which is 0xFFFFFFFF.
so, what is this value and what does it mean? is it a flag for the end of the frame?

Linker error

Hello, I keep getting the following error when I try to build the project as is. I have made no changes to any of the source or linker files yet.

"/usb-sniffer-lite-main/firmware/linker/rp2040.ld:21 cannot move location counter backwards (from 000000001000014c to 00000000100000fc)"

I have read up a bit and this hints at an application that is too large(?) to fit in memory. I cannot figure out why though. Any help here would be greatly appreciated. I am also unable to understand the purpose of linking to the address 0x10000000. Could you explain that as well?

Thanks.

A QUESTION ABOUT C CODE

Hi, I have read your code and learned a lot about raspbery rp2040 capabilities by analyzing your code. I admire your great work
it is very fantastic. as I understood you are capturing data using pio and then processing the captured data to show everything on the
display. all of this process is in a while loop which is running by core1.
the strange thing for me is what your core0 is running in the while(1) loop. what is the purpose of this section, while everything
we need to capture the data is running on core1?

buffer size for capture the data

Hi, Iโ€™d like to understand the reason behind choosing a buffer size of 232 kilobytes. If I were to halve this size to create some extra free space for RAM, would it have any impact or change the behavior of the system?

Nice, it would be interesting to add other protocols - Alternative for the Saleae Logic Analyzer

Hi,

Very cool this project with RP2040, it would be interesting to add other protocols.

As the Saleae analyzer also has an interface application for Windows, Linux and MAC, maybe it could be interesting to choose to add protocols not supported by Saleae to the RP2040.

Here is a list of protocols that Saleae's logic analyzer supports:

The Saleae Logic software includes the following protocol analyzers:

  • 1-Wire
  • Asynchronous Serial
  • Atmel SWI (Single Wire Interface)
  • BISS-C
  • CAN (Controller Area Network)
  • DMX512
  • HD44780 Parallel LCD
  • HDLC (High-Level Data Link Control)
  • HDMI-CEC
  • I2C
  • I2S Audio / PCM
  • I3C (see section below)
  • JTAG
  • LIN (Local Interconnect Network)
  • MDIO (Management Data Input/Output)
  • MIDI
  • Manchester (Differential, Bi-Phase Space, and Bi-Phase Mark)
  • Modbus RTU & ASCII
  • PS2 Keyboard & Mouse
  • SMBus (includes PMBus and Smart Battery)
  • SPI (Serial Peripheral Interface)
  • SWD (ARM Serial Wire Debug)
  • Synchronous Parallel
  • USB Low Speed and Full Speed
  • I3C Protocol Support

https://support.saleae.com/protocol-analyzers/supported-protocols

protocol-decoders

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.