Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Android Display for RPI over USB
#1
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-raspbe...-over-usb/ (similar instructions at https://rwhitmire.com/2014/03/25/android...ry-pi.htmlhttps://elinux.org/How_to_use_an_Android...spberry_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 :-)
Reply
#2
(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-raspbe...-over-usb/ (similar instructions at https://rwhitmire.com/2014/03/25/android...ry-pi.htmlhttps://elinux.org/How_to_use_an_Android...spberry_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
Reply
#3
(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?
Reply
#4
(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.
Reply
#5
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...


Attached Files Thumbnail(s)
   
----------
bob
Reply
#6
(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-raspbe...-over-usb/ (similar instructions at https://rwhitmire.com/2014/03/25/android...ry-pi.htmlhttps://elinux.org/How_to_use_an_Android...spberry_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
Reply
#7
(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?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: