rad1o / f1rmware

f1rmware for the rad1o
https://rad1o.badge.events.ccc.de
175 stars 117 forks source link

USB serial not working #97

Closed jonnor closed 8 years ago

jonnor commented 9 years ago

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

Expected:

Actual:

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

jonnor commented 9 years ago

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

erikbos commented 9 years ago

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 commented 9 years ago

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

erikbos commented 9 years ago

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 commented 9 years ago

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.