Dnw application and driver compilation instructions

Source: Internet
Author: User
Tags dmesg
Dnw application and driver compilation Instructions 1. modify the ID number: 1. make sure that the ID number enters Uboot or Superboot when the development board is powered on. Insert the USB cable to the U port of the host and use dmesg to check the connection status of the USB device. if a new device is connected to the USB device, indicates that the development board is connected... dnw application and driver compilation Instructions 1. modify the ID number: 1. make sure that the ID number enters Uboot or Superboot when the development board is powered on. Insert the USB cable to the U port of the host and use dmesg to check the connection status of the USB device. if a new device is connected to the USB device, indicates that the development board is connected. you can run the lsusb command to view: liwei @ liwei :~ $ LsusbBus 005 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hubBus 004 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hubBus 003 Device 002: ID 0403: 6001 Future Technology Devices International, Ltd ftbench USB-Serial (UART) ICBus 003 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hubBus 002 Device 003: ID 046d: c315 Logitech, Inc. classic New Touch keyboar0000002 Device 002: ID 093a: 25 10 Pixart Imaging, Inc. hama Optical MouseBus 002 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hubBus 001 Device 044: ID 5345: 1234 Owon PDS6062T OscilloscopeBus 001 Device 042: ID 18e3: 9103 Fitipower Integrated Technology IncBus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hubliwei @ liwei :~ $ We will find the following line: Bus 001 Device 044: ID 5345: 1234 Owon PDS6062T Oscilloscope indicates that the host has recognized this Device, but we only care about the sentence ID 5345: 1234, it contains the required VENDOR_ID: 0x5345 and PRODUCT_ID: 0x1234. this is exactly what we need to modify in the driver. 2. modify the ID number in the driver secbulk. in c, modify the above ID as follows: # define EZ6410_PRODUCT_ID static struct usb_device_id secbulk_table [] ={{ USB_DEVICE (0x5345, 0x1234) },{}; 3. install the usb-dev Library :~ # Sudo apt-get install libusb-dev 2. add the CheckSum function. after dnw. c is compiled, a CheckSum Error occurs during running, because the verification process is not completed in Our sending function. We can add the following content before writing a function: /// // add by wei ///////////// ////////// add the CheckSum function file_buffer [file_stat.st_size + 8] = sum; file_buffer [file_stat.st_size + 9] = sum> 8; /// // end of add ///////////// //// // to this point, A dnw program with the basic transmission function can be used. NOTE: the final code is in the "final program" directory. you only need to execute the relevant make. sh file in the code to complete the compilation :~ #./Make. sh first, use :~ # Sudo insmod secbulk to insert our driver. Second, use the following command in the system to create the device node used :~ # Sudo mknod/dev/secbulk c 102 0 and then we can start our dnw program.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.