Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Jeffer

  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. Hi, I'm currently facing strange problems... I'm using NanoPi and operate some USB devices with it. Since I wanted to know the total power consumption of the system, I measured current which flows into NanoPi from the outlet. 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?
  5. 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
  6. 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...?
  7. 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....
  8. 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
  9. 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?
  10. 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
  11. 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
  12. 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
  13. 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,
  14. yes, it doesn't boot again, why .... I attached dts file edited for this in case rk3399-nanopi4-rev01.dts
  15. Now I'm trying ... so please wait haha Is it possible that I download the img file which you made or someone made to enable SPI?
  16. I followed your suggestion below but a change on spi@ff1c0000 showed the change at SPI0 not SPI1 so I thought I had to change the different one, such as spi@ff1d0000. After I edited spi@ff1d0000, I changed dts file to dtb and I rebooted my pi, then it never booted again... I did the same thing with my backup file and got the same problem Maybe this spi@ff1d0000 should not be abled..? So how can I know which spi@***** represents SPI1?
  17. I need USB3.0 connections to control a USB camera. This need decreases the number of choices and I've tried with some boards to check with which one the camera can work the most effectively.
  18. Thank you for informing me that fact. you know, the money for me is limited as well so we chose this chip. Of course we understand it can fail during the flight. It is going to be like "Welcome on board. You can enjoy playing some games running on RK3399 during our flight" haha
  19. I understand, I think it is fine since the operation duration is expected to be less than a few mins And so far no problems have been found so, yeah hopefully it's okay
  20. sorry, what do you mean by being ready to fly? Are you talking about radiation-resistant?
  21. Yes, I need to do this. I'm going to install NanoPi M4 on the drone and thus the available space is so limited I didn't consider this MIPI-DSI. I googled MIPI-DSI monitor but only found MIPI-DSI monitor for raspberry pi. Does this work with Nano Pi? ( I think this is fine)
  22. Though I've not checked if it can work with my Ubuntu machine, I've found a device driver for usb monitor and some articles where people actually use it under Ubuntu environment. I don't care about the lags because of the lack of the GPU, this is so important for me since I have to remove a HDMI port for some reasons haha
  23. yes, the USB-C port on NanoPi M4 is for the power supply But the M4 has 4 other USB3.0 ports which are used for data transfer and I guess USB-C type connection can be made with a USB-C to USB-A adapter. How do you think about this?
  24. Have anyone tried to use USB connected monitor with NanoPi? I'm thinking about buying one but not sure it can work with it or, if some change has to be done to NanoPi , I would like to know about it.
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines