Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for communicating with usb equipment in mac system

A device and communication technology, applied in the field of communication, can solve problems such as error reporting and lower user experience

Active Publication Date: 2018-11-30
FEITIAN TECHNOLOGIES
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the prior art, when using a USB device in an operating system above Mac10.10, if the USB device is inserted before the installation package file of the USB device is installed, the system will exclusively enjoy the communication authority of the USB device for the first time , so when other applications access the USB device, the system will report an error; in order for other applications to obtain the communication permission of the USB device, the user needs to re-plug the USB device, which reduces the user experience

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for communicating with usb equipment in mac system
  • Method and device for communicating with usb equipment in mac system
  • Method and device for communicating with usb equipment in mac system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0129] Embodiment 1 of the present invention provides a method for communicating with a USB device in a Mac system, such as figure 1 shown, including:

[0130] Step 101: the application obtains the device information of the inserted USB device, and finds the first device information matching the target USB device in the obtained device information;

[0131] In this embodiment, before step 101, it also includes: the application creates a first device dictionary, and adds the device information of the target USB device to the first device dictionary;

[0132] Correspondingly, finding the first device information that matches the target USB device in the obtained device information, specifically: finding the same first device information as the device information in the first device dictionary in the obtained device information ;

[0133] It should be noted that in this embodiment, the application program registers a monitoring function in the system to monitor the insertion of...

Embodiment 2

[0176] Embodiment 2 of the present invention provides a method for communicating with a USB device in a Mac system. The device type of the USB device in this embodiment is SCSI, such as figure 2 shown, including:

[0177] Step 201: the application program creates the first device dictionary, and starts the monitoring thread to monitor the insertion of the USB device in real time, and when the USB device is detected to be inserted, perform step 202;

[0178] Specifically, the application program calls the master port, creates a first device dictionary in the master port and adds the device information of the target USB device to the first device dictionary; preferably, in this embodiment, the master port called is IOMasterPort(MACH_PORT_NULL ,&masterPort), wherein, &masterPort is specifically the handle of the called master port, the first device dictionary created is matchingDict, and the application program adds the PID and VID of the target USB device to the matchingDict; ...

Embodiment 3

[0228] Embodiment 3 of the present invention provides a method for communicating with a USB device in a Mac system, such as image 3 shown, including:

[0229] Step 301: the application program creates the first device dictionary, and starts the monitoring thread to monitor the insertion of the USB device in real time, and when the USB device is detected to be inserted, perform step 302;

[0230] Specifically, the application program calls the master port, creates a first device dictionary in the master port and adds the device information of the target USB device to the first device dictionary; preferably, in this embodiment, the master port called is IOMasterPort(MACH_PORT_NULL ,&masterPort), wherein, &masterPort is specifically the handle of the called master port, the first device dictionary created is matchingDict, and the application program adds the PID and VID of the target USB device to the matchingDict;

[0231] For example, if the PID of the target USB device is 06...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for communicating with USB (universal serial bus) equipment in an Mac system, and belongs to the field of communication. The method comprises the following steps that an application program obtains equipment information inserted into the USB equipment; finding first equipment information matched with the target USB equipment from the obtained equipment information; connecting the USB equipment corresponding to the first equipment information; if preset error code is received, calling a preset function interface to enumerate the USB equipment corresponding to the first equipment information; or disconnecting the USB equipment corresponding to the first equipment information and the system and building the connection again; if the connection is successful, performing data communication with the USB equipment corresponding to the first equipment information. By using the technical scheme, when the system enjoys the communication authority of the USB equipment alone, the plug-unplug of the USB equipment can be simulated, so that the communication authority of the USB equipment can be obtained by other application; the user operation is reduced; the user experience is improved.

Description

technical field [0001] The invention relates to the communication field, in particular to a method and a device for communicating with a USB device in a Mac system. Background technique [0002] In the prior art, when using a USB device in an operating system above Mac10.10, if the USB device is inserted before installing the installation package file of the USB device, the system will exclusively enjoy the communication authority of the USB device for the first time , so when other applications access the USB device, the system will report an error; and in order for other applications to obtain the communication permission of the USB device, the user needs to re-plug the USB device, which reduces the user experience. Contents of the invention [0003] In order to solve the technical problems existing in the prior art, the present invention provides a method and device for communicating with a USB device in a Mac system. [0004] In one aspect, the present invention provi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F13/10G06F13/42
CPCG06F13/102G06F13/4282G06F2213/0042
Inventor 陆舟于华章
Owner FEITIAN TECHNOLOGIES