New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USB serial support #11

Merged
merged 2 commits into from Mar 24, 2014

Conversation

Projects
None yet
2 participants
@willglynn
Copy link
Contributor

willglynn commented Sep 5, 2013

This changeset makes the FlySight a composite USB device, supporting both the existing mass storage interface as well as a CDC (USB serial) interface. This directly exposes the u-blox module to the host, which by default yields a normal GPS stream of NMEA sentences, but being bi-directional allows the host to reconfigure the module in whatever manner is desired.

My Mac automatically gets a /dev/tty.usbmodemfd121 supported by standard Apple drivers. Opening it gives:

$GPVTG,,T,,M,0.811,N,1.503,K,A*2C
$GPGGA,034532.00,4153.53396,N,08904.27424,W,1,11,1.08,242.1,M,-33.5,M,,*62
$GPGSA,A,3,21,18,15,22,24,06,27,03,26,14,19,,1.84,1.08,1.50*03
$GPGSV,3,1,12,03,16,301,10,06,24,284,22,14,15,223,19,15,49,052,24*73
$GPGSV,3,2,12,18,72,327,27,19,09,324,30,21,74,185,26,22,40,288,32*7C
$GPGSV,3,3,12,24,40,116,14,26,05,045,26,27,24,296,22,30,00,044,*72
$GPGLL,4153.53396,N,08904.27424,W,034532.00,A,A*73
@willglynn

This comment has been minimized.

Copy link
Contributor

willglynn commented Mar 23, 2014

65380a8 used to work but it broke with the new LUFA. I rebased onto e7785c2 and got it to build again, but I have tried running it in actual hardware.

@willglynn

This comment has been minimized.

Copy link
Contributor

willglynn commented Mar 23, 2014

bfedf71 presents itself correctly, at least:
screen shot 2014-03-23 at 12 52 35 pm

@willglynn

This comment has been minimized.

Copy link
Contributor

willglynn commented Mar 23, 2014

Oops. That commit also clobbered parts of the descriptor it shouldn't have. Fixed.

@willglynn

This comment has been minimized.

Copy link
Contributor

willglynn commented Mar 23, 2014

All right! 886310f actually for-realsies works for both mass storage and serial:

$GPVTG,,,,,,,,N*30
$GPGGA,190035.00,,,,,0,00,9SA,A$GPRMC,190036.00,V,,,,,,,230314,,,N*77
$GPVTG,,,,,,,,,N*30

The LUFA upgrade changed EVENT_USB_Device_UnhandledControlRequest() to EVENT_USB_Device_ControlRequest() but MassStorage.c wasn't updated to match, so as of the current master MS_Device_ProcessControlRequest() never gets called. This changeset fixes that; apparently mass storage works even if it's ignoring control requests, but CDC serial does not. If you want to merge that change separately, I can split it out.

@willglynn willglynn referenced this pull request Mar 23, 2014

Closed

Add tags #26

Add USB serial support
This changeset makes the FlySight a composite USB device, supporting
both the existing mass storage interface as well as a CDC (USB serial)
interface. This directly exposes the u-blox module to the host, which
by default yields a normal GPS stream of NMEA sentences, but being
bi-directional allows the host to reconfigure the module in whatever
manner is desired.
@willglynn

This comment has been minimized.

Copy link
Contributor

willglynn commented Mar 23, 2014

Rebased onto a59ef6b.

@ghost

This comment has been minimized.

Copy link
Collaborator

ghost commented Mar 23, 2014

This seems to break the MSC interface on Windows. Looking into the problem now.

Update InterfaceNumbers to match enumeration
@crwper pointed this out by email. It worked on Mac OS X with the
zero interface numbers; don't ask me how.

flysight pushed a commit that referenced this pull request Mar 24, 2014

flysight

@flysight flysight merged commit 8f006fc into flysight:master Mar 24, 2014

1 check passed

default The Travis CI build passed
Details

@willglynn willglynn deleted the willglynn:gps_via_usb_serial branch Mar 24, 2014

crwper pushed a commit to crwper/flysight that referenced this pull request Aug 16, 2015

Merge pull request flysight#11 from crwper/merge_flysight
Select configuration file from folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment