CN104239097B - A kind of method, system and mobile terminal by updating mobile terminal accessory - Google Patents
- ️Tue Jan 16 2018
Info
-
Publication number
- CN104239097B CN104239097B CN201410445897.9A CN201410445897A CN104239097B CN 104239097 B CN104239097 B CN 104239097B CN 201410445897 A CN201410445897 A CN 201410445897A CN 104239097 B CN104239097 B CN 104239097B Authority
- CN
- China Prior art keywords
- accessory
- mobile terminal
- firmware
- uart
- data Prior art date
- 2014-09-03 Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Stored Programmes (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明适用于升级技术领域,提供了一种通过移动终端升级配件的方法、系统及移动终端,所述移动终端包括CPU,所述移动终端还包括一个与所述CPU连接的转换开关,通过所述转换开关,与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D‑与所述CPU的i2c/uart连接,所述方法包括:存储配件的固件至移动终端中;移动终端与配件建立连接;移动终端通过OTG转接头以及与所述OTG转接头连接的USB线的D+/D‑按照i2c/uart协议发送固件至配件;或者移动终端通过USB线的D+/D‑按照i2c/uart协议发送固件至配件。本发明,配件出厂后,若遇上严重bug或者后续需要添加新功能时,可以通过移动终端升级固件,不需要将配件返回厂家,用户在当地即能操作,而且简单便携。
The present invention is applicable to the technical field of upgrading, and provides a method, system and mobile terminal for upgrading accessories through a mobile terminal. The mobile terminal includes a CPU, and the mobile terminal also includes a switch connected to the CPU. Through the The conversion switch, the OTG adapter connected to the mobile terminal or the D+/D- of the USB cable connected to the mobile terminal is connected to the i2c/uart of the CPU, and the method includes: storing the firmware of the accessory to the mobile In the terminal; the mobile terminal establishes a connection with the accessory; the mobile terminal sends the firmware to the accessory according to the i2c/uart protocol through the OTG adapter and the D+/D- of the USB cable connected to the OTG adapter; or the mobile terminal sends the firmware to the accessory through the D+ of the USB cable. /D‑Send firmware to accessory according to i2c/uart protocol. In the present invention, after the accessories leave the factory, if there is a serious bug or a new function needs to be added later, the firmware can be upgraded through the mobile terminal without returning the accessories to the manufacturer, and the user can operate locally, and it is simple and portable.
Description
技术领域technical field
本发明属于升级技术领域,尤其涉及一种通过移动终端升级配件的方法、系统及移动终端。The invention belongs to the technical field of upgrading, and in particular relates to a method, a system and a mobile terminal for upgrading an accessory through a mobile terminal.
背景技术Background technique
随着智能移动终端的普及,各种配件如雨后春笋般出现,如快充适配器、移动电源、健康手环、智能眼镜等等。With the popularity of smart mobile terminals, various accessories have sprung up, such as fast charging adapters, power banks, health bracelets, smart glasses and so on.
由于配件的存储空间普遍较小、大部分没有无线保真WIFI功能,且没有完整的文件系统、不能存储文件,因此无法像移动终端一样通过空中下载技术(Over-the-AirTechnology,OTA)对配件进行升级。若遇上重大bug或者需要增加新功能,只能返厂,由厂商将配件拆开,把配件的电路板放在治具上,通过特定的工具对电路板里面的芯片进行固件升级。Since the storage space of accessories is generally small, most of them do not have wireless fidelity WIFI function, and there is no complete file system, and files cannot be stored, so it is impossible to download accessories through the air (Over-the-AirTechnology, OTA) like mobile terminals. to upgrade. If you encounter a major bug or need to add new functions, you can only return to the factory. The manufacturer will disassemble the accessory, put the circuit board of the accessory on the jig, and use specific tools to upgrade the firmware of the chip inside the circuit board.
发明内容Contents of the invention
本发明实施例提供了一种通过移动终端升级配件的方法、系统及移动终端,旨在解决现有技术提供的配件的升级方法,必须返厂升级的问题。Embodiments of the present invention provide a method, system and mobile terminal for upgrading accessories through a mobile terminal, aiming to solve the problem that the upgrading method of accessories provided in the prior art must be returned to the factory for upgrading.
一方面,提供一种通过移动终端升级配件的方法,所述移动终端包括CPU,所述移动终端还包括一个与所述CPU连接的转换开关,通过所述转换开关,与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接,所述方法包括:In one aspect, a method for upgrading accessories through a mobile terminal is provided, the mobile terminal includes a CPU, and the mobile terminal further includes a transfer switch connected to the CPU, through which the transfer switch connected to the mobile terminal The OTG adapter or the D+/D- of the USB cable connected to the mobile terminal is connected with the i2c/uart of the CPU, and the method includes:
存储配件的固件至移动终端中;Store the firmware of the accessories in the mobile terminal;
移动终端与配件建立连接;The mobile terminal establishes a connection with the accessory;
移动终端通过OTG转接头以及与所述OTG转接头连接的USB线的D+/D-按照i2c/uart协议发送固件至配件;或者The mobile terminal sends the firmware to the accessory according to the i2c/uart protocol through the OTG adapter and the D+/D- of the USB cable connected to the OTG adapter; or
移动终端通过USB线的D+/D-按照i2c/uart协议发送固件至配件。The mobile terminal sends the firmware to the accessory through the D+/D- of the USB cable according to the i2c/uart protocol.
进一步地,在移动终端按照i2c/uart协议发送固件至配件之前,还包括:Further, before the mobile terminal sends the firmware to the accessory according to the i2c/uart protocol, it also includes:
移动终端接收输入的升级配件指令;The mobile terminal receives the input upgrade accessory instruction;
移动终端根据所述升级配件指令控制所述转换开关,通过所述转换开关,控制与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接。The mobile terminal controls the transfer switch according to the upgrade accessory instruction, and through the transfer switch, controls the D+/D- of the OTG adapter connected to the mobile terminal or the USB cable connected to the mobile terminal and the CPU i2c/uart connection.
进一步地,移动终端按照i2c/uart协议发送固件至配件包括:Further, the mobile terminal sends the firmware to the accessory according to the i2c/uart protocol including:
步骤A、移动终端发送擦除命令至配件,通知配件擦除ROM空间的数据;Step A, the mobile terminal sends an erase command to the accessory, notifying the accessory to erase the data in the ROM space;
步骤B、移动终端发送固件写入请求命令至配件,通知配件等待接收写入地址;Step B, the mobile terminal sends a firmware write request command to the accessory, and notifies the accessory to wait for receiving the write address;
步骤C、移动终端发送写入地址至配件,通知配件等待接收固件;Step C, the mobile terminal sends the writing address to the accessory, and notifies the accessory to wait for receiving the firmware;
步骤D、移动终端按照i2c/uart协议发送固件中的N个字节的数据至配件,以由配件将所述N个字节的数据存入ROM空间的相应地址中,N为16或8;Step D, the mobile terminal sends N bytes of data in the firmware to the accessory according to the i2c/uart protocol, so that the accessory stores the N bytes of data in the corresponding address in the ROM space, where N is 16 or 8;
步骤E、返回步骤C,直至固件中的数据全部发送完毕。Step E, return to step C, until all the data in the firmware is sent.
进一步地,在移动终端按照i2c/uart协议发送固件至配件之后,还包括:Further, after the mobile terminal sends the firmware to the accessory according to the i2c/uart protocol, it also includes:
步骤A、移动终端发送固件读取请求命令至配件,通知配件等待接收读地址;Step A, the mobile terminal sends a firmware read request command to the accessory, and notifies the accessory to wait for receiving the read address;
步骤B、移动终端发送读地址至配件,通知配件从所述读地址开始读取N个字节的数据;Step B, the mobile terminal sends the read address to the accessory, and notifies the accessory to read N bytes of data from the read address;
步骤C、移动终端接收配件按照i2c/uart协议发送的所述N个字节的数据;Step C, the mobile terminal receives the data of N bytes sent by the accessory according to the i2c/uart protocol;
步骤D、移动终端将所述N个字节的数据与固件中对应的N个字节的数据进行对比,如果相同,则返回步骤B,直至固件中的所有数据校验完毕,如果不相同,则执行步骤E;Step D. The mobile terminal compares the N bytes of data with the corresponding N bytes of data in the firmware. If they are the same, return to step B until all the data in the firmware are verified. If they are not the same, Then execute step E;
步骤E、移动终端按照i2c/uart协议发送固件至配件。Step E, the mobile terminal sends the firmware to the accessory according to the i2c/uart protocol.
另一方面,提供一种移动终端,所述移动终端包括CPU,其特征在于,所述移动终端还包括一个与所述CPU连接的转换开关,通过所述转换开关,与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接;On the other hand, provide a kind of mobile terminal, described mobile terminal comprises CPU, it is characterized in that, described mobile terminal also comprises a transfer switch connected with described CPU, through described transfer switch, connected with described mobile terminal The OTG adapter or the D+/D- of the USB cable connected to the mobile terminal is connected to the i2c/uart of the CPU;
所述移动终端还包括:The mobile terminal also includes:
固件存储单元,用于存储配件的固件至所述移动终端中;a firmware storage unit, configured to store the firmware of the accessory in the mobile terminal;
所述CPU包括:The CPU includes:
连接建立单元,用于与配件建立连接;a connection establishment unit, configured to establish a connection with an accessory;
固件发送单元,用于通过OTG转接头以及与所述OTG转接头连接的USB线的D+/D-按照i2c/uart协议发送固件至配件;或者The firmware sending unit is used to send the firmware to the accessory according to the i2c/uart protocol through the OTG adapter and the D+/D- of the USB cable connected to the OTG adapter; or
通过USB线的D+/D-按照i2c/uart协议发送固件至配件。Send firmware to accessories through the D+/D- of the USB cable according to the i2c/uart protocol.
进一步地,所述CPU还包括:Further, the CPU also includes:
升级指令接收单元,用于接收输入的升级配件指令;an upgrade instruction receiving unit, configured to receive an input upgrade accessory instruction;
连接控制单元,用于根据所述升级配件指令控制所述转换开关,通过所述转换开关,控制与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接。The connection control unit is used to control the transfer switch according to the upgrade accessory instruction, and through the transfer switch, control the D+/D- of the OTG adapter connected to the mobile terminal or the USB cable connected to the mobile terminal. Connect with the i2c/uart of said CPU.
进一步地,所述固件发送单元包括:Further, the firmware sending unit includes:
擦除指令发送模块,用于发送擦除命令至配件,通知配件擦除ROM空间的数据;The erase command sending module is used to send the erase command to the accessory, and notify the accessory to erase the data in the ROM space;
写入请求发送模块,用于发送固件写入请求命令至配件,通知配件等待接收写入地址;The write request sending module is used to send the firmware write request command to the accessory, and notify the accessory to wait to receive the write address;
写入地址发送模块,用于发送写入地址至配件,通知配件等待接收固件;The write address sending module is used to send the write address to the accessory, and notify the accessory to wait for the firmware to be received;
固件发送模块,用于按照i2c/uart协议发送固件中的N个字节的数据至配件,以由配件将所述N个字节的数据存入ROM空间的相应地址中,重复调用写入地址发送模块,直至固件中的数据全部发送完毕,N为16或8。The firmware sending module is used to send N bytes of data in the firmware to the accessory according to the i2c/uart protocol, so that the accessory stores the N bytes of data in the corresponding address of the ROM space, and repeatedly calls the write address Send the module until all the data in the firmware is sent, and N is 16 or 8.
进一步地,所述CPU还包括:Further, the CPU also includes:
读取请求发送单元,用于发送固件读取请求命令至配件,通知配件等待接收读地址;The read request sending unit is used to send the firmware read request command to the accessory, and notify the accessory to wait for receiving the read address;
读地址发送单元,用于发送读地址至配件,通知配件从所述读地址开始读取N个字节的数据;The read address sending unit is used to send the read address to the accessory, and notify the accessory to read N bytes of data from the read address;
数据接收单元,用于接收配件按照i2c/uart协议发送的所述N个字节的数据;a data receiving unit, configured to receive the N bytes of data sent by the accessory according to the i2c/uart protocol;
数据对比单元,用于将所述N个字节的数据与固件中对应的N个字节的数据进行对比,如果相同,则调用读地址发送单元,直至固件中的所有数据校验完毕,如果不相同,则调用固件发送单元,按照i2c/uart协议发送固件至配件。The data comparison unit is used to compare the data of the N bytes with the corresponding N bytes of data in the firmware, if they are the same, then call the read address sending unit until all the data in the firmware are verified, if If they are not the same, call the firmware sending unit to send the firmware to the accessory according to the i2c/uart protocol.
又一方面,提供一种通过移动终端升级配件的系统,包括配件,所述系统还包括如上所述的移动终端,所述移动终端插上OTG接口后,通过USB线与所述配件连接;或者In another aspect, there is provided a system for upgrading accessories through a mobile terminal, including accessories, the system also includes the mobile terminal as described above, and after the mobile terminal is plugged into an OTG interface, it is connected to the accessory through a USB cable; or
所述移动终端通过USB线与所述配件连接。The mobile terminal is connected to the accessory through a USB cable.
在本发明实施例,提前将配件的固件存储在移动终端中,在需要对配件进行升级时,通过USB线或者OTG接头和USB线将移动终端和配件连接起来,同时使与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D‐与所述CPU的i2c/uart连接后,移动终端即可按照i2c/uart协议通过移动终端和配件之间的连线,发送固件中的数据至配件,完成配件的固件升级。配件出厂后,若遇上严重bug或者后续需要添加新功能时,可以通过移动终端升级固件,不需要将配件返回厂家,用户在当地即能操作,而且简单便携。In the embodiment of the present invention, the firmware of the accessory is stored in the mobile terminal in advance, and when the accessory needs to be upgraded, the mobile terminal and the accessory are connected through a USB cable or an OTG connector and a USB cable, and at the same time the mobile terminal is connected After the OTG adapter or the D+/D- of the USB cable connected to the mobile terminal is connected to the i2c/uart of the CPU, the mobile terminal can pass the connection between the mobile terminal and the accessories according to the i2c/uart protocol, Send the data in the firmware to the accessory to complete the firmware upgrade of the accessory. After the accessories leave the factory, if there is a serious bug or new functions need to be added later, the firmware can be upgraded through the mobile terminal. There is no need to return the accessories to the manufacturer, and the user can operate them locally, and it is simple and portable.
附图说明Description of drawings
图1是本发明实施例一提供的配件的升级方法的实现流程图;Fig. 1 is a flow chart of the realization of the upgrading method of accessories provided by Embodiment 1 of the present invention;
图2是本发明实施例一提供的移动终端和配件之间的第一种连接方式示意图;FIG. 2 is a schematic diagram of a first connection mode between a mobile terminal and an accessory provided in Embodiment 1 of the present invention;
图3是本发明实施例一提供的转换开关的接口示意图;Fig. 3 is a schematic diagram of the interface of the transfer switch provided by Embodiment 1 of the present invention;
图4是本发明实施例一提供的配件升级的具体流程图;Fig. 4 is a specific flow chart of an accessory upgrade provided by Embodiment 1 of the present invention;
图5是本发明实施例二提供的配件的升级方法的实现流程图;Fig. 5 is a flow chart of the implementation of the upgrade method of accessories provided by Embodiment 2 of the present invention;
图6是本发明实施例三提供的移动终端的结构框图;FIG. 6 is a structural block diagram of a mobile terminal provided by Embodiment 3 of the present invention;
图7是本发明实施例三提供的优选实施中,具有升级校验功能的CPU的结构框图。FIG. 7 is a structural block diagram of a CPU with an upgrade verification function in a preferred implementation provided by Embodiment 3 of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
在本发明实施例中,存储配件的固件至移动终端中,移动终端与配件建立连接后,通过OTG转接头以及与所述OTG转接头连接的USB线的D+/D-按照i2c/uart协议发送固件至配件;或者通过USB线的D+/D-按照i2c/uart协议发送固件至配件,完成配件的固件升级。In the embodiment of the present invention, the firmware of the accessory is stored in the mobile terminal. After the mobile terminal establishes a connection with the accessory, the D+/D- of the USB cable connected to the OTG adapter and the OTG adapter are sent according to the i2c/uart protocol. Firmware to accessories; or send firmware to accessories through the D+/D- of the USB cable according to the i2c/uart protocol to complete the firmware upgrade of the accessories.
以下结合具体实施例对本发明的实现进行详细描述:The realization of the present invention is described in detail below in conjunction with specific embodiment:
实施例一Embodiment one
图1示出了本发明实施例一提供的配件的升级方法的实现流程,详述如下:Figure 1 shows the implementation flow of the accessory upgrade method provided by Embodiment 1 of the present invention, which is described in detail as follows:
在步骤S101中,存储配件的固件至移动终端中。In step S101, the firmware of the accessory is stored in the mobile terminal.
配件通常是通过微控制单元(Micro Controller Unit,MCU)来实现的,MCU的内存一般较小(一般只有2k byte或4k byte),因此,大部分配件没有无线保真WIFI功能,且没有完善的文件系统,所以,配件不能像移动终端一样通过WIFI下载固件至本地完成升级工作,也不能像存储卡一样,可以实现固件的随意拷贝。Accessories are usually realized by Micro Controller Unit (MCU), and the memory of MCU is generally small (only 2k byte or 4k byte), so most accessories do not have wireless fidelity WIFI function, and there is no perfect file system, therefore, accessories cannot download firmware through WIFI to complete the upgrade locally like a mobile terminal, nor can they copy firmware at will like a memory card.
鉴于配件的上述自身条件限制,在本发明实施例中,先将配件的固件存储至移动终端的存储卡中,然后将移动终端与配件通过USB线或者通过OTG转接头和USB线连接,由移动终端逐次发送固件中的数据至配件中,完成配件的升级。In view of the above-mentioned limitations of the accessory itself, in the embodiment of the present invention, the firmware of the accessory is first stored in the memory card of the mobile terminal, and then the mobile terminal and the accessory are connected through a USB cable or an OTG adapter and a USB cable, and the mobile terminal The terminal sends the data in the firmware to the accessory one by one to complete the upgrade of the accessory.
其中,本发明实施例中提到的存储卡可以包括SD卡、miniSD卡、TF卡、MS卡等。Wherein, the memory card mentioned in the embodiment of the present invention may include SD card, miniSD card, TF card, MS card and the like.
本发明实施例中提到的移动终端包括但不限于手机、平板电脑、手提电脑、音乐播放器(比如MP3)等具有USB接口的电子设备。The mobile terminals mentioned in the embodiments of the present invention include but are not limited to mobile phones, tablet computers, laptop computers, music players (such as MP3) and other electronic devices with USB interfaces.
在步骤S102中,移动终端与配件建立连接。In step S102, the mobile terminal establishes a connection with the accessory.
在本发明实施例中,移动终端和配件之间可以通过两种方式建立连接,一种连接方式如图2所示。In the embodiment of the present invention, there are two ways to establish a connection between the mobile terminal and the accessory, and one connection way is shown in FIG. 2 .
具体的,在图2中,左边示意的终端为移动终端,与移动终端连接的白色的先是OTG转接头,与OTG转接头连接的是USB线,与USB线连接的最右边的终端是配件。Specifically, in FIG. 2, the terminal shown on the left is a mobile terminal, the white one connected to the mobile terminal is an OTG adapter first, the USB cable is connected to the OTG adapter, and the rightmost terminal connected to the USB cable is an accessory.
另一种连接方式是:移动终端直接和配件通过USB线连接。这种情况下,配件是适配器或者移动电源。Another connection method is: the mobile terminal is directly connected to the accessory through a USB cable. In this case, the accessory is an adapter or power bank.
在步骤S103中,移动终端通过OTG转接头以及与所述OTG转接头连接的USB线的D+/D-按照i2c/uart协议发送固件至配件,或者移动终端通过USB线的D+/D-按照i2c/uart协议发送固件至配件。In step S103, the mobile terminal sends the firmware to the accessory through the OTG adapter and the D+/D- of the USB cable connected to the OTG adapter according to the i2c/uart protocol, or the mobile terminal sends the firmware to the accessory through the D+/D- of the USB cable according to the i2c /uart protocol to send firmware to accessories.
在本发明实施例中,移动终端中包括一个转换开关,该转换开关布置在移动终端的USB通信线路上,与移动终端的CPU连接,通过所述转换开关,与移动终端连接的OTG转接头或者与移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接。In the embodiment of the present invention, the mobile terminal includes a transfer switch, which is arranged on the USB communication line of the mobile terminal and connected to the CPU of the mobile terminal. Through the transfer switch, the OTG adapter connected to the mobile terminal or The D+/D- of the USB cable connected to the mobile terminal is connected with the i2c/uart of the CPU.
具体的,该转换开关的接口如图3所示,包括9个引脚,2个D+、2个D-、1个VDD、1个GND、1个CTRL、一个SCL/UARTTX、1个SDA/UARTRX。Specifically, the interface of the transfer switch is shown in Figure 3, including 9 pins, 2 D+, 2 D-, 1 VDD, 1 GND, 1 CTRL, 1 SCL/UARTTX, 1 SDA/ UART RX.
其中,VCC/GND是电源和地,图中左边的D+/D-可以与OTG转接头或者USB线连接,右边的D+/D-与CPU的D+/D-触点连接,右边的SCL/UARTTX和SDA/UARTRX分别与CPU的一组i2c/uart触点连接,CTRL也与CPU连接,用于在CPU的控制下,将图中左边的D+/D-与图中右边的SCL/UARTTX和SDA/UARTRX连接。Among them, VCC/GND is the power supply and ground. The D+/D- on the left in the figure can be connected to the OTG adapter or USB cable, the D+/D- on the right is connected to the D+/D- contact of the CPU, and the SCL/UARTTX on the right and SDA/UARTRX are respectively connected to a group of i2c/uart contacts of the CPU, and CTRL is also connected to the CPU, which is used to connect D+/D- on the left side of the figure to SCL/UARTTX and SDA on the right side of the figure under the control of the CPU /UARTRX connection.
CTRL为控制信号,CTRL=1时,图中左边的D+/D-连接到图中右边的D+/D-;CTRL=0时,图中左边的D+/D-连接到右边的SCL/UARTTX和SDA/UARTRX。这样实现了在不同的需求下,左边的D+/D-与不同的触点连接实现不同的功能。比如,图中左边的D+/D-连接到右边的SCL/UARTTX和SDA/UARTRX,可以通过i2c/uart协议给配件升级固件;图中左边的D+/D-连接到右边的D+/D-时,图中左边的D+/D-连接到CPU的USB功能,不能对配件进行升级。CTRL is the control signal. When CTRL=1, D+/D- on the left in the figure is connected to D+/D- on the right in the figure; when CTRL=0, D+/D- on the left in the figure is connected to SCL/UARTTX and SDA/UART RX. In this way, under different requirements, the D+/D- on the left is connected with different contacts to realize different functions. For example, the D+/D- on the left in the figure is connected to the SCL/UARTTX and SDA/UARTRX on the right, and the firmware of the accessories can be upgraded through the i2c/uart protocol; when the D+/D- on the left in the figure is connected to the D+/D- on the right , the D+/D- on the left in the picture is connected to the USB function of the CPU, and the accessories cannot be upgraded.
所以,在要对配件升级之前,移动终端还需要之前下述步骤:Therefore, before upgrading the accessories, the mobile terminal needs the following steps:
步骤1、接收输入的升级配件指令。Step 1. Receive an input upgrade accessory instruction.
具体的,移动终端的界面上有一个“给配件升级固件”的图标,用户点击该图标后,CPU即可接收到一个升级配件指令。Specifically, there is an icon of "upgrade firmware for accessories" on the interface of the mobile terminal. After the user clicks on the icon, the CPU can receive an instruction to upgrade accessories.
步骤2、移动终端根据所述升级配件指令控制所述转换开关,通过所述转换开关,控制与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接。Step 2. The mobile terminal controls the transfer switch according to the upgrade accessory instruction, and through the transfer switch, controls the D+/D- and i2c/uart connection to the CPU.
具体的,CPU接收到升级配件的指令后,即可通过控制信号CTRL=0控制转换开关,使图3中左边的D+/D-连接到右边的SCL/UARTTX和SDA/UARTRX。Specifically, after the CPU receives an instruction to upgrade accessories, it can control the transfer switch through the control signal CTRL=0, so that D+/D- on the left in Figure 3 is connected to SCL/UARTTX and SDA/UARTRX on the right.
另外,在对配件升级之前,还要先使配件进入固件升级模式。其中,配件可以通过特定的方式,比如瞬间短路、按下预定的某几个组合按键等方式进入固件升级模式。In addition, before upgrading the accessories, the accessories must first enter the firmware upgrade mode. Among them, the accessory can enter the firmware upgrade mode through a specific method, such as an instant short circuit, pressing a predetermined combination of keys, and the like.
在使配件进行固件升级模式后,移动终端与配件建立连接,并且移动终端接收到用户输入的给配件升级固件的指令后,即可通过下述的步骤完成配件的升级,具体步骤如图4所示,包括:After the accessory is in the firmware upgrade mode, the mobile terminal establishes a connection with the accessory, and after the mobile terminal receives the instruction to upgrade the firmware of the accessory input by the user, it can complete the upgrade of the accessory through the following steps, as shown in Figure 4. display, including:
步骤1、移动终端发送擦除命令至配件,通知配件擦除ROM空间的数据。Step 1. The mobile terminal sends an erase command to the accessory to notify the accessory to erase the data in the ROM space.
具体的,移动终端发送ERASE命令至配件,通知配件擦除ROM空间的数据。配件接收到ERASE命令后,将其ROM空间的数据全部擦除。Specifically, the mobile terminal sends an ERASE command to the accessory to notify the accessory to erase data in the ROM space. After the accessory receives the ERASE command, all data in its ROM space will be erased.
步骤2、移动终端发送固件写入请求命令至配件,通知配件等待接收写入地址。Step 2. The mobile terminal sends a firmware write request command to the accessory, and notifies the accessory to wait for receiving the write address.
具体的,移动终端发送WRITE_CMD命令至配件,通知配件等待接收写入地址。配件接收到WRITE_CMD命令,等待写入地址的到来。Specifically, the mobile terminal sends a WRITE_CMD command to the accessory, notifying the accessory to wait for receiving the write address. The accessory receives the WRITE_CMD command and waits for the write address to arrive.
步骤3、移动终端发送写入地址至配件,通知配件等待接收固件。Step 3. The mobile terminal sends the write address to the accessory, and notifies the accessory to wait to receive the firmware.
具体的,移动终端发送WRITE_ADDR至配件,通知配件等待接收移动终端发送的固件。配件接收到WRITE_ADDR后,等待固件中的数据的到来。Specifically, the mobile terminal sends WRITE_ADDR to the accessory, notifying the accessory to wait to receive the firmware sent by the mobile terminal. After the accessory receives the WRITE_ADDR, it waits for the arrival of the data in the firmware.
步骤4、移动终端按照i2c/uart协议发送固件中的N个字节的数据至配件,以由配件将所述N个字节的数据存入ROM空间的相应地址中。Step 4. The mobile terminal sends N bytes of data in the firmware to the accessory according to the i2c/uart protocol, so that the accessory stores the N bytes of data in a corresponding address in the ROM space.
具体的,移动终端按照i2c/uart协议发送固件中的N个字节的数据至配件,配件将这N个字节的数据存入ROM空间,具体存入的地址为ROM空间的(WRITE_ADDR~WRITE_ADDR+N-1)。Specifically, the mobile terminal sends N bytes of data in the firmware to the accessory according to the i2c/uart protocol, and the accessory stores the N bytes of data in the ROM space, and the specific storage address is (WRITE_ADDR~WRITE_ADDR +N-1).
步骤5、返回步骤3,直至固件中的数据全部发送完毕。Step 5, return to step 3 until all the data in the firmware is sent.
具体的,移动终端每次发送的写入地址是上一次的写入地址+N。比如,第一次发送的写入地址为WRITE_ADDR,第二次发送的写入地址为WRITE_ADDR+N。其中,N为16或8,这与i2c/uart协议有关,是现有技术,在此不再赘述。Specifically, the write address sent by the mobile terminal each time is the last write address+N. For example, the write address sent for the first time is WRITE_ADDR, and the write address sent for the second time is WRITE_ADDR+N. Wherein, N is 16 or 8, which is related to the i2c/uart protocol and is a prior art, and will not be repeated here.
本实施例,提前将配件的固件存储在移动终端中,在需要对配件进行升级时,通过USB线或者OTG接头和USB线将移动终端和配件连接起来,同时使与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接后,移动终端即可按照i2c/uart协议通过移动终端和配件之间的连线,发送固件中的数据至配件,完成配件的固件升级。配件出厂后,若遇上严重bug或者后续需要添加新功能时,可以通过移动终端升级固件,不需要将配件返回厂家,用户在当地即能操作,而且简单便携。In this embodiment, the firmware of the accessory is stored in the mobile terminal in advance, and when the accessory needs to be upgraded, the mobile terminal and the accessory are connected through a USB cable or an OTG connector and a USB cable, and at the same time, the OTG connected to the mobile terminal is After the adapter or the D+/D- of the USB cable connected to the mobile terminal is connected to the i2c/uart of the CPU, the mobile terminal can send the firmware through the connection between the mobile terminal and the accessories according to the i2c/uart protocol The data in the device is uploaded to the accessory to complete the firmware upgrade of the accessory. After the accessories leave the factory, if there is a serious bug or new functions need to be added later, the firmware can be upgraded through the mobile terminal. There is no need to return the accessories to the manufacturer, and the user can operate them locally, and it is simple and portable.
本领域普通技术人员可以理解实现上述各实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,相应的程序可以存储于一计算机可读取存储介质中,所述的存储介质,如ROM/RAM、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. Media, such as ROM/RAM, magnetic disk or optical disk, etc.
实施例二Embodiment two
图5示出了本发明实施例二提供的配件的升级方法的实现流程,详述如下:Fig. 5 shows the implementation flow of the accessory upgrading method provided by Embodiment 2 of the present invention, which is described in detail as follows:
本实施例二是在实施例一的基础上进行的,为了保证实施例一中移动终端发送的固件准确无误地烧录进了配件,需要对升级后的配件中的固件进行校验,若通过校验,则不再进行升级操作,如果没有通过,则需要调用实施例一中的步骤S103,重新对配件进行升级操作。具体的,校验的过程包括以下步骤:The second embodiment is carried out on the basis of the first embodiment. In order to ensure that the firmware sent by the mobile terminal in the first embodiment is accurately burned into the accessory, it is necessary to verify the firmware in the upgraded accessory. If the verification is not passed, then the upgrade operation will not be performed, and if it fails, it is necessary to call step S103 in the first embodiment to perform the upgrade operation on the accessories again. Specifically, the verification process includes the following steps:
在步骤S501中,移动终端发送固件读取请求命令至配件,通知配件等待接收读地址。In step S501, the mobile terminal sends a firmware read request command to the accessory, notifying the accessory to wait for receiving the read address.
具体的,移动终端发送读地址READ_CMD命令至配件,配件接收到READ_CMD命令后,等待接收移动终端发送的读地址。Specifically, the mobile terminal sends a read address READ_CMD command to the accessory, and after receiving the READ_CMD command, the accessory waits to receive the read address sent by the mobile terminal.
在步骤S502中,移动终端发送读地址至配件,通知配件从所述读地址开始读取N个字节的数据。In step S502, the mobile terminal sends a read address to the accessory, notifying the accessory to read N bytes of data starting from the read address.
具体的,移动终端发送读地址READ_ADDR至配件,配件接收到READ_ADDR后,读取(READ_ADDR~READ_ADDR+N-1)地址上存储的数据,并返回读取到的数据至移动终端。Specifically, the mobile terminal sends the read address READ_ADDR to the accessory, and after receiving the READ_ADDR, the accessory reads the data stored at the address (READ_ADDR˜READ_ADDR+N-1), and returns the read data to the mobile terminal.
在步骤S503中,移动终端接收配件按照i2c/uart协议发送的所述N个字节的数据。In step S503, the mobile terminal receives the N bytes of data sent by the accessory according to the i2c/uart protocol.
具体的,配件按照i2c/uart协议,每次发送读取到的N个字节的数据至移动终端。Specifically, the accessory sends the read N bytes of data to the mobile terminal each time according to the i2c/uart protocol.
在步骤S504中,移动终端将所述N个字节的数据与固件中对应的N个字节的数据进行对比,如果相同,则返回步骤S502,直至固件中的所有数据校验完毕,如果不相同,则返回执行实施例一中的步骤S103,按照i2c/uart协议发送固件至配件。In step S504, the mobile terminal compares the N bytes of data with the corresponding N bytes of data in the firmware. If they are the same, return to step S502 until all the data in the firmware are verified. If not If they are the same, return to step S103 in the first embodiment, and send the firmware to the accessory according to the i2c/uart protocol.
具体的,移动终端接收到配件发送的N个字节的数据后,将这N个字节的数据与本地存储的固件中对应的N个数据进行对比,如果两者内容相同,则表示发送给配件的这N个数据正确,返回步骤S502,继续对下一个N个数据进行对比,直至固件中的所有数据校验完毕,如果中间发现有不相同的数据,则表示配件升级失败,则再次对配件进行升级。Specifically, after receiving the N bytes of data sent by the accessory, the mobile terminal compares the N bytes of data with the corresponding N data in the locally stored firmware. The N data of the accessory is correct, return to step S502, and continue to compare the next N data until all the data in the firmware are verified. Accessories are upgraded.
另外,优选地,在配件升级正确无误后,移动终端发送退出升级指令至配件,配件退出固件升级模式。具体的,移动终端发送JUMP_TO_APP指令给配件,配件接收到JUMP_TO_APP指令后,退出固件升级模式。In addition, preferably, after the upgrade of the accessory is correct, the mobile terminal sends an exit upgrade instruction to the accessory, and the accessory exits the firmware upgrade mode. Specifically, the mobile terminal sends a JUMP_TO_APP command to the accessory, and the accessory exits the firmware upgrade mode after receiving the JUMP_TO_APP command.
本实施例,通过移动终端完成对配件的升级后,对配件中的数据进行校验,如果校验失败,则再次对配件进行升级,保证了移动终端中的固件准确无误地烧录进配件中。In this embodiment, after the upgrade of the accessories is completed through the mobile terminal, the data in the accessories is verified. If the verification fails, the accessories are upgraded again, which ensures that the firmware in the mobile terminal is burned into the accessories without error. .
实施例三Embodiment Three
图6示出了本发明实施例三提供的移动终端的具体结构框图,为了便于说明,仅示出了与本发明实施例相关的部分。该移动终端6插上OTG接口后,通过USB线与配件连接,或者该移动终端6通过USB线与配件连接组成一个通过移动终端升级配件的系统,移动终端发送存储于本地的配件的固件至配件中,完成配件的升级,该移动终端6包括:CPU61、还包括一个与所述CPU连接的转换开关62,通过所述转换开关62,与移动终端6连接的OTG转接头或者与移动终端6连接的USB线的D+/D-与所述CPU61的i2c/uart连接。FIG. 6 shows a specific structural block diagram of a mobile terminal provided by Embodiment 3 of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. After the mobile terminal 6 is plugged into the OTG interface, it is connected to the accessory through a USB cable, or the mobile terminal 6 is connected to the accessory through a USB cable to form a system for upgrading the accessory through the mobile terminal, and the mobile terminal sends the firmware of the accessory stored locally to the accessory , the upgrade of accessories is completed, the mobile terminal 6 includes: CPU61, and a transfer switch 62 connected to the CPU, through which the OTG adapter connected to the mobile terminal 6 or connected to the mobile terminal 6 The D+/D- of the USB cable is connected with the i2c/uart of the CPU61.
所述移动终端6还包括:Described mobile terminal 6 also comprises:
固件存储单元63,用于存储配件的固件至所述移动终端中;A firmware storage unit 63, configured to store the firmware of the accessories in the mobile terminal;
所述CPU61包括:The CPU61 includes:
连接建立单元611,用于与配件建立连接;a connection establishing unit 611, configured to establish a connection with the accessory;
固件发送单元612,用于通过OTG转接头以及与所述OTG转接头连接的USB线的D+/D-按照i2c/uart协议发送固件至配件;或者,通过USB线的D+/D-按照i2c/uart协议发送固件至配件。The firmware sending unit 612 is used to send the firmware to the accessory according to the i2c/uart protocol through the OTG adapter and the D+/D- of the USB line connected to the OTG adapter; or, through the D+/D- of the USB line according to the i2c/uart protocol. The uart protocol sends firmware to accessories.
进一步地,所述CPU61还包括:Further, the CPU61 also includes:
升级指令接收单元,用于接收输入的升级配件指令;an upgrade instruction receiving unit, configured to receive an input upgrade accessory instruction;
连接控制单元,用于根据所述升级配件指令控制所述转换开关,通过所述转换开关,控制与所述移动终端连接的OTG转接头或者与所述移动终端连接的USB线的D+/D-与所述CPU的i2c/uart连接。The connection control unit is used to control the transfer switch according to the upgrade accessory instruction, and through the transfer switch, control the D+/D- of the OTG adapter connected to the mobile terminal or the USB cable connected to the mobile terminal. Connect with the i2c/uart of said CPU.
具体的,所述固件发送单元612包括:Specifically, the firmware sending unit 612 includes:
擦除指令发送模块,用于发送擦除命令至配件,通知配件擦除ROM空间的数据;The erase command sending module is used to send the erase command to the accessory, and notify the accessory to erase the data in the ROM space;
写入请求发送模块,用于发送固件写入请求命令至配件,通知配件等待接收写入地址;The write request sending module is used to send the firmware write request command to the accessory, and notify the accessory to wait to receive the write address;
写入地址发送模块,用于发送写入地址至配件,通知配件等待接收固件;The write address sending module is used to send the write address to the accessory, and notify the accessory to wait for the firmware to be received;
固件发送模块,用于按照i2c/uart协议发送固件中的N个字节的数据至配件,以由配件将所述N个字节的数据存入ROM空间的相应地址中,重复调用写入地址发送模块,直至固件中的数据全部发送完毕。The firmware sending module is used to send N bytes of data in the firmware to the accessory according to the i2c/uart protocol, so that the accessory stores the N bytes of data in the corresponding address of the ROM space, and repeatedly calls the write address Send the module until all the data in the firmware is sent.
优选地,为了保证移动终端发送的固件准确无误地烧录进了配件,该移动终端6的CPU61还包括读取请求发送单元711、读地址发送单元712、数据接收单元713和数据对比单元714,如图7所示。Preferably, in order to ensure that the firmware sent by the mobile terminal is burned into the accessories without error, the CPU 61 of the mobile terminal 6 further includes a read request sending unit 711, a read address sending unit 712, a data receiving unit 713 and a data comparison unit 714, As shown in Figure 7.
其中,读取请求发送单元711,用于发送固件读取请求命令至配件,通知配件等待接收读地址;Wherein, the read request sending unit 711 is used to send a firmware read request command to the accessory, and notify the accessory to wait for receiving the read address;
读地址发送单元712,用于发送读地址至配件,通知配件从所述读地址开始读取N个字节的数据;The read address sending unit 712 is configured to send the read address to the accessory, and notify the accessory to read N bytes of data from the read address;
数据接收单元713,用于接收配件按照i2c/uart协议发送的所述N个字节的数据;A data receiving unit 713, configured to receive the N bytes of data sent by the accessory according to the i2c/uart protocol;
数据对比单元714,用于将所述N个字节的数据与固件中对应的N个字节的数据进行对比,如果相同,则调用读地址发送单元712,直至固件中的所有数据校验完毕,如果不相同,则调用固件发送单元612,按照i2c/uart协议发送固件至配件。The data comparison unit 714 is used to compare the data of the N bytes with the corresponding N bytes of data in the firmware, and if they are the same, call the read address sending unit 712 until all the data in the firmware are verified , if not the same, call the firmware sending unit 612 to send the firmware to the accessory according to the i2c/uart protocol.
本发明实施例提供的移动终端可以应用在前述对应的方法实施例一和实施例二中,详情参见上述实施例一和实施例二的描述,在此不再赘述。The mobile terminal provided by the embodiment of the present invention can be applied in the foregoing corresponding method embodiments 1 and 2. For details, refer to the descriptions of the foregoing embodiments 1 and 2, and details are not repeated here.
值得注意的是,上述移动终端实施例中,所包括的各个单元只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。It is worth noting that, in the above-mentioned mobile terminal embodiments, each unit included is only divided according to functional logic, but is not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific functions of each functional unit The names are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present invention.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.
Claims (7)
1. a kind of method by updating mobile terminal accessory, the mobile terminal includes CPU, it is characterised in that the movement Terminal also includes a change-over switch being connected with the CPU;The OTG adapters that are connected with the mobile terminal or with it is described The D+/D- of the USB line of mobile terminal connection is connected by the change-over switch with the i2c/uart of the CPU;The conversion is opened Pass includes:First D+/D- pins, the 2nd D+/D- pins, i2c/uart pins and CTRL pins;Wherein, the first D+/ D- pins are connected with OTG adapters or USB line;The D+/D- contact portions of the 2nd D+/D- pins and the CPU;It is described The i2c/uart contact portions of i2c/uart pins and the CPU;The CTRL pins are connected with the CPU;Work as CTRL signal When=1, the first D+/D- pins are connected to the 2nd D+/D- pins, so that accessory is connected to the USB work(of the CPU Energy;When CTRL signal=0, the first D+/D- pins are connected to the i2c/uart pins, so that the mobile terminal leads to I2c/uart agreements are crossed to the accessory firmware updating;Wherein, the CTRL signal be the CTRL pins input signal, institute The method of stating includes:
The firmware of accessory is stored into mobile terminal;
Mobile terminal is established with accessory and connected;
Mobile terminal receives the upgrading accessory instruction of input;
Mobile terminal controls the change-over switch according to the upgrading accessory instruction, so that the OTG adapters or USB line D+/D- is connected by the change-over switch with the i2c/uart of the CPU;
Mobile terminal is by the D+/D- of the OTG adapters and the USB line being connected with the OTG adapters according to i2c/ Uart agreements send firmware to accessory;Or
Mobile terminal sends firmware to accessory by the D+/D- of the USB line according to i2c/uart agreements;
Wherein, mobile terminal transmission firmware to accessory is specially:The data in the firmware are gradually sent into the accessory, with The accessory is set to complete upgrading.
2. the method as described in claim 1, it is characterised in that mobile terminal sends firmware to accessory according to i2c/uart agreements Including:
Step A, mobile terminal sends erasing order to accessory, the data of notice accessory erasing ROM Space;
Step B, mobile terminal sends the order of firmware write request to the writing address to be received such as accessory, notice accessory;
Step C, mobile terminal sends writing address to the firmware to be received such as accessory, notice accessory;
Step D, mobile terminal sends the data of N number of byte in firmware according to i2c/uart agreements to accessory, with will by accessory In the appropriate address of the data deposit ROM Space of N number of byte, N is 16 or 8;
Step E, return to step C, until the data in firmware are all sent.
3. method as claimed in claim 1 or 2, it is characterised in that send firmware according to i2c/uart agreements in mobile terminal To accessory, in addition to:
Step A, mobile terminal sends the order of firmware read requests to the reading address to be received such as accessory, notice accessory;
Step B, mobile terminal, which is sent, reads address to accessory, notifies accessory to read the data of N number of byte since the reading address;
Step C, mobile terminal receives the data for N number of byte that accessory is sent according to i2c/uart agreements;
Step D, mobile terminal is contrasted the data of the data of N number of byte N number of byte corresponding with firmware, if Identical, then return to step B, all data checks in firmware finish, if it is not the same, then performing step E;
Step E, mobile terminal sends firmware to accessory according to i2c/uart agreements.
4. a kind of mobile terminal, it is characterised in that the mobile terminal includes CPU, it is characterised in that the mobile terminal also wraps Include a change-over switch being connected with the CPU;The OTG adapters that are connected with the mobile terminal or with the mobile terminal The D+/D- of the USB line of connection is connected by the change-over switch with the i2c/uart of the CPU;The change-over switch includes:The One D+/D- pins, the 2nd D+/D- pins, i2c/uart pins and CTRL pins;Wherein, the first D+/D- pins with OTG adapters or USB line connection;The D+/D- contact portions of the 2nd D+/D- pins and the CPU;The i2c/uart The i2c/uart contact portions of pin and the CPU;The CTRL pins are connected with the CPU;When CTRL signal=1, institute State the first D+/D- pins and be connected to the 2nd D+/D- pins, so that accessory is connected to the USB functions of the CPU;Work as CTRL During signal=0, the first D+/D- pins are connected to the i2c/uart pins, so that the mobile terminal passes through i2c/ Uart agreements give the accessory firmware updating;Wherein, the CTRL signal is the input signal of the CTRL pins;
The mobile terminal also includes:
Firmware memory cell, for storing the firmware of accessory into the mobile terminal;
The CPU includes:
Connection establishment unit, connected for being established with accessory;
Upgrade command receiving unit, for receiving the upgrading accessory instruction of input;
Connect control unit, for controlling the change-over switch according to the upgrading accessory instruction so that with the OTG adapters Or it is connected with the D+/D- of the USB line by the change-over switch with the i2c/uart of the CPU;
Firmware transmitting element, pressed for the D+/D- by OTG adapters and the USB line being connected with the OTG adapters Firmware is sent to accessory according to i2c/uart agreements;Or
Firmware is sent to accessory according to i2c/uart agreements by the D+/D- of the USB line;
Wherein, the firmware transmitting element is specifically used for:The data in the firmware are gradually sent into the accessory, so that institute State accessory and complete upgrading.
5. mobile terminal as claimed in claim 4, it is characterised in that the firmware transmitting element includes:
Erasing instruction sending module, for sending erasing order to accessory, the data of notice accessory erasing ROM Space;
Write request sending module, for sending the order of firmware write request to the writing address to be received such as accessory, notice accessory;
Writing address sending module, for sending writing address to the firmware to be received such as accessory, notice accessory;
Firmware sending module, for the data according to N number of byte in i2c/uart agreements transmission firmware to accessory, with by accessory The data of N number of byte are stored in the appropriate address of ROM Space, repeat to call writing address sending module, until firmware In data be all sent, N be 16 or 8.
6. the mobile terminal as described in claim 4 or 5, it is characterised in that the CPU also includes:
Read requests transmitting element, for sending the order of firmware read requests to the reading address to be received such as accessory, notice accessory;
Address transmitting element is read, address is read to accessory for sending, notifies accessory to read N number of byte since the reading address Data;
Data receipt unit, the data of the N number of byte sent for receiving accessory according to i2c/uart agreements;
Data comparison unit, for the data of the data of N number of byte N number of byte corresponding with firmware to be contrasted, If identical, call and read address transmitting element, until all data checks in firmware finish, if it is not the same, then calling Firmware transmitting element, firmware is sent to accessory according to i2c/uart agreements.
7. a kind of system by updating mobile terminal accessory, including accessory, it is characterised in that the system also includes such as right It is required that the mobile terminal described in 4 to 6 any one, after the mobile terminal plugs OTG interfaces, is connected by USB line and the accessory Connect;Or
The mobile terminal is connected by USB line with the accessory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410445897.9A CN104239097B (en) | 2014-09-03 | 2014-09-03 | A kind of method, system and mobile terminal by updating mobile terminal accessory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410445897.9A CN104239097B (en) | 2014-09-03 | 2014-09-03 | A kind of method, system and mobile terminal by updating mobile terminal accessory |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104239097A CN104239097A (en) | 2014-12-24 |
CN104239097B true CN104239097B (en) | 2018-01-16 |
Family
ID=52227232
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410445897.9A Expired - Fee Related CN104239097B (en) | 2014-09-03 | 2014-09-03 | A kind of method, system and mobile terminal by updating mobile terminal accessory |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104239097B (en) |
Families Citing this family (8)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108028767B (en) * | 2015-09-24 | 2020-03-20 | Oppo广东移动通信有限公司 | Method for upgrading adapter, mobile terminal and adapter |
US10412207B2 (en) | 2015-09-24 | 2019-09-10 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Mobile terminal, power adapter, and upgrade method thereof |
EP3171245B1 (en) * | 2015-09-24 | 2020-03-18 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method, apparatus, and system for upgrading adapter |
US10474452B2 (en) | 2015-09-24 | 2019-11-12 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Firmware upgrade through GPIO port via UART protocol |
WO2017049549A1 (en) * | 2015-09-24 | 2017-03-30 | 广东欧珀移动通信有限公司 | Mobile terminal, power supply adapter, and upgrading method thereof |
CN106791162A (en) * | 2017-01-07 | 2017-05-31 | 广州瑞新教育科技有限公司 | OMR apparatus for marking examinating paper Internet of Things modernization systems and technology are realized using Android mobile phone |
CN109960524A (en) * | 2019-03-22 | 2019-07-02 | 威海优微科技有限公司 | A kind of method and its equipment carrying out online software upgrade by I2C |
CN111381853B (en) * | 2020-03-16 | 2024-01-30 | Oppo广东移动通信有限公司 | Adapter upgrading method and device, electronic equipment and computer readable storage medium |
Citations (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101110040A (en) * | 2007-09-05 | 2008-01-23 | 威盛电子股份有限公司 | Firmware updating method |
CN101980159A (en) * | 2010-10-18 | 2011-02-23 | 中颖电子有限公司 | Updating device and updating method for firmware of U disk |
CN103729213A (en) * | 2013-12-18 | 2014-04-16 | 杭州华为数字技术有限公司 | Flash online upgrade method and device |
Family Cites Families (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060070112A (en) * | 2004-12-20 | 2006-06-23 | 삼성전자주식회사 | Programming / Update Method Using OSS OTC |
CN101625648B (en) * | 2009-08-18 | 2013-04-24 | 华为终端有限公司 | Plug and play equipment, firmware upgrade method and firmware upgrade device |
TW201432568A (en) * | 2013-02-04 | 2014-08-16 | Keystone Semiconductor Corp | Updating method for audio playback firmware and audio playback device using the same |
-
2014
- 2014-09-03 CN CN201410445897.9A patent/CN104239097B/en not_active Expired - Fee Related
Patent Citations (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101110040A (en) * | 2007-09-05 | 2008-01-23 | 威盛电子股份有限公司 | Firmware updating method |
CN101980159A (en) * | 2010-10-18 | 2011-02-23 | 中颖电子有限公司 | Updating device and updating method for firmware of U disk |
CN103729213A (en) * | 2013-12-18 | 2014-04-16 | 杭州华为数字技术有限公司 | Flash online upgrade method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104239097A (en) | 2014-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104239097B (en) | 2018-01-16 | A kind of method, system and mobile terminal by updating mobile terminal accessory |
CN102422553B (en) | 2016-03-30 | Near-field communication equipment |
US11113226B2 (en) | 2021-09-07 | Firmware burning apparatus and system |
CN102483728A (en) | 2012-05-30 | Device-dependent selection between modes for asymmetric serial protocols |
CN105095118B (en) | 2019-08-30 | The application method and device of equipment |
WO2016078263A1 (en) | 2016-05-26 | Upgrading control device and terminal, terminal upgrading method and system, and storage medium |
JP2012181835A (en) | 2012-09-20 | Electronic device with function of supporting multiple cards |
CN103412836B (en) | 2016-08-10 | Hot plug processing method, device and system |
CN106877103B (en) | 2019-10-08 | A kind of method that realizing circuit switching and adapter |
CN103744478A (en) | 2014-04-23 | Bluetooth wireless display and control method thereof |
CN103092648A (en) | 2013-05-08 | Method and system of mirror image upgrade and user device and personal computer |
JP4588427B2 (en) | 2010-12-01 | Memory system and data transmission speed setting method between host and memory card |
CN1331037C (en) | 2007-08-08 | A memory card with multiple interface functions and its transmission mode selection method |
JP2016524771A (en) | 2016-08-18 | Method and device for updating program data |
CN110956455A (en) | 2020-04-03 | Working method of virtual coin portable operation terminal based on block chain |
CN101882110A (en) | 2010-11-10 | Method for downloading data and terminal equipment |
CN110910105A (en) | 2020-03-24 | Portable operation terminal of virtual coin based on block chain |
US20140375433A1 (en) | 2014-12-25 | Electronic apparatus and control method thereof |
CN113033222B (en) | 2022-09-23 | Identification method of electronic equipment, user identification card and memory card |
CN113641611B (en) | 2022-07-15 | I2C interface circuit, control method thereof and electronic equipment |
CN107451067A (en) | 2017-12-08 | Download test processing methods and related products |
CN107358271A (en) | 2017-11-17 | A kind of reading/writing method of mobile terminal and its identification code |
CN101998691A (en) | 2011-03-30 | Method, system and device for data transmission |
CN107153956B (en) | 2020-09-08 | Method for simulating card reading interface and control device applying same |
CN104866396A (en) | 2015-08-26 | Information processing method and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2014-12-24 | C06 | Publication | |
2014-12-24 | PB01 | Publication | |
2015-01-14 | C10 | Entry into substantive examination | |
2015-01-14 | SE01 | Entry into force of request for substantive examination | |
2018-01-16 | GR01 | Patent grant | |
2018-01-16 | GR01 | Patent grant | |
2020-02-25 | CP03 | Change of name, title or address |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
2020-02-25 | CP03 | Change of name, title or address | |
2023-09-15 | CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180116 |
2023-09-15 | CF01 | Termination of patent right due to non-payment of annual fee |