Go Back   Home > Forums > > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Twisted Pear Superior quality electronic kits

Reply
 
Thread Tools Search this Thread
Old 23rd January 2019, 10:32 PM   #101
twluke is offline twluke  Japan
diyAudio Member
 
Join Date: Nov 2012
Location: Tokyo
Control of BBB-based audio appliances
Quote:
Originally Posted by francolargo View Post
Hi twluke!

Yes, you are certainly on the right track!

Suggestions:

1. delete the new 'global ...' lines. Those specify variables and you are not using any new variables.
2. I suggest that the first option in the 'handle_command' use 'if' (as you have it) but that the others use 'elif'. I see that my GitHub code wasn't that way but now I changed it.
3. I suggest that the logic statements be changed from 'line.startswith' to 'line =='. Only the 'set volume' option needs 'startswith'.
4. By all means transfer the code to your GitHub page!
Hi Frank, thank you for these suggestions and kind words. I'm very grateful to you.
Quote:
As you gain comfort with the modifications, please begin thinking about what will be your favorite way to control the DAC.
Tanks for this comment. Well, I'm now beginning to consider this option. Will do more home work.

Regards,
  Reply With Quote
Old 16th February 2019, 11:38 PM   #102
pixelpusher is offline pixelpusher  United States
diyAudio Member
 
Join Date: Oct 2004
Location: Minneapolis
Hi Frank,
I've read the entire thread and would like to try this. My BBB/BuffaloPro system is simple compared to yours. I would like to have control of volume and the various filter parameters. I've just a couple very basic questions to start with.
I have downloaded your Python script but how to you copy it to the BBB? I imagine that the Twisted Pear firmware chip needs to be removed, right?
Thanks for sharing your knowledge.
  Reply With Quote
Old 17th February 2019, 03:57 AM   #103
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Greetings @pixelpusher!

I'm happy to be of assistance. The code that Twluke is using is a good start for a simple control system. However, I purposely took out some things that make it compatible with the program 'NetIO'. If you think you would like an iOS or Android controller for your system, then we can restore that functionality.

Here is the big picture. Almost everyone has an older phone or tablet that could be put to good use as a remote control. That's one reason I like the NetIO program - you can make different controller screens to suit the device screen, and you can have multiple controllers active at the same time. Plus, the web interface to design the control screens is slick, and I've ironed out many of the issues that can arise between the server program on the BBB and the remote control device.

I put my current 9028 control code up on GitHub for anyone to look at or import.

Here: https://github.com/francolargo/BBB-audio/blob/master/netio_server.py.9028.py

Unlike the older control programs, the newest version has three separate and parallel processes: a) the server waiting for any remote command, b) a loop to sense and respond to GPIO inputs to the BBB (from my control box front panel), and c) a monitor function that helps keep the ES9028s in the proper configuration to avoid system damage if control registers are unintentionally altered (which never happened with the older 9018s). It also has the beginnings of a log system to monitor its own activity.

Finally, I am transitioning my own media serving duties to a Raspberry Pi from a Macintosh. This gives me the chance to make the system controls even better, since the RPi can also respond to the NetIO controller. It will become the 24/7 system master that manages ON/Off/Standby via logic-level power switches. AND - the cool part - the RPi and BBB can easily communicate wherever 'handshaking' will be needed. The goal is to never touch the equipment, and hopefully avoid any future ESD damage such as I experienced when it got so dry during the recent polar vortex breakup.

So, decide how you want to interact with your system and we'll get you set up...

Best,

Frank

Last edited by francolargo; 17th February 2019 at 04:05 AM.
  Reply With Quote
Old 17th February 2019, 04:57 AM   #104
pixelpusher is offline pixelpusher  United States
diyAudio Member
 
Join Date: Oct 2004
Location: Minneapolis
Yes, My goal is to control the system with an ipad. I have used iRule for years and recently been enamoured with Demopad. I also purchased NetIO to check that out. These are all apps that can build a graphical interface on an ipad and issue TCP commands accross the network.

I was under the impression that your Python script, DACserver.py, would setup a server on the BBB to accept TCP commands and control the BuffaloPro.

EDIT; the link you posted did not work

Last edited by pixelpusher; 17th February 2019 at 05:01 AM. Reason: additional comment
  Reply With Quote
Old 17th February 2019, 05:08 AM   #105
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Yes, your understanding is correct. The software simply listens to the ports you select and evaluates any incoming TCP text for significance using 'IF such-and-so' recognition logic. Twluke is simply using the command line with 'netcat', so I simplified it a bit for him. NetIO uses a return acknowledgement, which was a complication he didn't need.

I transfer files to and from the BBB using a simple ftp program on the desktop/laptop. ...slick and fast...
Yes, you will have to remove the firmware chip from the DAC, meaning that you will need another method to initialize it and enable I2C. I think Twluke's suggestion here is elegant:
Introducing the Buffalo III-SE-Pro 9028/9038
I'm initializing with a single-purpose arduino for now...

finally, I edited that link - it should work now after a page refresh

F.

Last edited by francolargo; 17th February 2019 at 05:14 AM.
  Reply With Quote
Old 17th February 2019, 02:57 PM   #106
pixelpusher is offline pixelpusher  United States
diyAudio Member
 
Join Date: Oct 2004
Location: Minneapolis
The link still does not work for me but I found your files by searching Github.

I have noticed the comments about reset but do not really understand the why and how of it. I guess this is more complicated than I thought and will require more study on my part.

Thanks for your files.
  Reply With Quote
Old 17th February 2019, 04:29 PM   #107
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Here is where I had help figuring out the reset question:
Introducing the Buffalo III-SE-Pro 9028/9038
  Reply With Quote
Old 18th February 2019, 03:47 AM   #108
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Greetings Ichiban

Quote:
I'd like to input USB audio from a PC into the BBB.

Currently input ethernet from PC into the BBB.

Would need to switch between ethernet & USB.

What do I need to do to accomplish this?
This switching could be done within the BBB. You would need a command to 'pipe' the audio input to the audio output, and that command would specify the source as the USB and output.

Quote:
Setting code in BOTIC to accept USB audio?

Switching via BOTIC control rather than

a hardware switch.
No, the Botic kernel itself would not participate in this switching. You would accomplish this either from the command line of a BBB login, or better, by writing simple scripts (small programs) and executing them using some other control mechanism. This thread is about those kinds of commands, scripts, and control mechanisms (and how to use them).

Your first step would be to attach your USB source to the BBB and see if it is recognized. Simply make the connection and then from the BBB command line execute 'arecord -L'. If the USB source is listed then the rest is possible. If the USB source is not listed then you may need to work with your USB source computer to be sure it can send a signal via the USB port.

Good luck,

Frank
  Reply With Quote
Old 18th February 2019, 06:02 AM   #109
ichiban is offline ichiban  United States
It's always something!
diyAudio Member
 
ichiban's Avatar
 
Join Date: Oct 2004
Location: Tonawanda, N.Y.
Control of BBB-based audio appliances
Quote:
Originally Posted by francolargo View Post
Greetings Ichiban
Your first step would be to attach your USB source to the BBB and see if it is recognized. Simply make the connection and then from the BBB command line execute 'arecord -L'. If the USB source is listed then the rest is possible.
Good luck,
Frank

Thank you. I'll look into that.
__________________
Currently listening to F6/w curve matched SemiSouth outputs
  Reply With Quote

Reply


Control of BBB-based audio appliancesHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a volume control to a TPA3122-based audio kit i336 Class D 2 9th June 2015 07:50 AM
How do I use my appliances on a Furman PL8CE? Akins Equipment & Tools 21 20th May 2015 06:24 PM
Powering non-speaker appliances with an amp cspirou Everything Else 4 4th November 2014 11:34 AM
Household Appliances repair forum Tarzan Everything Else 7 22nd August 2012 08:54 PM
Transformer-based volume control wboyd Analogue Source 4 18th August 2004 05:57 PM


New To Site? Need Help?

All times are GMT. The time now is 11:49 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki