summaryrefslogtreecommitdiff
path: root/monitor/main.c
Commit message (Collapse)AuthorAgeFilesLines
* monitor: Add option to force output colorSonny Sasaka2021-03-181-1/+16
| | | | | | | | | | | Sometimes we want to force output color even when stdout is not a terminal, for example when piping the output to a filter script and then piping it further to a pager which can display colors. This patch provides a general option to force whether color is on or off (always and never), or leave btmon to decide (auto). Reviewed-by: Daniel Winkler <danielwinkler@google.com>
* monitor: Add option to set fallback widthSonny Sasaka2021-03-031-1/+7
| | | | | | | | | Sometimes we want to be able to pipe the output of btmon to a non-terminal device. The current fallback width is usually not long enough so this patch adds an option to specify the column width. This is especially needed for text logs from bluetoothd. Reviewed-by: Daniel Winkler <danielwinkler@google.com>
* monitor: Add option to disable time offsetLuiz Augusto von Dentz2020-12-161-2/+7
| | | | | | This adds option -N/--no-time which disables the time offset which sometimes is useful when diffing traces where timing information is not relevant.
* monitor: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 47 License: LGPL-2.1-or-later monitor/bt.h monitor/hcidump.h monitor/avdtp.h monitor/crc.c monitor/sdp.c monitor/hwdb.c monitor/intel.h monitor/avctp.c monitor/control.h monitor/display.c monitor/a2dp.c monitor/ll.c monitor/ll.h monitor/jlink.h monitor/broadcom.h monitor/lmp.c monitor/keys.c monitor/ellisys.c monitor/main.c monitor/ellisys.h monitor/hwdb.h monitor/display.h monitor/jlink.c monitor/rfcomm.h monitor/packet.c monitor/crc.h monitor/keys.h monitor/sdp.h monitor/rfcomm.c monitor/avdtp.c monitor/a2dp.h monitor/avctp.h monitor/vendor.h monitor/hcidump.c monitor/intel.c monitor/tty.h monitor/control.c monitor/lmp.h monitor/analyze.c monitor/bnep.c monitor/l2cap.c monitor/vendor.c monitor/packet.h monitor/broadcom.c monitor/analyze.h monitor/l2cap.h monitor/bnep.h
* monitor: Add support for opening extra mgmt socket for eventsMarcel Holtmann2020-04-081-1/+6
|
* monitor: Add support for reading over J-Link RTTAndrzej Kaczmarek2019-10-141-2/+19
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for reading data over J-Link RTT. It can be used as replacement for TTY when reading from embedded devices since it's much faster and does block a UART. Data format is the same as for TTY. At the moment monitor over RTT is only supported by Apache Mynewt project. Reading data is done by polling RTT every 1 msec since there is no blocking API to read something from RTT buffer. To enable reading from RTT, J-Link configuration needs to be passed via command line (all parameters except <device> can be skipped to use default value): -J <device>,<serialno=0>,<interface=swd>,<speed=1000> -J nrf52,683649029 In some cases J-Link cannot locate RTT buffer in RAM. In such case RAM area and buffer name should be provided via command line: -R <address=0x0>,<area=0x1000>,<buffer=monitor> -R 0x20000000,0x10000
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* shared/mainloop: Remove mainloop_set_signalLuiz Augusto von Dentz2018-12-051-8/+1
| | | | | This removes mainloop_set_signal and replaces it usage with mainloop_run_with_signal.
* monitor: Add support for providing fallback manufacturerMarcel Holtmann2018-06-161-1/+7
|
* monitor: Fix command parameter orderingMarcel Holtmann2018-06-161-13/+13
|
* monitor: Add command line option to disable pager supportMarcel Holtmann2018-05-241-18/+24
|
* monitor: Fix buffer overflow with unix socketERAMOTO Masaya2017-10-051-0/+6
| | | | | | | | | | | | | | | | | If btmon uses a unix socket, which has a long pathname, then the buffer overflow occurs as below: *** strcpy_chk: buffer overflow detected ***: program terminated at 0x4C3085C: ??? (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4C34E46: __strcpy_chk (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4084FE: strcpy (string3.h:110) by 0x4084FE: control_server (control.c:1148) by 0x4029E9: main (main.c:144) This patch also gives an error and stops running when parsing command-line arguments if the unix socket pathname is too long. And this patch adds the redundant check in control_server() to prevent the regression when reusing in the future.
* monitor: Add option -A/--a2dp to dump A2DP stream dataLuiz Augusto von Dentz2017-04-261-1/+6
| | | | | | | | This is similar to SCO which disable audio dumping by default so only signalling data is shown: < ACL Data TX: Handle 256 flags 0x02 dlen 850 #6041 11:32:29.299212 Channel: 451 len 846 [PSM 25 mode 0] {chan 2}
* monitor: Disable monitor socket if a TTY is usedJohan Hedberg2016-04-291-5/+2
| | | | | | For now we don't have a way of resolving index conflicts between a TTY and a monitor socket. Simply disable the monitor socket for now if a TTY is used.
* Make use of new tty_get_speed helperJohan Hedberg2016-04-271-2/+7
|
* monitor: Permit monitor/mgmt socket errors if a TTY is usedJohan Hedberg2016-04-271-3/+6
| | | | | One may want to run btmon without special privileges when using it in TTY mode. Ignore any errors from control_tracing() in such a case.
* monitor: Add --tty-speed command line switchJohan Hedberg2016-04-271-1/+11
|
* monitor: Add --tty switch to help textJohan Hedberg2016-04-221-0/+1
|
* monitor: Add support for TTY based dataJohan Hedberg2016-04-211-1/+5
| | | | Add support for receiving a monitor data stream over a TTY.
* monitor: Add support --priority option to getopt parsingMarcel Holtmann2015-11-081-0/+1
|
* monitor: Add support for user logging priority selectionMarcel Holtmann2015-11-081-1/+5
|
* shared: Move mainloop implementation from monitor to sharedJohan Hedberg2015-02-121-1/+2
|
* monitor: Exit with error if failed to open file for writingSzymon Janc2014-07-151-2/+4
|
* monitor: Add support for resolving random addressesMarcel Holtmann2014-02-171-1/+9
|
* monitor: Update copyright and license detailsMarcel Holtmann2014-02-111-11/+11
|
* monitor: Add todo helper for missing LMP operationsMarcel Holtmann2014-01-081-0/+2
|
* monitor: Add initial support for analyzing btsnoop tracesMarcel Holtmann2014-01-061-2/+20
|
* monitor: Add support for Ellisys HCI InjectionMarcel Holtmann2014-01-031-2/+18
|
* monitor: Add command for extracting missing decodingsMarcel Holtmann2013-10-201-0/+4
|
* monitor: Fail on invalid command line parametersMarcel Holtmann2013-10-021-0/+5
|
* monitor: Move btsnoop file creating into control handlingMarcel Holtmann2013-08-231-3/+5
|
* monitor: Allow specifying type of btsnoop file to createMarcel Holtmann2013-08-201-1/+1
|
* monitor: Add an option to dump SCO trafficVinicius Costa Gomes2013-04-241-1/+6
|
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. The patch needs to be split up and the gdbus/ changes were bogus compared to the original commit message. Conflicts: Makefile.am Makefile.obexd profiles/cyclingspeed/cyclingspeed.c profiles/heartrate/heartrate.c src/error.c
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | Instead of trying to include config.h in each file over the tree and possibly forgetting to include it, give a "-include config.h" argument to the compiler so it's guaranteed that a) it will be included for all source files and b) it will be the first header included. gdbus/ directory is left out, since it would break other projects using it.
* monitor: Use hcidump fallback only if monitor channel is not presentMarcel Holtmann2012-11-111-5/+2
|
* monitor: Allow filtering on controller indexMarcel Holtmann2012-11-041-4/+19
|
* monitor: Support command line options for timestampsMarcel Holtmann2012-11-041-4/+18
|
* monitor: Show time offset instead of full time valueMarcel Holtmann2012-11-041-1/+1
|
* monitor: Do not show index for single controller trace filesMarcel Holtmann2012-11-041-1/+0
|
* monitor: Add simple L2CAP packet framingMarcel Holtmann2012-11-031-1/+0
|
* monitor: Add support for reading btsnoop trace filesMarcel Holtmann2012-10-311-2/+13
|
* monitor: Store traces with new data link formatMarcel Holtmann2012-10-301-9/+9
|
* monitor: Add support for server channelsMarcel Holtmann2012-10-301-1/+6
|
* monitor: Fix optstring to parse -b parameterAnton Weber2012-06-281-1/+1
| | | | | Without the colon getopt ignores the parameter and optarg is always NULL.
* monitor: remove extra black lineGustavo Padovan2012-05-131-1/+0
|
* monitor: add version informationGustavo Padovan2012-04-271-1/+5
|
* monitor: add help informationGustavo Padovan2012-04-271-1/+15
|
* monitor: Add support for storing btsnoop formatted logsMarcel Holtmann2012-03-011-0/+24
|
* monitor: Use better signal integrationMarcel Holtmann2012-02-271-0/+17
|