Nao

Members
  • Content Count

    37
  • Joined

  • Last visited

About Nao

  • Rank
    Advanced Member

Recent Profile Visitors

262 profile views
  1. Hi, I need to use callback function in Python3 on my NanoPi M4 but I can't, so it is very nice if anyone can help me with this issue. So far I've tried the function with wiringpi as shown command bellow but this doesn't work at all, that generates some errors and after that my command in /usr/bin/ doesn't work .... I can use other functions in wirignpi so guess something is wrong with only this function... Is there any way to use callback function with NanoPi M4, for example using other modules or something Thank you,
  2. Thank you for replying to my question. After I tried with different .img file, which is nightly I think, everything worked well. I successfully installed wiringpi both in Python2 and Python3. But a problem now is that I get "Segmentation fault" errors when I try to use call back function with wiringpi.wiringPiISR(PIN_TO_SENSE, wiringpi.GPIO.INT_EDGE_BOTH, gpio_callback) in some codes such as shown here https://github.com/WiringPi/WiringPi-Python/blob/master/examples/callback.py. as soon as I command wiringpi.wiringPiISR(PIN_TO_SENSE, wiringpi.GPIO.INT_EDGE_BOTH, gpio_callback) the gpio_callback function which I defined execute some times (typically ~10 times), that segmentation fault error occurs. I have tested it with python2 and python3 as well. Do you have any idea why this happens or maybe how to deal with this? Thank you,
  3. I'm trying to install wiringpi by following the instruction given here https://github.com/Pavelectric/WiringPi_M4. Most of the steps that I followed worked fine but when I do the very last command below, I get a following error, I googled how to deal with this kind of error, and some people tell that 'ContextualZipFile' in archive_util.py doesn't have to be installed so I just need to comment that out. Although, I couldn't find '/usr/local/lib/python3.6/dist-packages/setuptools-33.1.1-py3.6.egg/setuptools/archive_util.py', I did that comment out solution to the all files below, which I got by doing find-command-research Now I don't know what to do here... It is very nice if anyone can help me get out of this darkness... Thank you,
  4. I have a problem concerning USB connection. I’m using a USB3.0 high resolution camera with NanoPi m4 and Armbian in it. Checking with “lsusb -t”, I realized that my Pi recognized the camera as USB2.0 device. But when I put it out and replug it to the Pi, it is mounted as USB3.0 device so I can use high-speed data communication then. I want it to be mounted by default, without unplugging... Does anyone know how to deal with this problem? Thank you,
  5. Hi, I'm currently facing strange problems... I'm using NanoPi M4 and operate a USB camera with it. Since I wanted to know the total power consumption of the system, I measured current which flows into NanoPi from the outlet. (I used GPIO to supply 5V power this time for some reasons) The current during while the camera working was very nice (about 1A) so I shut the pi down. Then, I found that the total current value gradually rose up from about 1A to 1.5A. This seems to be so strange because when it gets shutdown, the power should be off as well, and the pi only needs small amount of power just to light the red LED. I tried a few times but the result was always same... I can't understand the reason why this happens, does anyone have ideas to explain this phenomena? Thank you
  6. Nao

    SPI with NanoPi M4

    I did the same thing with the nightly and got the following so I tested this spidev1.0 with spidev_test.c but again, it returned this
  7. Nao

    UART with NanoPi M4

    I succeeded to boot spi1.0 somehow... I edited device tree by following your way and I got the result below and /dev/spidev1.0 appeared (by default, this was spidev0.0 but after I added spi1 = "/spi@ff1d0000" to aliases in dts, the spidev1.0 appeared) I felt so happy this time and tested that spidev1.0 function with spidev_test.c and I got following result again... I'm using spidev1.0 this time but this result again... what can I do now...?
  8. Nao

    UART with NanoPi M4

    well I checked the connection so many times so it should be correct Also, with a default DTB I can log in via UART with the following command % sudo screen -L /dev/tty.usbserial-FTADURC2 1500000 I attached the pic of my USB-TTL on nano pi so you can check it I will try with this kernel EDIT: good news. with the nightly, nano pi booted after editing the DTB /dev/spidev0.0 appeared so I tested with it but nothing happened, I remembered that spi0 is for other use I'll try with the other spi, not spi@ff1d0000 ->well, with spi@ff1e0000 spidev0.0 appeared...and this doesn't work I think something was wrong so I'll try again -> whichever spi@ff1***** I edited, /dev/spidev0.0 always appeared I edited rk3399-nanopi4-rev01.dtb but this isn't the DTB that I should fix? by accident I destroyed that file and I rebooted it but it was fine and the results were the same....
  9. Nao

    UART with NanoPi M4

    I mean, when I tried as I usually do with USB-TTL, unfortunately the screen is just black, shows nothing ( implying no data coming via UART-TTL? ) If this makes no sense, sorry for that but this is what I got so far... Now Im using this legacy kernel just because it is distributed here https://www.armbian.com/nanopi-m4/ If there are some possibilities that SPI can work by updating the latest mainline, I'm happy to do that but I would like you to tell me how, I couldn't find the method
  10. Nao

    UART with NanoPi M4

    well, I meant nothing appeared, so the screen is remaining black after the boot I can check /var/log/bootstrap.log with other LINUX machine but can this show the latest log? for the kernel version, "uname -r" returns "4.4.162-rk3399" Should I upgrade this kernel?
  11. Nao

    UART with NanoPi M4

    Thank you so much I did all the things mentioned here and checked the boot logs.... then nothing appeared... I attached a dts file which I edited again just in case rk3399-nanopi4-rev01.dts
  12. Nao

    UART with NanoPi M4

    Sorry that I made you confused I have it and I can use it but since I don't know which UART in main DT represents the UART4 which share GPIO with SPI1, I disabled all of the UARTs anyway So I thought all of the UARTs were OFF and thus never tried to see what was going on while booting... just for information, nano pi m4 doesn't shoe its yellow light blinking while booting after I changed main DT to enable SPI1 EDIT: I run UART console with "screen" command on UNIX
  13. Nao

    UART with NanoPi M4

    I have it. Usually I use it for console but how can I check logs with it ? In addition, I would like to know which UART is supposed to be "disable" UART4 and SPI1 share GPIOs but since I don't know which is the one, I disabled all of the UARTs the red light on nano pi m4 is on but the yellow one which is supposed to blink while booting does not appear anyway
  14. Nao

    SPI with NanoPi M4

    sorry I edited a status at a wrong spi (actually it was spi@ff1c0000, which corresponds to the SPI0 which is only for SPIFlash) and after edited the status at spi@ff1d0000, my machine doesn't boot... basically I followed an instruction mentioned here,
  15. Nao

    UART with NanoPi M4

    yes, it doesn't boot again, why .... I attached dts file edited for this in case rk3399-nanopi4-rev01.dts