Moode Forum
Android Display for RPI over USB - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: Android Display for RPI over USB (/showthread.php?tid=2946)



Android Display for RPI over USB - the47trooper47 - 09-06-2020

My idea is to setup an unused phone/tablet with USB tethering enabled to control the Moode player, instead of connecting via eth or wifi/AP.

I am fairly new to the Moode player & how it operates behind the scenes, but I do have some experience with raspbian. I started following instructions I came across on the web & came to a stop! I'm in need of some help in deviating away from the instructions I found at https://joshuawoehlke.com/android-raspberry-pi-display-over-usb/ (similar instructions at https://rwhitmire.com/2014/03/25/android-tablet-raspberry-pi.htmlhttps://elinux.org/How_to_use_an_Android_tablet_as_a_Raspberry_Pi_console_terminal_and_internet_router#Configure_the_Raspberry_Pi) as I'm discovering some subtle differences between the stock raspbian & moode.

I'm ok until need to open & edit /etc/network/interfaces. It seems the moode web UI writes this file & /etc/dhcpcd.conf each time moode boots, so writing to either file will be pointless.

Is there somewhere I can permanently enter this code (instead of /etc/network/interfaces)

Code:
iface usb0 inet static
address 192.168.42.42
netmask 255.255.255.0
network 192.168.42.0
gateway 192.168.42.129
broadcast 192.168.42.255

for this to work so it will not be written over each time the player restarts?
TIA :-)


RE: Android Display for RPI over USB - TheOldPresbyope - 09-06-2020

(09-06-2020, 04:16 PM)the47trooper47 Wrote: My idea is to setup an unused phone/tablet with USB tethering enabled to control the Moode player, instead of connecting via eth or wifi/AP.

I am fairly new to the Moode player & how it operates behind the scenes, but I do have some experience with raspbian. I started following instructions I came across on the web & came to a stop! I'm in need of some help in deviating away from the instructions I found at https://joshuawoehlke.com/android-raspberry-pi-display-over-usb/ (similar instructions at https://rwhitmire.com/2014/03/25/android-tablet-raspberry-pi.htmlhttps://elinux.org/How_to_use_an_Android_tablet_as_a_Raspberry_Pi_console_terminal_and_internet_router#Configure_the_Raspberry_Pi) as I'm discovering some subtle differences between the stock raspbian & moode.

I'm ok until need to open & edit /etc/network/interfaces. It seems the moode web UI writes this file & /etc/dhcpcd.conf each time moode boots, so writing to either file will be pointless.

Is there somewhere I can permanently enter this code (instead of /etc/network/interfaces)

Code:
iface usb0 inet static
address 192.168.42.42
netmask 255.255.255.0
network 192.168.42.0
gateway 192.168.42.129
broadcast 192.168.42.255

for this to work so it will not be written over each time the player restarts?
TIA :-)


Once upon a time it occurred to me to try using one of my old Android tablets for this but I thought about the mounting and cabling of it* and decided to get a Raspberry Pi display and put the tablet to use elsewhere instead.

If you want to persist, then you'll want to look at and modify the system module /var/www/inc/playerlib.php somewhere around line 2288 where the code creates these files:

Code:
// configure network interfaces
function cfgNetIfaces() {
       // default interfaces file
       $fp = fopen('/etc/network/interfaces', 'w');
...


Regards,
Kent

*[added in post edit] - and the futzing with the tablet I'd have to do each time I booted it


RE: Android Display for RPI over USB - vinnn - 09-06-2020

(09-06-2020, 04:16 PM)the47trooper47 Wrote: My idea is to setup an unused phone/tablet with USB tethering enabled to control the Moode player, instead of connecting via eth or wifi/AP.

What benefit do you envisage from doing this?


RE: Android Display for RPI over USB - the47trooper47 - 09-07-2020

(09-06-2020, 04:51 PM)vinnn Wrote:
(09-06-2020, 04:16 PM)the47trooper47 Wrote: My idea is to setup an unused phone/tablet with USB tethering enabled to control the Moode player, instead of connecting via eth or wifi/AP.

What benefit do you envisage from doing this?

Hi Vinn, many benefits including the use of a dedicated screen like a phone or tablet saves the extra outlay of a hdmi screen, the player becomes portable & non-dependant on any other device or infrastructure to connect to & control it.


RE: Android Display for RPI over USB - DRONE7 - 09-07-2020

Some years ago (Pi1-B !) I had something similar using a Samsung S3 and ncmpcpp (an n-curses client used as a control interface for MoOde)

I seriously doubt anything  would be applicable for the current version of MoOde but if you're interested I can look for the step by step write-up I did back then....

It worked, but was not very user friendly and I eventually upgraded my aging network equipment and used wifi access to get the full MoOde interface and control.

Here it is running...


RE: Android Display for RPI over USB - the47trooper47 - 09-07-2020

(09-06-2020, 04:32 PM)TheOldPresbyope Wrote:
(09-06-2020, 04:16 PM)the47trooper47 Wrote: My idea is to setup an unused phone/tablet with USB tethering enabled to control the Moode player, instead of connecting via eth or wifi/AP.

I am fairly new to the Moode player & how it operates behind the scenes, but I do have some experience with raspbian. I started following instructions I came across on the web & came to a stop! I'm in need of some help in deviating away from the instructions I found at https://joshuawoehlke.com/android-raspberry-pi-display-over-usb/ (similar instructions at https://rwhitmire.com/2014/03/25/android-tablet-raspberry-pi.htmlhttps://elinux.org/How_to_use_an_Android_tablet_as_a_Raspberry_Pi_console_terminal_and_internet_router#Configure_the_Raspberry_Pi) as I'm discovering some subtle differences between the stock raspbian & moode.

I'm ok until need to open & edit /etc/network/interfaces. It seems the moode web UI writes this file & /etc/dhcpcd.conf each time moode boots, so writing to either file will be pointless.

Is there somewhere I can permanently enter this code (instead of /etc/network/interfaces)

Code:
iface usb0 inet static
address 192.168.42.42
netmask 255.255.255.0
network 192.168.42.0
gateway 192.168.42.129
broadcast 192.168.42.255

for this to work so it will not be written over each time the player restarts?
TIA :-)


Once upon a time it occurred to me to try using one of my old Android tablets for this but I thought about the mounting and cabling of it* and decided to get a Raspberry Pi display and put the tablet to use elsewhere instead.

If you want to persist, then you'll want to look at and modify the system module /var/www/inc/playerlib.php somewhere around line 2288 where the code creates these files:

Code:
// configure network interfaces
function cfgNetIfaces() {
       // default interfaces file
       $fp = fopen('/etc/network/interfaces', 'w');
...


Regards,
Kent

*[added in post edit] - and the futzing with the tablet I'd have to do each time I booted it

Cheers Kent... thanks for the tip!! Smile


RE: Android Display for RPI over USB - Tim Curtis - 09-07-2020

(09-07-2020, 02:15 AM)the47trooper47 Wrote:
(09-06-2020, 04:51 PM)vinnn Wrote:
(09-06-2020, 04:16 PM)the47trooper47 Wrote: My idea is to setup an unused phone/tablet with USB tethering enabled to control the Moode player, instead of connecting via eth or wifi/AP.

What benefit do you envisage from doing this?

Hi Vinn, many benefits including the use of a dedicated screen like a phone or tablet saves the extra outlay of a hdmi screen, the player becomes portable & non-dependant on any other device or infrastructure to connect to & control it.

It's interesting but which Phones/Tablets support IP over USB?