VSOS UART Shell

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

Re: VSOS UART Shell Extensions 1.0

Post by Mark » Fri 2015-06-05 14:53

Hello,

Quick update on my last post - It was indeed my error!

I mistakenly thought that the SYS folder items VSOS_UART_Shell_Extensions_111.zip project were all that was required to operate, so I deleted the existing SYS folder on the development board and replaced with this project SYS folder. I replaced the original development board SYS folder, THEN copied this project's SYS folder items into the existing SYS folder, now all works as expected. Beginner mistake.

Mark

User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

Re: VSOS UART Shell Extensions 1.0

Post by Mark » Fri 2015-06-12 21:56

Hello,

I have had some time to play with the UART Shell Extensions project and have a few comments that may prove helpful. My application for this device may be unique in that it will be under remote control, and I require very little feedback.

1. It would be nice is the (UART) message outputs could be in a more friendly form such that any terminal program (like MTTTY or Terminal) could handle.

2. The machine-controlled silent mode (echo -e) is nice, but still too verbose when playing files. It would be nice to have a "stealth" mode that outputs nothing when play files.

3. It would be nice to be able to persist the echo state on reboot.

4. It would be nice to persist the SD Card as the default directory on reboot.

5. It would be nice to have an option in the directory (dir) command that outputs only the filenames of audio files.

Thanks, Mark

User avatar
Panu
VLSI Staff
Posts: 2406
Joined: Tue 2010-06-22 13:43

Re: VSOS UART Shell Extensions 1.0

Post by Panu » Sat 2015-06-13 8:30

Hi!

Great feedback. Most of what you suggest could be done by adding commands to CONFIG.TXT if we would do one simple modification to the framework. And that is move the current directory buffer away from shell.ap3 to a different entity that would be loaded before shell.ap3. So we could set up the current directory and appFlags in CONFIG.TXT first, then we could put some commands like "cd d:" etc into the config.txt so that they would autorun.

As for the UART feedback, that's rather easily modified.. you could modify ID3PRINT.DL3 to not output what you don't need. You could suppress output by pointing vo_stdout to nullFile temporarily, stuff like that. Also vo_stderr could point to nullFile to suppress error messages.
1. It would be nice is the (UART) message outputs could be in a more friendly form such that any terminal program (like MTTTY or Terminal) could handle.
What's the problem with those terminals? Can you post a screenshot? Any terminal program should be ok. Could you elaborate what you mean? Do you mean something like adding LF to each CR? That could be done easily in UARTIN.DL3. Or something else?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
Panu
VLSI Staff
Posts: 2406
Joined: Tue 2010-06-22 13:43

Re: VSOS UART Shell Extensions 1.0

Post by Panu » Mon 2015-06-15 19:57

Hi again!
2. The machine-controlled silent mode (echo -e) is nice, but still too verbose when playing files. It would be nice to have a "stealth" mode that outputs nothing when play files.
Hmm, perhaps. But note that you cannot prevent all surprise messages such as error messages, so your microcontroller code should not choke when it sees something unexpected.

You should write your microcontroller code so that it keeps checking if there are some characters coming from the UART and ignores everything that it does not understand. For example, when the microcontroller sees a tilde (' ~ '), then it knows that it's receiving a uiMesssage, for example the name of the song: "~0503'The Memory of Trees<LF>". After the tilde, it knows that 4 hex characters follow (which specify the uiMessage type), an optional index value, a format character ( ' for strings, = for integers) and then the value of the uiMessage, followed by a line feed. So the microcontroller perhaps can ignore anything that it receives except these uiMessages. Such a parser is generally very easy to write in a microcontroller.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

Re: VSOS UART Shell Extensions 1.0

Post by Mark » Wed 2015-06-17 16:48

Panu,

Thank you for the replies. I do believe that it has to do with the CR+LF (when using MTTTY), I will look into this some more. MTTTY is a limited terminal program, and I have had some issues with it in the past.

PUTTY Output:
Putty.png
Putty.png (36.89 KiB) Viewed 2109 times
MTTTY Output:
Mttty.png
Mttty.png (48.09 KiB) Viewed 2109 times
Notice that when using the Terminal program the output is as expected.

Terminal Output:
Terminal.png
Terminal.png (66.78 KiB) Viewed 2109 times
Mark

User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

Re: VSOS UART Shell Extensions 1.0

Post by Mark » Wed 2015-06-17 16:54

Panu,

Regarding the verbosity of the output, I am in agreement with you that the micro-controller can easily be made to parse the existing messages with relative ease, and is most likely the best way to handle. Thanks for your guidance on this.

Also - do you have a guess at when you will have the recording side implemented in the UART Shell Extensions?

Mark

User avatar
Henrik
VLSI Staff
Posts: 1035
Joined: Tue 2010-06-22 14:10

Re: VSOS UART Shell Extensions 1.20

Post by Henrik » Fri 2015-07-17 12:29

Here is an update to the VSOS UART Shell Extensions package.

Changes are:
- New MP3 UART recorder Rec included, with controllable sample rate, channel configuration (mono, stereo), and bitrate
- Newest audio drivers included in the root directory (they will soon appear in a separate thread)
- Slight internal changes to PlayDir

So, all in all, now we have a full package that can both record and play back audio files!

I hope you find this package useful!

Kind regards,
- Henrik
Attachments
VSOS_Shell.pdf
Documentation
(228 KiB) Downloaded 847 times
VSOS_UART_Shell_Extensions_120.zip
VSOS UART Shell Extensions v1.20
(580.66 KiB) Downloaded 152 times
Good signatures never die. They just fade away.

User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

Re: VSOS UART Shell Extensions 1.0

Post by Mark » Fri 2015-08-21 1:07

Thank you for this update! I will be trying it out shortly.

I do have a few questions regarding the serial pins (CN9) on the development board:

1. Can these pins be connected directly to another (i.e. PC) serial port?

2. Are these pins using standard serial voltages?

3. If the above questions are 'no', could you provide some recommendations for connecting these pins directly to another controller serial port.

Thank You,
Mark

User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

Re: VSOS UART Shell Extensions 1.0

Post by Mark » Fri 2015-08-21 1:15

Hello,

I have been working with the first release of the UART shell and have a few inputs/requests for the next release of this - hope you don't mind.

1. It would ne nice to have a separate (volume) command that allows the volume to be set independent of when a wav file is playing. Maybe something like "vol %", 0=minimum and 100=maximum. This would allow the volume to not be too great when the very first wav file is played.

2. I noticed that when a wav file is playing (via the playdir command), the fast forward commands do not work they just rewind to the beginning, and the rewind commands always rewind back to the very beginning.

Thank You,
Mark

User avatar
Panu
VLSI Staff
Posts: 2406
Joined: Tue 2010-06-22 13:43

Re: VSOS UART Shell Extensions 1.0

Post by Panu » Fri 2015-08-21 6:44

Hi Mark!

Seems you already got the UART working. It's using 3 volt signal levels. You can use the VSIDE USB UART cable to communicate, or you can use a MAX3232 level shifter for interfacing with 12-volt RS-232.
1. It would ne nice to have a separate (volume) command that allows the volume to be set independent of when a wav file is playing.
That's true, we're working on it.
2. I noticed that when a wav file is playing (via the playdir command), the fast forward commands do not work they just rewind to the beginning, and the rewind commands always rewind back to the very beginning.
Hmm.. different codecs support different operations, I think the VSDSP Codec object exports those functions which the format supports "natively"... I'm not sure which formats support which operations exactly. What do you need?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply

Who is online

Users browsing this forum: No registered users