summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 1.3.1HEADmasterSamuli Piippo2023-11-221-1/+1
| | | | | Change-Id: Ic73c63369a7b0990318a74332aadfda5a7729926 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
* CMake: Find arm64 libusbSamuli Piippo2023-10-301-15/+5
| | | | | | | | | Use updated libusb package which has arm64 support. Task-number: QTBUG-117088 Change-Id: Iad2acefd3f860f8f46a8b6cb2df8efd216907e43 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
* coin: build against Qt 6.5.3Samuli Piippo2023-10-302-2/+2
| | | | | | Change-Id: I219da0b9d6db6017fc4ebfd2e558febf1695f3ca Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
* CMake: link against static libusb on macOSSamuli Piippo2022-12-011-0/+4
| | | | | | | | Build qdb with static libusb to avoid need to install it separately on macOS. Change-Id: I76d2487f11f11f70b6901b070c389310c091226c Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* Coin: update dependenciesSamuli Piippo2022-11-242-3/+3
| | | | | | | | Take platform configs from tqtc-qt5.git and build agaist Qt 6.2.6. Change-Id: Id0cb5f7fcd99a918c23ffe5d8809199c93d70c12 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
* CMake: adapt to new CMake APISamuli Piippo2021-06-163-5/+5
| | | | | | | Update dependencies and adapt to the new Qt CMake API. Change-Id: Ib8b52f00da8f2be5f0f8706f091487a109e34848 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* Build QDB with CMakeLassi Lehikoinen2021-05-2837-415/+275
| | | | | | | | Also some Qt6 related changes. Task-number: QTBUG-86118 Change-Id: Id5bdf646071fcc10415945dfae73b2c66e53f7a7 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Use qMinSamuli Piippo2020-09-111-1/+1
| | | | | | | QByteArray::size() is now qsizetype in Qt6 Change-Id: Ib73c9e08c072ed5de99cb9e43cf14b972350a347 Reviewed-by: Kari Oikarinen <kari.oikarinen@kapsi.fi>
* Add include for QIODeviceSamuli Piippo2020-09-072-0/+2
| | | | | | Change-Id: I0bd1e7de0cf56fc1c6a2594bcb963ead1c03ba4c Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* qdb: version update to 1.2.1v1.2.1Rami Potinkara2020-04-231-1/+1
| | | | | | Task-number: QTBUG-82531 Change-Id: Id1fce3c89be30cde05ce199c48452b971ae6218b Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* qdb yaml changes for mac os coin provisioningSamuli Piippo2020-04-151-1/+1
| | | | | | | | Changed ref to correct Qt version Task-number: QTBUG-82531 Change-Id: I483bd5d0b284db68510dfe6805551745c8c65795 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Coin: update dependenciesSamuli Piippo2020-04-062-2/+2
| | | | | | | to qtbase v5.14.2 with platform configs from 5.14 branch. Change-Id: I277913759705af5bca3e53de3f63be6cd98cbb85 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* RNDIS to more generic due to CDCECMRami Potinkara2020-04-014-19/+19
| | | | | | | | | | | USB Ethernet CDC-ECM gadget configuration added. Qt Creator can be connected via USB Ethernet to Mac OS with CDCECM, to Linux with RNDIS or CDCECM and to Windows 10 with RNDIS. Task-number: QTBUG-82530 Change-Id: Icdca6e50f0b94c99900c4789059a96d77807c9d6 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Add dependencies yaml for building against 5.12Samuli Piippo2019-12-122-0/+7
| | | | | | | | Add yaml files to define the dependencies for the provisioning from qt5 (5.12) and the build dependency to qtbase (v5.12.6). Change-Id: Ie01c0a2897cd6a308a796924a8087a77da543cd4 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Fix test linking on CI buildsSamuli Piippo2019-10-162-0/+4
| | | | | | | | | | Since qtbase commit 521a85395, Qt libs are fully resolved and the default Qt install path is no longer searched for libraries, tests failed to find libqdb.a on CI builds. Add the default install path to the search paths. Change-Id: I1e1e6a1c5c1a84ec47372e6fddb33070affe9df3 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Only build qdbd daemon on LinuxKari Oikarinen2019-06-061-1/+1
| | | | | | | | It requires Linux kernel headers and only makes sense to run on a USB peripheral anyway. Task-number: QTBUG-76086 Change-Id: I03f5eafb3d4c41341e5c651d9ef88991e67e0530 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Bump version to 1.2.0v1.2.0Kari Oikarinen2018-09-111-1/+1
| | | | | | Change-Id: I4eb7dda4f70052d9ff0b5ef8c23a3d3dbbf5c120 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Disable USB gadget when shutting downKari Oikarinen2018-09-111-5/+22
| | | | | | | | | This was previously done by the init script. Move it inside qdbd like the initialization was moved previously. Task-number: QTBUG-63029 Change-Id: I869138acd579f9f3f1f3af1ebf5583e7882296fa Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Handle both SIGINT and SIGTERM on unixKari Oikarinen2018-09-113-9/+13
| | | | | | | | | Handling SIGTERM allows graceful shutdown when stopped by init script. Task-number: QTBUG-63029 Change-Id: Iac96666895a2a9bf256c6eb7abb528f65a198133 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Split InterruptSignalHandler implementations by platform to different filesKari Oikarinen2018-09-114-77/+116
| | | | | | | | | Too hard to read if it's all in a single file. Change-Id: I971e83350c04a9f8c75566d18a0f1ec8d6a0fcd0 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Add gadget initialization to the qdbd daemonSami Nurmenniemi2018-09-104-0/+52
| | | | | | | | | | | | | | It's not possible to deterministically control timings of gadget initialization from an external script. Moved gadget initialization logic from /usr/bin/qdbd-init.sh to the qdbd USB gadget initialization. This was causing problems when qdbd daemon launch was delayed because of kernel random pool initialization. Done-with: Kari Oikarinen <kari.oikarinen@qt.io> Task-number: QTBUG-63029 Change-Id: Ia403fbe6ebdbc83908bafb023a88fff058efc840 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Add missing overrideKari Oikarinen2018-09-101-1/+1
| | | | | | Change-Id: Ib52bd2323d060d21056bb58b82c74aeb911a042a Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Bump version to 1.1.0v1.1.0Kari Oikarinen2018-03-091-1/+1
| | | | | | | New commands to show warnings and errors are worth a minor version bump. Change-Id: Iea9b702fc67d36ead7c04b547727b2cd957a17f8 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Only deliver warnings and higher to clientsKari Oikarinen2018-03-072-4/+4
| | | | | | | | | Unfortunately on Windows there's regularly failures to get config descriptors for some devices. That's something I want in log files even if debug messages are disabled, but it happens too often on Windows to show to users. Change-Id: Ib6f1205074b8b8386175fda0ac1a91344d98ef8c Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* Add commands for showing server messagesRainer Keller2018-02-137-1/+153
| | | | | | | | | Some commands allow users to retrieve server messages on the command line. Change-Id: Id9d69c6c9a300cfefadde58321e301eb827e04ce Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Refactor duplicated error handlerRainer Keller2018-02-122-31/+8
| | | | | | | | | | | For extensions of qdb the default error handler (start server and try again) which was used for askDevices and watchDevices is used very often. In order to not duplicate this function for every additional command the same function is reused. Change-Id: I469ccf6955c5590e295d9182a80cdfb3a4dfbcd0 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Store log messages in a bufferRainer Keller2018-02-122-0/+54
| | | | | | | | | For later usage important log messages are stored in a buffer. A logging class will notify listeners about new messages in the buffer. Change-Id: If892c050ffe1e929d9ccf08880db26d98fdb4ed9 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Make error conditions more clearRainer Keller2018-02-124-10/+10
| | | | | | Change-Id: I5b27907883ecebd7572b3b7e400179a240199f8f Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Remove duplicated codeRainer Keller2018-02-082-34/+22
| | | | | | Change-Id: I26c4361900ebfa5691a8ce77ab4226e87cc07219 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Log network script outputRainer Keller2018-02-081-3/+19
| | | | | | | | | All calls to network setup scripts and their output are logged for debugging. Change-Id: Iceb323134e91abe478d7f49b755347c37931f67d Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Bump version to 1.0.2v1.0.2Kari Oikarinen2017-10-031-1/+1
| | | | | | | | | Even though there is no changes in code, a new release needs to made to make use of a newer version of libusb to fix a crash on Windows 7. Task-number: QTBUG-62430 Change-Id: I306873408dd129579f4c285da5bef49a1b74249f Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Show proper error messageRainer Keller2017-08-312-4/+16
| | | | | | | | | End users will not know what LIBUSB_ERROR_ACCESS means. Instead give a hint to read the manual because most probably they forgot to setup the udev rule. Change-Id: I8237d55dfe64976f4d4a279af31dfa743e8cc29c Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Bump version to 1.0.1v1.0.1Kari Oikarinen2017-06-061-1/+1
| | | | | Change-Id: I36bc0232df05575546a837db5f2765324293f236 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Add -f flag to ignore errorsKari Oikarinen2017-06-063-4/+21
| | | | | | | | | If -f is given with a client command, return code is always 0 even if there were errors. This allows using stop-server even when it might fail due to no server being available. Change-Id: I0222b918510ffc47e804da381cfe21f83aa7dfef Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Add command for starting the serverKari Oikarinen2017-05-303-1/+10
| | | | | | | | Existing `qdb server` runs the server on the foreground, which is different. Change-Id: Id4b9cf4b28e856e3dac93d03533a9a7d6d2874b9 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Fix logging raw messages by defaultKari Oikarinen2017-05-302-4/+4
| | | | | | | | | | | The filter rule handling was not updated when the logging categories were renamed to include qdb. This caused the raw messages to be logged always. Amends 2750685b372b78330a9139a98d084bb7a60e367e. Change-Id: I43d37ea9f81f15efce4eefc4b04c74006ee72348 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Revert "Skip building parts depending on libusb if it is not found"Kari Oikarinen2017-05-111-2/+2
| | | | | | | | | | This reverts commit 9147ebaf86cf3688066f538c407a5785f8d4200a. That commit was a workaround for missing provisioning in Coin and no longer necessary. Change-Id: I1ae1f3215f2e714d43ffe872d84973a09a1bd787 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Relicense to Commercial + GPLv3v1.0.0Kari Oikarinen2017-05-0291-721/+2115
| | | | | | Task-number: QTBUG-60434 Change-Id: I73740ae66ab565f32df25fa2c98d5cb6c019d666 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Reuse network configurations set on device if possibleKari Oikarinen2017-05-0212-41/+265
| | | | | | | | | | | | | | | | | | | | Don't allow reconfiguring the network on the device without a reset in between. It wouldn't lead to a working configuration, since the host has already gotten an IP from the existing configuration at this point. But if the already configured network happens to be free, use it. This allows devices to work keeping the same address even if host qdb is restarted. This doesn't guard against the possibility that the existing configuration conflicts with a network already in place. But telling apart that situation would be too difficult: How to tell whether the network is the device or something else? In that case the user just has to replug the device. Then it will pick an unused subnet. Task-number: QTBUG-59451 Change-Id: I10c948713736dd79442265ac6a590b8a7cf8345a Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Keep track of used subnetsKari Oikarinen2017-05-028-32/+209
| | | | | | | | | | | | | | | | | If we don't keep track of them, inserting two devices at the same time can lead to both picking the same candidate. This happens if the host does not get an IP in time and thus the network is still free from host perspective as the second call looks for the subnet to use. The tracking is done by UsbDevice and DeviceInformation keeping a SubnetReservation. The SubnetReservation is gotten from findUnusedSubnet(), which uses a SubnetPool singleton to keep track of them. When the SubnetReservations are destructed, they call SubnetPool to free the subnet the reserved. Task-number: QTBUG-59449 Change-Id: I4b28ade4fa7a5660bd699882398facafafc9d795 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Reset network configuration when cable is unpluggedKari Oikarinen2017-05-025-0/+174
| | | | | | | | | | | | | | Read USB function filesystem events from the control endpoint and react to events related to disconnecting by calling the network configuration script to reset. This means that when the cable is plugged in, network is always in a reset state and a stale IP according to the previous configuration won't be returned. Task-number: QTBUG-59450 Change-Id: I4ae77c6a9283941802d7b04b3588dbbb81b7c266 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Configure DHCP server on device before handshakeKari Oikarinen2017-05-0222-532/+694
| | | | | | | | | | | | | | | | | | | | | | | Change the procedure for a newly detected device: First configure the network and then do the handshake for the device information. The configuring the network part is new and incorporates a new service NetworkConfigurationService. On the device it relies on a script b2qt-gadget-network.sh (or as specified in a command line parameter) which does the actual configuring of the USB network interface. The network configuration to apply is selected from a list of hardcoded candidates from the private use IPv4 ranges available. They are checked against the existing networks on the host and an unused one is picked. On the device the USB interface is configured to use this network and to act as a DHCP server for it. Host will then pick up an IP from this DHCP server automatically. Previous configuration of the host network is thus not necessary and is removed. Task-number: QTBUG-58614 Change-Id: I6a4ed34ef7d5cba9e55e6fa4f07725bb3c00d795 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Store fetched device in DeviceInformationFetcherKari Oikarinen2017-03-284-77/+43
| | | | | | | | | Rather than keeping that state in DeviceManager. DeviceManager can then independently start fetching for new devices instead of keeping a queue for them. Change-Id: I0db131a84eec94aef473fb1a7bca2aa20be3d6d9 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Remove unused HandshakeService::{close,hasStream}Kari Oikarinen2017-03-272-13/+0
| | | | | Change-Id: Ia12faec41ef2bff6b2238848babaf68deea2a822 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Strip non-ASCII characters from USB serial numbersKari Oikarinen2017-03-271-0/+3
| | | | | | | | | | | | | This works around getting the correct serial number prepended with U+033A (COMBINING INVERTED BRIDGE BELOW). That character does not seem to be present when the serial is set up in the qdbd-init.sh script and it is not read by HandshakeExecutor either. This assumes serial numbers shouldn't have non-ASCII and don't have question marks. Change-Id: I133a76020b2ea42a12338485a45fce2679895845 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Add ConnectionPool for ConnectionsKari Oikarinen2017-03-248-22/+119
| | | | | | | | | | | | Rather than directly creating the Connection inside DeviceInformationFetcher, get it from a ConnectionPool that gives an existing connection if there already is one to the device. Change connections to close upon destruction. They will be closed once last shared pointer gotten from ConnectionPool destructs. Change-Id: I44d4b11d71f8b3c5488fdb52266608bfee69c644 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Give up after 5 errors in UsbConnectionReaderKari Oikarinen2017-03-241-1/+1
| | | | | | | | | | | | Previously a zero-length read was raised as a sign of error every 5 errors. However this meant reams of errors and invalid messages being sent if a Connection was active to the device while it was unplugged. The first invalid message is sufficient, since Connection will reset in response. Change-Id: I44cd5e90edf84aee1680f1852b637c0c2b590b2e Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Close streams when resetting ConnectionKari Oikarinen2017-03-241-1/+6
| | | | | | | | | | The streams were only destroyed, not closed. This meant that ongoing Services would have a dangling pointer. Also only reset the connection once in response to Invalid messages. Change-Id: I35ccb149986a76ee9abf9182923ee40bd5174373 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Link libusb statically on WindowsKari Oikarinen2017-03-241-1/+6
| | | | | | Change-Id: I8a2115b698aa0cea2728e1e86467e4e36dbee9a0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Remove sync.profileKari Oikarinen2017-03-141-3/+0
| | | | | | | Coin no longer uses these files for dependency information. Change-Id: Id2d45d5a8c3392cc8e08964577787ad39470be45 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>