Home of the Squeezebox™ & Transporter® network music players.
Page 84 of 89 FirstFirst ... 34748283848586 ... LastLast
Results 831 to 840 of 888
  1. #831
    Quote Originally Posted by paul- View Post
    spidev.ko is the missing module, you don't need to build it, just extract it.......take a look at this post.
    http://forums.slimdevices.com/showth...l=1#post899949
    Thanks Paul,
    I'm getting closer, but I'm not quite at the skill level I'd like to be, but I'm learning as fast as I can. I'm following the info in the thread you pointed me to with some variation.
    Since the Pi in question has no network connection yet, instead of using wget, I extracted the spidev.ko file into a local folder on my debian desktop computer.
    I made a temp folder alongside the tce folder in the /PCP folder on the sd card and copied the file there.
    After inserting the sd card back in the pi and booting up, I then moved the file into the correct folder in the /lib structure.
    Then I used vi to add the line to /opt/.filetool.lst.
    Backed up (pcp bu) and tested to see if that was enough.
    lsmod showed no change yet, so issued the commands:
    sudo depmod -a
    sudo modprobe spidev.ko
    now lsmod showed that spidev was loaded, so I needed to get these loaded autmoatically
    used vi and added the lines to /opt/bootlocal.sh
    backed up and restarted
    Good news, spidev shows up in lsmod now. Bad news, still no network connection.
    ls /dev/sp* returns /dev/spidev0.1
    I added a dtoverlay line in config.txt for the SPI, dtoverlay=spi-bcm2835
    I also added dtoverlay=spi0-hw-cs from that other thread.
    Still no go. I know you don't use SPI on your setup, but I'm hoping you might point out some little step I have missed.
    I feel like I'm really close...

    edit: still failing, see next post
    Last edited by rmac321; 2017-12-05 at 14:56. Reason: 1) added info, 2) stay tuned 3) still fails

  2. #832
    Quote Originally Posted by paul- View Post
    Palmerx,

    It seems as if the card is not being detected soon enough. I've seen this in a couple of cases, and fixed it for the next release.

    open and type "cat /proc/asound/cards"

    Look at the output and get the card number.

    Code:
    tc@pCP:/mnt/mmcblk0p1/overlays$ cat /proc/asound/cards
     0 [ALSA           ]: bcm2835_alsa - bcm2835 ALSA
                          bcm2835 ALSA
     1 [PianoDACPlus   ]: PianoDACPlus - PianoDACPlus
                          PianoDACPlus
    In this example, my PianoDac is card 1

    Now edit /etc/asound.conf, in section pcm.plugequal look for the line

    slave.pcm "plughw:,0"; It should read

    slave.pcm "plughw:1,0"; (I just put a 1 here, but put whatever card number you find in step 1)
    Yes its true in my case it would also be card 1 and this is missing. I'm sorry to ask but how do I edit asoud.conf? I was able to read it with WinSCP but the changes are lost after reboot.
    With Putty I could not edit it because of nano was not working...

    Thanks for the help Paul!

  3. #833

    continuing saga of the search for enc28j60 connectivity

    I realized that I had made another incorrect assumption when I was reviewing the lsmod output again and comparing to the working Raspbian setup. There was no enc28j60 module in the list. I dug into the repository, found the enc28j60.ko module, put it in the pi and now enc28j60 shows up in the modules listed by lsmod, but still no network connection.
    back to googling through device tree and spi threads and comparing various settings in piCorePlayer to the Raspbian setup that works...

    questions for the gurus:
    does it matter if the modprobe command is preceded by a sudo when in the /opt/bootlocal.sh file?
    I've done it both ways and both ways get the modules started.
    Is that the correct script to put them into so they get called in time?
    why does ls /dev/sp* give me just spidev0.1? Shouldn't the default be 0.0?
    IIUC, 0.1 means it is on chip select 1, rather than ce0. FWIW, I've tried both cs pins.
    When testing on Raspbian, I also only get spidev0.1 and the enc28j60 is wired to ce0 and works.
    Thanks for all the help so far!
    Last edited by rmac321; 2017-12-05 at 15:26. Reason: more questions

  4. #834
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    937
    Quote Originally Posted by rmac321 View Post
    questions for the gurus:
    does it matter if the modprobe command is preceded by a sudo when in the /opt/bootlocal.sh file?
    I've done it both ways and both ways get the modules started.
    Is that the correct script to put them into so they get called in time?
    why does ls /dev/sp* give me just spidev0.1? Shouldn't the default be 0.0?
    IIUC, 0.1 means it is on chip select 1, rather than ce0. FWIW, I've tried both cs pins.
    When testing on Raspbian, I also only get spidev0.1 and the enc28j60 is wired to ce0 and works.
    Thanks for all the help so far!
    /opt/bootlocal.sh is ran as root, so it doesn't matter. I have no idea about spi, I don't use it.

  5. #835
    Quote Originally Posted by paul- View Post
    /opt/bootlocal.sh is ran as root, so it doesn't matter. I have no idea about spi, I don't use it.
    Thanks Paul,
    That was my guess re sudo in bootlocal.sh.
    I appreciate all the help you've provided - especially considering it is something you don't use! All of you guys working on pCP provide service well above and beyond!

    For anyone else who may have some SPI insight, I'll offer the following to see if they can help discern what is missing.
    On a normal RPi with Raspbian, the kernel modules enc28j60.ko and spidev.ko are already installed. All that is required to make an enc28j60 work is to add the enc28j60 overlay to the config.txt file. A network connection is established quite quickly.
    With piCore, those two modules are not installed by default, but I have added them in, added the references to them in /opt/.filetool.sh and added the commands to get them started in /opt/bootlocal.sh. lsmod shows they are installed.
    I have added the dtoverlay for enc28j60 to config.txt and tested with and without various spi overlays (none of which are necessary with Raspbian).
    My suspicion is that there is another module that is missing, perhaps ethernet related, but all my googling and such has not revealed what that might be.
    Any SPI gurus out there?

    Thanks!

    edit- add info: dmesg stuff:
    [ 13.783546] enc28j60 spi0.0: enc28j60 Ethernet driver 1.02 loaded
    [ 13.790674] net eth0: enc28j60 driver registered
    Last edited by rmac321; 2017-12-06 at 11:11. Reason: add data

  6. #836

    chmod and vi

    Quote Originally Posted by palmerx View Post
    Yes its true in my case it would also be card 1 and this is missing. I'm sorry to ask but how do I edit asoud.conf? I was able to read it with WinSCP but the changes are lost after reboot.
    With Putty I could not edit it because of nano was not working...

    Thanks for the help Paul!
    Sorry to disturb about a beginner problem... I was able to modify the asound.conf with vi and to store in vi. Then I did
    Code:
    sudo filetool.sh-b
    to store it on the SD card. After a reoot my modifcation on asound.conf is lost... where do I go wrong?
    Also in WinSCP I have "opertion not permitted" if I whant to store the modified asound.conf


    Thanks for all help!

  7. #837
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,228
    hi palmerx,

    The backup command is "sudo filetool.sh -b" not "sudo filetool.sh-b".

    It's may be easier to use $pcp bu. Type $pcp for a list of common commands.

    When using winSCP you are usually logged in as "tc", so you will get file permissions issues on certain files. You can step up access to root but I can't remember how at the moment.

    regards
    Greg

  8. #838
    re: enc28j60 setup
    I've made a bit more progress. The module does work in pCP. Using ifconfig I can get the module on the LAN, but only in a limited fashion. If I add "ifconfig eth0 up" to /opt/bootlocal.sh the link is reported to be up in dmesg, but it still doesn't work. The startup reports "No network found!" and it can't see or be seen on the LAN. If I make the command in the script "ifconfig eth0 <ip address> up", the start up still reports "No network found!", but it is reachable from local computers at that ip address and it can ssh out to local computers. It does not have access to the internet though, so it can't for instance see the picoreplayer repository. Clearly it doesn't know who is in charge of dns and probably lacks other info it would receive if handshaking had been established properly.

    IIUC, ifconfig has no way of initiating a dhcp request to the router. What is responsible in pCP for reaching out to the router to request an IP address with other types of network adapters?

    In the standard linux world you could use dhclient and /etc/network/interfaces to help with the configuration. How is this handled in picoreplayer?

    Thanks again for your help and patience!

  9. #839
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    937
    By manually running udhcpd.

    Take a look at the startup scripts. /etc/init.d/tc-config. Network setup is near the end.

  10. #840
    Quote Originally Posted by paul- View Post
    By manually running udhcpd. Take a look at the startup scripts. /etc/init.d/tc-config. Network setup is near the end.
    I'll dig into that today and see what I can figure out.
    Is the best way to educate myself on the structure of pCP going to be found on the tinycore website? Is there any other source of documentation on the startup process and such, particularly the differences between pCP and Raspbian/Debian?
    Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •