newlandmark

bad_usb_ch552+437243R

 
Overview

hardware design

  1. Use ch552g as the main control chip;
  2. Use flash chip (W25Q64) and TF card as storage carrier, disguised as USB disk/card reader;
  3. External human-computer interaction is performed through buttons, and LED flashing is used to feedback the execution status.

software design

  1. HID device communication protocol: When the device is plugged into the computer, it acts as a mouse/keyboard/USB disk composite device, automatically opens the cmd command line window and enters commands;
  2. SPI communication protocol: read and write TF card and flash chip through SPI communication protocol;
  3. FAT32 file management system: manages tf card and flash data;
  4. txt file reading: Save the file with a specific name, and the device will automatically execute the instructions inside when it is plugged into the computer.

Implemented functionality

  1. As shown in the figure below, this device combines the functions of keyboard, mouse and USB flash drive.

picture.png

2. The mouse/keyboard execution program can be written during burning, or the data file can be copied to a USB flash drive for saving.

3. The device has 3 buttons, one is used temporarily. When inserting the USB disk, if key0 is pressed, the saved mouse/keyboard execution program will not be executed, otherwise it will be automatically executed 1s after the USB initialization is completed.

4. The mouse/keyboard execution program can be generated with a python program (see attachment). It has functions such as delay, key press, string, mouse movement/press/wheel, drawing pictures, etc., which basically meets all operational needs. At this stage, python The program generates a mouse/keyboard executable program based on code, and its visualization work is in progress.

5. There are still bugs in the device (which do not affect the basic functions). The U disk memory is small and the function of the memory card is not added for the time being. These problems will be solved next and it will be disguised as a card reader. Only press key0 In order to display the flash U disk and change the mouse/keyboard executable program, and map key1/key2 to other programs that execute the code, in addition, using badusb with cc2540 with Bluetooth is also being tested, and the Bluetooth connection simulation using the mobile phone will be realized Mouse/button, Bluetooth reading TF card and other functions.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-22 20:53:54

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号