Skip to content
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

USB serial not working #97

Closed
jonnor opened this issue Aug 16, 2015 · 5 comments
Closed

USB serial not working #97

jonnor opened this issue Aug 16, 2015 · 5 comments

Comments

@jonnor
Copy link

jonnor commented Aug 16, 2015

Under https://github.com/rad1o/f1rmware/blob/master/doc/debugging.md it is mentioned that USB serial should be possible, and that the testapp -> CDC does something with this.

I tried to

  • Run udevadm monitor on computer (Linux 4.1) to observe for devices being connected
  • Power the rad1o, go into testapp, start CDC. Poke joystick around.

Expected:

  • To see a serial device on computer.
  • That CDC app writes something helpful to LCD screen

Actual:

  • No serial devices is seen on computer.
  • Nothing is shown on LCD screen (stays in menu)
  • The rad1o freezes, need to reboot to go to another app

Tested both USB ports. Tested on two different devices. Running f1rmware from git. MSC mode works fine.

@jonnor
Copy link
Author

jonnor commented Aug 16, 2015

Need this for MicroFlo (a dataflow programming env I ported to radio), so I can live program it from host : )

@erikbos
Copy link

erikbos commented Aug 24, 2015

I have tried to use CDC as well, with both the rad1o library code and NXP's library code for the NXP4330. In both cases I could not get it to work: The VCP device does not appear on my laptop and the code appears to wait forever on a call to vcom_connected().

Also in the testapp's cdc tester does not work at first use, it hangs as well. It does work when starting the testapp, selecting msc, stopping msc, and then starting cdc. So it looks like the msc code initialises something cdc needs as well..

@jonnor
Copy link
Author

jonnor commented Aug 25, 2015

@erikbos So when you run the msc code first, you see the serial device on laptop?

@erikbos
Copy link

erikbos commented Aug 25, 2015

Yes, the usb device appears on my Mac. "screen /dev/tty.usbmodem-" connects to it and the cdc option in the demo app echos everything that I type back to me. Characters typed are echoed with bracket as the code is supposed to do, so it is not the local terminal doing the echoing.

@erikbos
Copy link

erikbos commented Sep 22, 2015

FYI: as work around in my rad1o app code I added:

MSCenable();
MSCdisable();
CDCenable();

to toggle MSC mode on and immediately off, followed by calling CDCenable: that appears to reliable setup the rad1o's for CDC.

hwhw added a commit to hwhw/f1rmware that referenced this issue Nov 24, 2015
The USB phy initialization wasn't called in CDCenable(). To make
that function behave like MSCenable() (and make testapp/cdc.c work),
add that initialization there.

Fixes rad1o#97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants