2021年2月23日 星期二

Jetson Nano EDIMAX EW-7811Un V2 N150 wifi dongle

git clone https://github.com/lwfinger/rtl8188eu.git

cd rtl8188eu

make

sudo make install


gigijoe@gigijoe-desktop:~/rtl8188eu$ make

make: Warning: File 'Makefile' has modification time 5690693 s in the future

make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/4.9.140-tegra/build M=/home/gigijoe/rtl8188eu  modules

make[1]: Entering directory '/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9'

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_ap.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_br_ext.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_cmd.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_debug.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_efuse.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_ieee80211.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_io.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_ioctl_set.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_iol.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_led.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_mlme.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_mlme_ext.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_mp.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_mp_ioctl.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_pwrctrl.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_p2p.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_recv.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_rf.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_security.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_sreset.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_sta_mgt.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_wlan_util.o

  CC [M]  /home/gigijoe/rtl8188eu/core/rtw_xmit.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/HalHWImg8188E_MAC.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/HalHWImg8188E_BB.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/HalHWImg8188E_RF.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/HalPhyRf.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/HalPhyRf_8188e.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/HalPwrSeqCmd.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/Hal8188EPwrSeq.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/Hal8188ERateAdaptive.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/hal_intf.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/hal_com.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/odm.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/odm_debug.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/odm_interface.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/odm_HWConfig.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/odm_RegConfig8188E.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/odm_RTL8188E.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_cmd.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_dm.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_hal_init.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_mp.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_phycfg.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_rf6052.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_rxdesc.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_sreset.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188e_xmit.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188eu_led.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188eu_recv.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/rtl8188eu_xmit.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/usb_halinit.o

  CC [M]  /home/gigijoe/rtl8188eu/hal/usb_ops_linux.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/ioctl_linux.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/mlme_linux.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/os_intfs.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/osdep_service.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/recv_linux.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/rtw_android.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/usb_intf.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/usb_ops_linux.o

  CC [M]  /home/gigijoe/rtl8188eu/os_dep/xmit_linux.o

  LD [M]  /home/gigijoe/rtl8188eu/8188eu.o

make[2]: warning:  Clock skew detected.  Your build may be incomplete.

  Building modules, stage 2.

  MODPOST 1 modules

  CC      /home/gigijoe/rtl8188eu/8188eu.mod.o

  LD [M]  /home/gigijoe/rtl8188eu/8188eu.ko

make[2]: warning:  Clock skew detected.  Your build may be incomplete.

make[1]: Leaving directory '/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9'

make: warning:  Clock skew detected.  Your build may be incomplete.

gigijoe@gigijoe-desktop:~/rtl8188eu$ sudo make install

[sudo] password for gigijoe: 

install -p -m 644 8188eu.ko  /lib/modules/4.9.140-tegra/kernel/drivers/net/wireless

cp rtl8188eufw.bin /lib/firmware/.

/sbin/depmod -a 4.9.140-tegra

mkdir -p /lib/firmware/rtlwifi

cp rtl8188eufw.bin /lib/firmware/rtlwifi/.

sudo reboot

gigijoe@gigijoe-desktop:~$ iwconfig

wlan0     IEEE 802.11  Mode:Master  Tx-Power=22 dBm   

          Retry short limit:7   RTS thr:off   Fragment thr:off

          Power Management:on

          

rndis0    no wireless extensions.


lo        no wireless extensions.


l4tbr0    no wireless extensions.


dummy0    no wireless extensions.


usb0      no wireless extensions.


eth0      no wireless extensions.


wlan1     unassociated  ESSID:""  Nickname:"<WIFI@REALTEK>"

          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   

          Sensitivity:0/0  

          Retry:off   RTS thr:off   Fragment thr:off

          Power Management:off

          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0




2021年2月9日 星期二

dragon-eye - F3F real-time electronic judging system with Jetson Nano

 F3F is an radio control aeromodelling sport, slope soaring gliders.

F3F - SLOPE SOARING GLIDERS

As the name depicts, this event is flown in front of a slope, taking advantage of the updrafts created by the wind. In the single Speed task the pilot tries to fly its model over a 1000m course (composed of 10 X 100 meter legs) in the shortest possible time.

At least four rounds should be completed in order to determine the winner.

F3F glider
F3F human judging

dragon-eye is an F3F real-time electronic judging system with Jetson Nano. It's base on technology of computer vision, capture video stream from camera then detect moving objects and keeps tracking them, once one of the tracking target across central vertical line, trigger out a signal. 




Feature
- Multi moving targets tracking base on technology of background subtraction (MOG2)
- Camera resolution is 720p and frame rate is limited to 30 fps
- Supports selection 1 of 2 cameras with different angle of view
- Trigger out GPIO / UART / UDP when target across central line
- Record video files to SD card with or without tracking result
- Built-in wifi AP for connectivity
- Built-in RTSP video server (H.265 codec)
- Video output can be one of the following option HDMI / RTP / HLS / RTSP (Prefer RTSP)
- Android APP to start / stop / config / play RTSP video stream
- Written in c/c++ for running performance
- Background subtraction runnung by GPU to improve real-time performance
- Camera settings for different scenes such as dim light or over exposure
- Adjustable MOG2 threshold to reduce nosie or improve object detection 

Source code and more detail please refer to dragon-eye

Android APP dragon-eye-rc
- Remote control dragon-eye from Android phone
- Connect dragon-eye through wifi
- Start / Stop dragon-eye
- System config / Camera config
- Play video from RTSP server of dragon-eye
- Play sound with trigger

System Steeings screenshot

Camera Settings screenshot

Main screenshot



RTSP video stream screenshot




- An program running on PC Ubuntu desktop for development of dragon-eye
- It process video file from dragon-eye and output result on screen or to file

Demo video : Good result of glider go through complex background under horizon 

Demo video : Glider flying in far distance. There's a bug make false trigger

Demo video : High speed pass by


Demo video : Birds across screen and varios bugs fool around

Demo video : Record video with result



Full scale test


Update (May 20)


2021年2月5日 星期五

Jetson nano build darknet

 Log of build darknet on Jetson nano


git clone https://github.com/AlexeyAB/darknet.git

cd darknet

vi Makefile


export PATH=$PATH:/usr/local/bin:/usr/local/cuda/bin

export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/cuda/lib

make