#359074 - 28/06/2013 23:54
Re: Empeg player software, a new generation
[Re: jonshouse]
|
carpal tunnel
Registered: 08/07/1999
Posts: 5546
Loc: Ajijic, Mexico
|
PS How do you post code in forum :-) {code} ...text... {/code} except you use square brackets instead of curly brackets. I couldn't use the square brackets in this example because the bbs interprets them as..., well, code delineators. Anyway, I think that's how you do it. tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"
|
Top
|
|
|
|
#359075 - 29/06/2013 00:20
Re: Empeg player software, a new generation
[Re: tanstaafl.]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
Now that's interesting.. Looking through the code for Hijack, it appears that the ".R" suffix is only supposed to be applied when a button _name_ is used, not a hexcode. Why it worked for me when I did with a hexcode, well.. ?? So.. red-faced and all, here's how to do it: echo "BUTTON=0x0020DF11" > /proc/empeg_notify ## delay a short while, or not. Then.. echo "BUTTON=0x8020DF11" > /proc/empeg_notify
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
static void sendButton (int fd, const char *st)
{
int ret = write(fd, st, strlen(st));
if (ret != strlen(st)) {
fprintf(stderr, "write() returned %d instead of %d\n", ret, strlen(st));
exit(-1);
}
}
int main(int argc, char *argv[])
{
char st[64];
unsigned int code;
int fd;
if (argc != 2) {
fprintf(stderr, "Error: expected button name/value as only parameter\n");
exit(-1);
}
fd = open("/proc/empeg_notify",O_RDWR);
if (fd < 0) {
perror("Failed to open /proc/empeg_notify for RDWR\n");
exit(1);
}
code = strtol(argv[1], NULL, 0);
sprintf(st, "BUTTONRAW=0x%08x", code);
sendButton(fd, st);
usleep(250000);
sprintf(st, "BUTTONRAW=0x%08x", code | 0x80000000);
sendButton(fd, st);
return 0;
}
|
Top
|
|
|
|
#359076 - 29/06/2013 00:26
Re: Empeg player software, a new generation
[Re: tanstaafl.]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
PS How do you post code in forum :-) {code} ...text... {/code} except you use square brackets instead of curly brackets. The default font for the code tag is too large though, so I always do it like this: [size:8pt ][code ] program goes here [/code ][/size ]
|
Top
|
|
|
|
#359077 - 29/06/2013 10:02
Re: Empeg player software, a new generation
[Re: mlord]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
code | 0x80000000 Oh - that is what that is for !! Ooops.... When I got the 0x80 codes from the empeg I had no idea what they meant so I simply threw them away ! Seems the empeg IR generates some kind of key held code that I guess I fail to generate in my IR PIC microntroller code and the data stream I generate. Maybe I should investigate that one day ... ho hum ! Centro code .... hangs head in shame ....
// Make sure we only process ONE of the two messages on genuine empeg hardware
#ifdef EMPEG
if (ircode & 0x80000000) // if higher bit is set then discard it, avoid duplicate key
numbytes=0;
#endif
** proper formatted code, thanks :-) ** Had I decoded the IR in exactly the same way as the empeg then the BUTTONRAW=0x sequences would have worked.... oops ! I should not assume that if I dont know what its for then I can just discard it..... I dont know my way around the original software very well - does the software have many features that are triggered by a held key on the remote control ? Thanks for all the help :-) Jon
|
Top
|
|
|
|
#359078 - 29/06/2013 10:32
Re: Empeg player software, a new generation
[Re: jonshouse]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
does the software have many features that are triggered by a held key on the remote control ?
Lots of them, yes. Many buttons perform different functions when held down for more than (about) a second (aka. "long press") than for a quick "short press". And I believe the FF/REW functions require holding a button for the duration. Cheers
|
Top
|
|
|
|
#359079 - 29/06/2013 13:42
Re: Empeg player software, a new generation
[Re: mlord]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Guess I had better fix that then :-) The front panel buttons have push and release codes so those work as expected its just the IR that is not complete it seems. It drives the software ok as a remote proxy, but it would be nice to be feature complete so I will have a play with the IR code. I need to decode and act on the repeat code. http://wiki.altium.com/display/ADOH/NEC+Infrared+Transmission+ProtocolThanks, Jon
Edited by jonshouse (29/06/2013 13:53)
|
Top
|
|
|
|
#359080 - 29/06/2013 20:38
Re: Empeg player software, a new generation
[Re: jonshouse]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
Or just not send the release until you stop seeing repeats, or something?
|
Top
|
|
|
|
#359081 - 29/06/2013 21:33
Re: Empeg player software, a new generation
[Re: mlord]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Or just not send the release until you stop seeing repeats, or something?
Yes, snag is the repeats are not framed in the same was as the main IR word, at the moment I can't see the repeat messages at all. I need to re-write the interrupt service routine on the PIC microcontroller to see the repeat codes before I can modify the PIC state machine to send something useful. I will try and tackle that one during the week. Jon
Edited by jonshouse (29/06/2013 21:35)
|
Top
|
|
|
|
#359183 - 17/07/2013 01:23
Re: Empeg player software, a new generation
[Re: jonshouse]
|
journeyman
Registered: 11/07/2013
Posts: 65
|
Jon,
OMFG! OMFG!
I was away for a while having a sig change, but just stumbled across this.
I'd been in the throes of "What to do for music on the new, new, old boat?" when I spotted this. I was starting to get a bit melancholy when it came to things Empeg, but this is hugely interesting. I'll try to be more coherent later, but for now I think I'll just be gobsmacked and a little dizzy.
|
Top
|
|
|
|
#359187 - 17/07/2013 17:49
Re: Empeg player software, a new generation
[Re: snowcrash]
|
member
Registered: 02/04/2002
Posts: 148
|
I had the same reaction. I just returned from a 2 week vacation, driving 27 hours on both ends of that. With no empeg. Yeah, we my son's iPhone (with his music), but the stock stereo wouldn't bluetooth with it properly, and the USB connection was buggy on the iPhone end. So basically I was stuck with 3 CDs and radio all the way from upstate NY to southern FL (1600 miles). One thing I realized, virtually ALL radio stations play the same songs (by genre). Heard the same country songs on country stations, same pop on pop, same classic rock on classic rock, etc. SO infuriating.
So, yep, Im DEFINITELY in line for one of these displays to use as an extender. As soon as Jon is ready. I think he's getting the IR stuff sorted out (I dont really even care about that, but I can wait).
I jammed my Empeg into an old "case logic" DIN cary bag last night, with a RCA to 1/8" cable and a power cable, and its sitting on my center console right now like the world's biggest iPod. I think I will keep it that way until I can get the extender and then I will trunk mount it. So good to have music back... and easy access, shuffle, cross fade, paramatric eq, etc. Forgot how much I missed this stuff.
_________________________
Empeg Mk2a 60G
|
Top
|
|
|
|
#359195 - 19/07/2013 16:30
Re: Empeg player software, a new generation
[Re: jbrinkerhoff]
|
carpal tunnel
Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
|
One thing I realized, virtually ALL radio stations play the same songs (by genre). Heard the same country songs on country stations, same pop on pop, same classic rock on classic rock, etc. SO infuriating. SO ClearChannel.
|
Top
|
|
|
|
#359227 - 26/07/2013 11:59
Re: Empeg player software, a new generation
[Re: pca]
|
member
Registered: 03/05/2003
Posts: 131
|
My Empeg has unfortunately been out of commission for awhile. It still works perfectly, but like many it seems, the VFD is nearly unreadable. I had to pull it out of the car. What I replaced it with, I really don't like. I have yet to find anything as well done as the Empeg.
While I am really liking that it is being updated to run on the Raspberry Pi, I'm a little saddened that in the upgrade and changes that the album art and stuff aren't going to be displayed. That was my one complaint about the Empeg. I know that the Vibez had that feature and was hoping someone could add that in to a new version
Since I really want album art, I am working on a single DIN radio using a Raspberry Pi that uses a 4.3" screen (non touch screen) and knobs and buttons to navigate through a menu structure. The main program I am going to use is Squeezeplay. I really like the Squeezebox software and hardware and the LMS music server. I plan to put all my music on a USB stick that plugs into the face. It is going to function almost exactly like the Squeezebox radio. I am using a Teensy 3 to adapt all the buttons and encoders to key presses. I have a good portion of the design done and should be testing it all out soon.
I cannot remember how to post an image here or I would show preliminary design... I really was hoping that any new version of an Empeg would bring it a bit more into the modern world. But I am sure that is a much bigger challenge to do than I realize.
|
Top
|
|
|
|
#359230 - 26/07/2013 15:22
Re: Empeg player software, a new generation
[Re: Jemmi]
|
carpal tunnel
Registered: 08/07/1999
Posts: 5546
Loc: Ajijic, Mexico
|
I cannot remember how to post an image here Just beneath the text box in which you are typing your reply, click on File Manager. Then browse to the file you want, select it, and click Add File, then Done Adding Files. Optionally you can add a description of the file. A lesser-known trick is that if the file is sized to something less than about 190KB, the file will display directly with your post rather than creating a link to display the file. tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"
|
Top
|
|
|
|
#359259 - 29/07/2013 14:38
Re: Empeg player software, a new generation
[Re: Jemmi]
|
member
Registered: 03/05/2003
Posts: 131
|
Here you go... this is the guts. Not done yet packaging it all
Attachments
Raspberry Pi Radio.JPG (4975 downloads)
|
Top
|
|
|
|
#359282 - 31/07/2013 19:47
Re: Empeg player software, a new generation
[Re: Jemmi]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
I really was hoping that any new version of an Empeg would bring it a bit more into the modern world I like the very things that make it non-modern ! The wide viewing angle monochrome display, the simple button interface. If you want a colour display and an mp3 player I would have thought many things would do the job. XBMC on small PC or Raspberry Pi would probably do what you are after ? In many ways a high level language coded mp3 player with simpler visuals and a touch screen interface would be far less work than cloning the original empeg experience. I estimate the original empeg software is between 2 and 4 man years of effort - if I start now in a year or two my code will be almost as functional as the original :-) Jon
Edited by jonshouse (31/07/2013 19:54)
|
Top
|
|
|
|
#359283 - 31/07/2013 19:51
Re: Empeg player software, a new generation
[Re: jonshouse]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Just a quick update. I have finally found some time and fixed the IR so that holding down buttons on the IR remote works. It needs some more testing but looks ok. I have built and tested 10 boards and will putting some on ebay when I have sorted the documentation out.
Jon
|
Top
|
|
|
|
#359319 - 07/08/2013 11:27
Re: Empeg player software, a new generation
[Re: jonshouse]
|
member
Registered: 03/05/2003
Posts: 131
|
I do not like the way XBMC handles music. The Squeezebox stuff is the closest I have come to the ease of use of the empeg software. I just finished building the Squeezeplay software for the pi that I intend to use as the front end. I may have a way to launch FM radio from that as well. I looked into it years ago but have to refresh my memory on how to accomplish it.
I pretty much have the faceplate and buttons done. I am using a lot of off the shelf parts and just making them into the cohesive unit. All of the controls will send keystrokes to the pi.
I am having trouble getting the pi and USB hub packaged nicely. I need a lot of right angle USB cables
Attachments
Raspberry Pi Radio.JPG (14688 downloads)
|
Top
|
|
|
|
#359337 - 10/08/2013 21:05
Re: Empeg player software, a new generation
[Re: Jemmi]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Attachments Raspberry Pi Radio.JPG Interesting, can we see some more :-) How are you making it, what materials ? Is the enclosure 3d printed ? Any photos of the real hardware ? Thanks, Jon
Edited by jonshouse (10/08/2013 21:05)
|
Top
|
|
|
|
#359376 - 16/08/2013 10:44
Re: Empeg player software, a new generation
[Re: jonshouse]
|
member
Registered: 02/04/2002
Posts: 148
|
Hey Jon,
Please let me (us) know when you put these on ebay. I do want one for sure. I have been using my empeg in my car the past month again (in a bag on the dash!). I never realized how much I missed it. Still, by far, the best car MUSIC player ever created.
I can be emailed at jbrinker at syr dot edu when you have them ready.
Edited by jbrinkerhoff (16/08/2013 10:44)
_________________________
Empeg Mk2a 60G
|
Top
|
|
|
|
#359418 - 19/08/2013 18:10
Re: Empeg player software, a new generation
[Re: jonshouse]
|
member
Registered: 03/05/2003
Posts: 131
|
I 3D printed the faceplate. The housing itself will just be bent sheet metal or aluminum. The things I don't have figured out are the exact mounting of everything within the housing itself. Using a lot of right angle cables currently to make it even remotely packagable.
Here is a pic of the screen mounted in the faceplate before painting. Also a viewable eDrawings file
I just got a working version of the software running it all last week. It is going to be a necessity really to leave the Pi on all the time. The boot time takes less time than bringing up the logitech media server and being able to play locally stored files.
I haven't had time the past week to finish assembling the hardware. The button mounting is causing some issues and would probably be easier if I just made a PCB.
Attachments
photo.JPG (817 downloads)
|
Top
|
|
|
|
#359497 - 27/08/2013 02:13
Re: Empeg player software, a new generation
[Re: Jemmi]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Here is a pic of the screen mounted in the faceplate before painting. Also a viewable eDrawings file Ok, not bad :-) Should look good painted, gloss black ? It is going to be a necessity really to leave the Pi on all the time.
Yes, I do that in my software. The plan in the longer term is to clock the processor at a much lower rate when "powered off" to save some watts. I yet to investigate how to do this. The button mounting is causing some issues and would probably be easier if I just made a PCB.
What I have done in the past is to mark up a bit of PCB material with insulating tape then drop it into the etcher. The insulating tape stops of the etch quite nicely. If you dont have access to a small mill then this can be a good way of making a one off PCB if the detial is very low (IE just some buttons). Keep ip the good work, please post some updates when its more complete.
|
Top
|
|
|
|
#359498 - 27/08/2013 02:28
Re: Empeg player software, a new generation
[Re: jbrinkerhoff]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Please let me (us) know when you put these on ebay. Ok, will do :-) I am struggling a little at the moment to get it into a state that I can ship it. The prototypes work ok, I have some extra boards built but I was hoping to have 10 to 15 units to ship. The switcher IC I need for the O-LED power has gone out of stock and alternate sources are not available so this is slowing down progress. Good news is the delay on the hardware front gives me some more time to spit and polish the software. I am considering making an alternate box to mount the player in a car, early days on this at the moment as its yet another task I dont have the time for ! My plan for the next week is to get some documentation online and more up to date software released. Part of my problem is I have no easy way to make the SD card image for the Pi. At the moment I install Raspian onto an SD card then copy some files from an NFS server, ok for me but not very useful for anyone else. I need to find a way of installing the system onto a machine with little effort. I have part coded an installer but once again it needs some work to finish it. My time is split a bit at the moment as I am also trying to make the tuner on the MK1 and MK2 empeg units work with my software as well. It turns out the tuner module in the external tuner is a bit of a pain to program, I thought this task would take a couple of days - I suspect its more like a solid weeks work. I have written support for an FM radio tuner that can be added to the Pi fairly cheaply, I need to produce a PCB to make it all nice though. See this thread. http://empegbbs.com/ubbthreads.php/topics/359470#Post359470If anyone reading this has any details of making the MK1 players radio tuner work then please let me know, I can find no information on this. Thanks, Jon
Edited by jonshouse (27/08/2013 02:30)
|
Top
|
|
|
|
#359773 - 19/09/2013 10:51
Re: Empeg player software, a new generation
[Re: jonshouse]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
Just a note to say the Centro software no supports the PCATS radio tuner, only in FM mode at the moment but its a start.
|
Top
|
|
|
|
#359846 - 27/09/2013 16:37
Re: Empeg player software, a new generation
[Re: jonshouse]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
version 0.61 adds Radio support. Now drives the PCATS tuner in all modes. Remote "TUNER" button toggles tuner/player mode. "Mode Select" button changes between FM/MW/SW/LW/Weather band. http://sourceforge.net/projects/centroplayer/files/It needs some testing but I *think* it mostly works. I get the feeling nobody even looks at this code, bit of a shame as the core functionality is done. Just needs a bit of mp3 management added and a code tidy up and will be a proper player..... I need some code to decode the RDS stream written, I am not going to write this as I need to turn my attention back to the Pi hardware/software. If anyone wants to give RDS decode a go then please feel free. Jon
|
Top
|
|
|
|
#359851 - 28/09/2013 22:44
Re: Empeg player software, a new generation
[Re: jonshouse]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
There's a /dev/rds or something, I seem to recall. Just read from it? I know there are some existing apps that do it.
I'm on the road right now, no empeg in hand, so tricky for me to check on that.
Cheers
|
Top
|
|
|
|
#359852 - 28/09/2013 23:08
Re: Empeg player software, a new generation
[Re: mlord]
|
journeyman
Registered: 18/09/2012
Posts: 55
Loc: Somerset UK
|
I have done some experimentation, had a look at it. I did read some pages on the RDS protocol. I have run out of time to work on the code. Version 0.61 Adds support for PCATS tuner in FM/MW/LS/SW and Weather band. I will have to leave RDS decoding until I have some more free time, or maybe someone else will give it a go. All I want to do is decode the station name and some program text. I hacked some crude test code into player_tuner_common.c, but have not done much with it so far.
//�!3orld = C2 04 21 33 6F 72 6C 64 player: tuner_visual_display_rds() - got 8 bytes of RDS data
int rds_fd=-1;
tuner_visual_display_rds(char mode)
{
unsigned char buff[4096];
int numbytes=0;
// At the moment only for FM mode and only on the empeg unit
if (mode!='f')
return;
#ifndef EMPEG
return;
#endif
if (rds_fd<1)
rds_fd = open("/dev/rds0", O_RDONLY); // empeg rds device
if (rds_fd<1)
{
perror("cant open rds");
exit(1);
}
numbytes=read(rds_fd,&buff,sizeof(buff)); // read as large a chunk as driver allows
printf("%s: tuner_visual_display_rds() - got %d bytes of RDS data\n",PROGNAME,numbytes);
//printf("[%s] = ",buff);
dump_as_hex(&buff[0],numbytes);
if ( (buff[0]==0xC2) & (buff[1]==0x04) & (buff[2]==0x21) & (buff[3]==0x33 ) )
printf("[%s] = ",buff);
fflush(stdout);
}
Thanks, Jon
|
Top
|
|
|
|
#360125 - 30/10/2013 15:23
Re: Empeg player software, a new generation
[Re: jonshouse]
|
member
Registered: 02/04/2002
Posts: 148
|
Hi all, Just checking in again - had a really busy summer/early fall, and was hoping Jon has some of these ready to ship (I'll be a tester! Minimal docs is good! Can you tell Im eager?)
The empeg has been riding around on my center console all summer, slopping around in its padded bag. I really want to get it more permanently mounted, and the remote board would help dramatically.
Let me know (email jbrinker at syr dot edu) if you are at that point. Or close. I can wait, but I dont want to miss out!
Thanks for all your hard work!
Jeff
_________________________
Empeg Mk2a 60G
|
Top
|
|
|
|
#361690 - 14/05/2014 18:25
Re: Empeg player software, a new generation
[Re: pca]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14491
Loc: Canada
|
MMm.. what happened to these projects?
I am about to try and install my empeg somewhere in the Impreza, and it will definitely want a low-profile remote display.
Ideally that display will operate over ethernet, so the empeg could remain "removable" from the vehicle. But failing that, I do have a PCATS display extender that can be used as the second choice solution.
|
Top
|
|
|
|
#362156 - 04/07/2014 20:08
Re: Empeg player software, a new generation
[Re: mlord]
|
carpal tunnel
Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
|
Indeed, whatever happened to it? I was reminded today about it when I read about the new Hummingboard that got released last week. It's like a Raspberry Pi on steroids. It's not only faster (ARMv7 compared to ARMv6), but also includes other fun stuff like a gigabit ethernet connection, powered USB's AND digital audio out (spdif). Watch the video here. This thing seems even better suited for this project, especially since it's got a digital out.
_________________________
Riocar 80gig S/N : 010101580 red Riocar 80gig (010102106) - backup
|
Top
|
|
|
|
#362186 - 11/07/2014 14:00
Re: Empeg player software, a new generation
[Re: BartDG]
|
enthusiast
Registered: 16/02/2002
Posts: 290
Loc: Denver, CO
|
WOW! Those things are perfect for so many applications! I am going to get one of each
_________________________
-Jason
|
Top
|
|
|
|
|
|