Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 10 months ago.
Help to debug this example...
Hi, As a complete novice, I wonder is someone could spare some time to help me get this example running?
Hardware: Is as described ( ie: p31, p32, GND & +5v for device & with 2*15k resistors tied to GND on D+ and D-). The USB device is a u-blox ( idVendor=1546, idProduct=01a6) SatNav module which is producing a constant stream of ASCII character @ 9600 and no flow control.
Observations:
led1 flashing (I'm guessing that is the main() loop telling me that it is running?
led4 turns on/off as I insert/remove device.
As I insert a device the terminal program (minicom) on the Mbed USB reports [USB_INFO: /src/USBHost/USBHost/USBHost.cpp:158]New device connected: 10002e84 [hub: 0 - port: 1]
Testing so far:
Copious printf("I am here!");
lines inserted.
From what I can tell, it is spending all its time at the while(!serial.connect())
at lines 13 & 14. Irrespective of the device connection state! It never seems to get to while (serial.available())
at line 25?
Other anomalies:
When I plug in a keyboard I get - [... New Keyboard device: VID:046d PID:c534 ...]
AND
when I disconnect, I get a message (which I do not get for the serial device) [...Device disconnected ... Keyboard...]
Sorry it is a long question. And many thanks in advance. Regards, Martin
Question relating to:
1 Answer
8 years, 10 months ago.
I am not familiar with the u-blox device,
Questions
1: Have you plugged it into your PC? 2: did it come up as a USB Serial port? 3: did you get "SENSIBLE" data out on a terminal screen?
I do believe, unfortunately that the MBED, cannot read serial data from such devices, Such as the FTDI chip - probably the most preferred and reliable (not the cheapest though)
curiously, it can read serial data from the MICROCHIP version.
Hope that was useful
Ceri
Just found an image of u-blox circuit, and it does have RS232C I/O pins (3V3 / 5V0)
So that might be another path for you.
posted by 04 Jan 2016Hi Ceri,
Q1. Yes, I have plugged the u-blox into my PC (linux) and receive this DMESG output:
[ 4633.801459] usb 1-1.4: new full-speed USB device number 8 using ehci-pci
[ 4633.887637] usb 1-1.4: New USB device found, idVendor=1546, idProduct=01a6
[ 4633.887643] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4633.887647] usb 1-1.4: Product: u-blox 6 - GPS Receiver
[ 4633.887651] usb 1-1.4: Manufacturer: u-blox AG - www.u-blox.com
[ 4633.888183] cdc_acm 1-1.4:1.0: ttyACM0: USB ACM device
Q2. "...as a USB Serial Port..." Not sure of the answer to this? I understand that a "serial" port could be ttyUSBx or ttyACMx. Not sure of the distinction? This unit is reporting as an ACM device.
Q3. Yes, On my PC terminal (9600,n81), readable data. Like this:
mprowe@gzunder:> cat /dev/ttyACM0
$GPRMC,093329.00,V,,,,,,,040116,,,N*7D
$GPVTG,,,,,,,,,N*30
$GPGGA,093329.00,,,,,0,04,9.74,,,,,,*5A
$GPGSA,A,1,03,01,17,11,,,,,,,,,14.08,9.74,10.17*04
$GPGSV,4,1,13,01,59,115,32,03,89,047,21,06,10,295,,09,04,196,*7F
$GPGSV,4,2,13,11,39,141,31,12,04,351,,14,05,032,,17,50,284,29*76
$GPGSV,4,3,13,19,57,266,19,23,,,31,28,07,247,,31,14,072,20*43
$GPGSV,4,4,13,32,49,066,19*4F
$GPGLL,,,,,093329.00,V,N*48
Regards, Martin
PS - Your supplementary comment. No. I understand the chip it this:
https://github.com/CainZ/V.KEL-GPS/blob/master/VK2828U7G5LF%20Data%20Sheet%2020150902.pdf
PPS - Really, really lost in this forum (if that is what it is?). Andy A. Opps.... Sorry wrong link. Checking.
posted by 04 Jan 2016