Controlling a Raspberry Pi with a laptop, via ethernet cable?

Discussion in 'PCs & Music Servers' started by dodog, Sep 7, 2017.

  1. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    I have a Raspberry Pi 2 that I configured with Volumio, only to find out my wifi is a bit spotty in my basement. Until I can figure out a way to string an ethernet cable through the ductworks, that dream is on hold.

    I currently have a receiver and a CD player that I use with headphones at work and thought it might be fun to replace those with my Pi and a small headphone amp. I can't create a local hotspot so wifi control isn't an option. I also can't connect the pi to my work network.

    Is there a way to use a laptop, via an ethernet cable, to run the Pi (maybe via PiCore Player)? I've seen instructions to use VPN to mirror the Pi display to the laptop but is that really necessary? Could I just fire up Squeezelite or some other interface and have it talk to the Pi? The laptop is dual-boot, though the Linux is probably out of date, but possibly worth updating. The Pi would have a USB drive for the music and I imagine I could use something like PuTTY to transfer new files as I add them to my collection.

    Is this possible?
     
  2. judsonw

    judsonw Active Member

    Messages:
    443
    Location:
    Bellingham, WA, USA
    It is possible. Here is a link that I think has the answers you want in it (at least it has a section of about connecting when there is no network): https://pihw.wordpress.com/guides/direct-network-connection/

    It seems the process has become simpler. I have not tried PiCore Player, so I am not completely certain on how it works, but I know that both RuneAudio and Max2Play have a relatively simple web interface for controlling the raspberry pi (web interface does not actually require web access, only that the pi is on your network). I would be surprised if PiCore Player does not have the same.
     
  3. E-Stat

    E-Stat Super Member

    Messages:
    4,345
    Let's see if I understand the challenge. So the PI is the server in this case and you want to know if the laptop can be a player accessing the PI based server?

    Well, you can run Squeezelite from any PC working as a player so long as it has network connectivity to the server. My situation is largely the reverse as I run LMS on the server feeding multiple endpoints including an RPi 3 running PiCorePlayer. When in my office, however, I want to use the server also as player and run Squeezelite on it. My smartphone based app is able to control it just like the other connected player situated elsewhere in the house.
     
  4. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    Thank you for that link. I'm not sure that's what I'm looking for. I've see those instructions several times on multiple sites and, in the end, I think you're just running VPN, which is not really what I'm after. I want the Pi to be the player, controlled from the laptop, same as you would if it was a smartphone or tablet, with both the Pi and the laptop on the same network. In this case, rather than going through a router and wifi, I want to directly connect via an ethernet cable.

    If that's what your link is pointing out and I'm misunderstanding, my apologies.
     
  5. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    The Pi is connected to a HiFiBerry DAC in one case, it will have a usb drive attached to it. The server and the player. I want the laptop to just be the thing I fire up Squeezelite or some other player on, click on what I want to play and the Pi does the work. At home I have a Squeezebox Touch that I control from my PC, via wifi. At work I want to do something like this with the Pi as the player, the laptop being the controller, but in this case they'd be directly connected via an ethernet cable.

    I apologize to you and judsonw if I'm doing a poor job explaining this. In my mind it makes sense. :)
     
  6. tomdowns

    tomdowns New Member

    Messages:
    6
    Location:
    Evansville In
    Direct with an ethernet cable, like a cross-over cable to connect 2 devices without a switch?
     
  7. judsonw

    judsonw Active Member

    Messages:
    443
    Location:
    Bellingham, WA, USA
    Apparently cross-over cables are not needed anymore, as the raspberry pi will recognize and switch as needed. At least that is what the article I shared stated.
     
  8. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    So do I just "share the network" on the laptop, follow the steps for IP on laptop and Pi, then LMS should work? (basically everything before the VPN portion)
     
  9. tomdowns

    tomdowns New Member

    Messages:
    6
    Location:
    Evansville In
    I never knew that about the PI, thanks.. I learned something today. So, you would just create a unique static IP on each device; example 192.168.0.1 on the PC and 192.168.0.2 on the PI and subnet 255.255.255.0 Gateway should be blank, but you could put in the PC ip in the pi and it should technically work. I may have to dig up my Pi and try this.
     
    Last edited: Sep 8, 2017
  10. ldatlof

    ldatlof We are all steak Subscriber

    Messages:
    2,651
    Location:
    Las Vegas
    If you are running linux on your laptop, do you really need the RPi? You could load LMS and Squeezelite on to the laptop, connect a USB HHD to the laptop and use the audio out of the laptop into your headphone amp. You could also use a USB DAC if you don't like how the laptop's internal DAC sounds.
     
  11. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    I already have the RPi and HiFiBerry DAC in one case. I might as well use it.
     
  12. for_p1

    for_p1 Addicted Member

    Messages:
    5,430
    Location:
    NJ
    You said that laptop is in the basement along with RPi. What network laptop is connected to? Can you connect RPi to the same network?

    If you try to connect to WiFi at upper floors and your signal is not good enough, you can add router with high gain antenna to be used as bridge and provide wired network in the basement connected to WiFi on upper floors. If you have TV coax routed between floors, you can use that with MoCA. In worst case you can use power line network adapters.
     
  13. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    I have a laptop but it's never been used in this configuration. I have a PC and a Squeezebox Touch and I've had connectivity issues with that. A few years back I was gifted a RPi which I didn't need, but I thought I'd play around with, so I bought a HiFiBerry for fun. During all this, my wifi router crapped out and I replaced it with a decent dual-band. I was hoping that my connection issues were from my old router but it's looking more like issues of thick floors, etc. I'm tired of lugging CD's to/from work so thought I'd take my Pi there and simplify things a bit, and allow myself to have ALL of my collection at once. I may add another router with stronger gain for Netflix and other things (I have a teenager and I wouldn't mind him and his friends hanging out downstairs). If you have recommendation for that, I'd appreciate it.

    For now, I'd still like to take my Pi to work and use it there. Based on info here and other links, I think this is possible to do, I just need to get motivated and try it out. I appreciate all the help and suggestions.
     
  14. for_p1

    for_p1 Addicted Member

    Messages:
    5,430
    Location:
    NJ
    First deal with networking issues. RPi and all other players (like your SB Touch) works with wired network better than with WiFi. So first step is to established reliable network connections between your basement and the rest of the house. RPi has nothing to do with that and you need to address it first. When that is done you will just connect RPi to wired network in basement.

    Regarding use at work place, I do not think you will be allowed to add unauthorized device to network there, being this wired or wireless. If you want to play music there, you can just use your laptop or smart phone and send music via Bluetooth to whatever playing system you have there. Latest version of Bluetooth though being lossy, provides sound quality close to highest bitrate AAC or MP3 and sufficient for non-dedicated listening places. There are many music players compatible with Bluetooth to choose from. Some software for RPi (like max2play https://www.max2play.com/en/portfolio/plugin-bluetooth-2/) has this feature too, but you will need RPi 3 for that (not RPi 2 you have). In this case your media library will be on computer or phone and player will serve only as renderer.
     
  15. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    I know I can't add my device to the network, hence the reason I was asking if I could just attach a laptop to the RPi (directly via an ethernet cable). The laptop would send the instructions to the RPi, the RPi would spit out to a headphone amp.
     
  16. for_p1

    for_p1 Addicted Member

    Messages:
    5,430
    Location:
    NJ
    If your laptop is not locked down by network administrators, you can use it as a player - just install player software and have all your music on thumb drive. You do not need RPi for that. If it is locked down, then you will not be able to connect it via Ethernet to RPi - this feature will be disabled. In this case you can use your smart phone and Bluetooth. If you do not want to deal with network security folks at work, try NOT to connect any private devices to anything other than power outlet.
     
  17. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    I feel like I'm talking to myself. Yes, I get all that, I also understand about network security, etc. I'm talking MY laptop, with my Pi and not using WiFi. The ethernet cable will only connect between the Pi and the laptop. At no time will I use WiFi or the internet. For all intents and purposes, my work network doesn't exist and will not factor into any of this. Nothing is locked down and I'll have complete freedom to do what I want. I already have an RPi and DAC and I'm going to use it. I also have all my music on a USB drive and I'll use that as well. Whether I can use other dongles, go other routes, that's NOT what I want to do or try. I believe what I need to do is similar to what judsonw posted in #2, just not doing VPN. When I get time to play around with this, I'll report back. Again, thanks for all the advice.
     
  18. for_p1

    for_p1 Addicted Member

    Messages:
    5,430
    Location:
    NJ
    Why do you need RPi then? Just use your laptop connected to amplifier. You can have any kind of media player software running on it.
     
  19. dodog

    dodog Addicted Member

    Messages:
    5,291
    Location:
    Iowa City, IA
    I'm beginning to think that you're trolling me. Or you're not actually reading anything that I've written.
     
  20. ldatlof

    ldatlof We are all steak Subscriber

    Messages:
    2,651
    Location:
    Las Vegas
    Me too. :D
     

Share This Page