I want to link a Bluetooth barcode scanner (Gryphon GBT4400) in "client" mode to a Bluetooth-enabled PC with the serial port profile.
The Bluetooth PC adapter is Atheros Communications AR3012.
PC is running under Ubuntu Server 16.04.
I first run the following commands through bash script:
sdptool add --channel=22 SP > /dev/null
rfcomm watch /dev/rfcomm0 22 1>/dev/null 2>&1 &
Then with scanner I scan the barcode to link the scanner to the PC in Bluetooth (this barcode includes the MAC address of the Bluetooth interface of the PC).
It works well: PC and scanner are now connected.
Then I open the serial port through a QT/C++ application running on PC, built with QT 5.5.1, with following code:
pSerialPort = new QSerialPort("/dev/rfcomm0");
pSerialPort->open(QIODevice::ReadOnly);
At this step, this warning message is immediately displayed on PC:
Bluetooth: TIOCGSERIAL is not supported
Except this warning, everything works very well: the QT application retrieves correctly all the scanned barcode values.
I found almost nothing on the web.
Can someone help me to understand this warning message ?
You could remove all warning and error messages with:
qt_app 2>/dev/null
but that would hide other warnings that you might want to see. To hide just this one without having to change any source code and recompile, you can do:
qt_app 2>&1 | grep -v TIOCGSERIAL
Related
I am new to Arduino and using the esp32 and I am using PlatformIO to command my project in C++ through VSCode. I just downloaded my project folder and opened it in PlatformIO and attempted to run the existing code (over 1000 lines) which is meant to command an exoskeleton. When I run the program, however, I get error messages, as follows:
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '', serial '' at bus location ''
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '', serial '' at bus location ''
I feel like I am missing something very basic, but everything I search for gives me very advanced problems, and I am hoping someone could dumb this down for me.
Any help is appreciated, thank you.
By the way, I am actually using Mac, and the output when I enter the ls -ls /dev/tty.usbserial-1410 is:
0 crw-rw-rw- 1 root wheel 18, 2 7 Dec 14:13 /dev/tty.usbserial-1410
You may used a different type of esp32 module (there're lots of variants in the market) from the original design. You have 2 options,
If the software works and you don't want to modify it, then try to find the same type of esp32 module specified by design.
Find out vid/pid from your current esp32 module and update software to connect. Refer to below procedure.
The procedures to update usb serial binding,
Run lsusb to find out vid/pid
lsusb commands
update the existing rule specified with vid 0403 and pid 6010 to your current vid/pid, usually the rule file is under /etc/udev/rules.d/.
Run sudo udevadm control --reload-rules to activate.
(Using STM32F767 microcontroller)
I have a remote debugging environment setup on a RPI using OpenOCD. I can connect to it just fine using GDB.
However since I am writing a bootloader I need to flash the firmware to a specific offset in flash memory. E.g bootloader starts at 0x800000 and firmware should start at 0x8010000 for example so the offset would be (0x10000).
This works fine locally using: mon flash write_bank 0 main.bin 0x10000
But since I don't have the main.bin in the RPI, is there a way I could use OpenOCD or GDB to specify my local file instead and that would be sent over the remote connection?
Note that I would not like to setup a FTP and thus am looking for an alternate solution.
Best regards
gdb should supports sending files to remote via the 'remote put '. But, when I try this in gdb, I get the response "Remote I/O error: Function not implemented". Seems like OpenOCD does not support this
Use "file" to select the file and then "load" will send the file across to the device.
Trying to debug my sample blink_led code on STM32L476 Nucleo-64 board but gdb can't connect to OpenOCD (connection drops almost instantly with error). I've read plenty of posts here and there but none of them helped. Tried adding commands to OpenOCD using -c but no change of behavior.
My code compiles both in Release and Debug config in Eclipse. I can flash the bin file using drag and drop (while the board has built-in STLink add-on) and looks the code runs perfectly on the board (LED blinks).
Cross compiling on Centos7 using the following versions:
Toolchain (gdb): gcc-arm-none-eabi-8-2018-q4-major
OpenOCD: 0.10.0-11-20190118-1134
As using eclipse didn't work I tried the command line,
(I'm not an experienced developer in this environment so I could not find any config file closer to my stm32l476 board than the stm32l4discovery.cfg, please let me know if there might be some issues using it)
./bin/openocd -f scripts/board/stm32l4discovery.cfg -c "init"
It starts,
GNU MCU Eclipse 64-bit Open On-Chip Debugger 0.10.0+dev-00462-gdd1d90111 (2019-01-18-11:37)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : clock speed 500 kHz
Info : STLINK V2J28M17 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.244386
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Then starting GDB:
./arm-none-eabi-gdb ~/eclipse-workspace/test-blink-led/Debug/test-blink-led.elf
then running the following command in gdb:
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
Remote connection closed
As it shows gdb connection drops instantly and OpenOCD prompts the following errors:
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080022e6 msp: 0x20017ff8
Info : device id = 0x10076415
Warn : STM32 flash size failed, probe inaccurate - assuming 1024k flash
Info : flash size = 1024kbytes
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Error: jtag status contains invalid mode value - communication failure
Polling target stm32l4x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
So from those geeks who do it on a similar platform on a daily basis, can anyone help and tell me where am I doing wrong. Does missing any compile-time flag might result in this problem?
I'm scratching my head for a couple of days now so please let me have your hints.
One of the reasons may be that your STLINK firmware seems pretty old (STLINK V2J28M17 as your log shows). I suggest downloading the STSW-LINK007 application to upgrade the firmware. The software is a multiplatform Java application. It works flawlessly in Debian GNU/Linux.
Currently, I use another gdb server texane/stlink for my debugging task with GDB without any problem on some Nucleo and also custom boards. I use target extended-remote command to join the port of the server. Maybe you can try to connect with this command also under OpenOCD.
Try
telnet localhost 4444
it worked for me, while 3333 didn't
I'm trying to debug a program on my board which runs an embedded linux and I have Ubuntu as host system. I have a big problem with gdbserver. You see the thing is that my board doesn't have an Ethernet interface but a serial device which I'm using for console and I noticed that you can use a serial device for debugging in gdbserver although I couldn't find an example of this considering everyone that used gdbserver in videos or books used it in TCP mode which I can't do that.
So What I did was simply running gdbserver on the board this way:
root#DM368# gdbserver /dev/ttyS0 hello
Process hello created; pid = 472
On the host side I'm using ddd program and I ran:
root#mosi-VirtualBox:~# ddd --debugger arm-linux-gdb
And in ddd window terminal I entered:
(gdb) cd /root/home/mySimpleHello/hello
(gdb) target remote /dev/ttyUSB0
(gdb) file hello
And /dev/ttyUSB0 is connected to the board's /dev/ttyS0
But I don't get anything back in gdb and there is nothing in gdbserver output which is kind of weird. I mean not a single message like a "host connected" or "remote debugging from ..." or things like that. And in ddd when I ran:
(gdb) b main
Breakpoint 1 at 0x83ac: file hello.c, line 10.
(gdb) run
Then gdb says:
the program in not being run
I tried with gdb on Ubuntu's terminal directly (whitout ddd) and the same thing happened. I even tried with eclipse and I setup a debugging profile in eclipse and I installed gdb-multiarch program and used that in eclipse with its .gdbinit file set to arm. Nothing happens and I have no idea why this simple procedure wouldn't work.
Does somebody have any idea? What am I doing wrong? How can I debug a program using a serial connection?
I set up following this guide: http://www.linuxforu.com/2011/03/kgdb-with-virtualbox-debug-live-kernel/
but instead of using the virtual machine, I use 2 real machine:
- one is debugger
- second one is target (with equipped wireless card running ath5k driver)
On the debugger machine, I successfully come into
$gdb
(gdb)target remote /dev/ttyS0
step. Then I use command (gdb)add-symbol-file but there is no /lib/modules/3.9.0/kernel/drivers/net/wireless/ath/ath5k/ath5k.ko
Are there any wrong in this methodology?
I want to debug the ath5k module so do I need to #gdb vmlinux in the fist place?