Forum >Replies by LL
Replies (20)
  • You Reply:

    The UNIHIKER is essentially a Linux-running arm64 computer with a USB port, allowing one UNIHIKER to burn firmware to another UNIHIKER.


    Operation Method

    Preparation

    Hardware

    A normal UNIHIKER*1

    A PC that can connect to a normal UNIHIKER*1

    A UNIHIKER that needs to have an image burned*1

    Typec USB cables*2

    Software

    UNIHIKER system image file https://www.unihiker.com/wiki/SystemAndConfiguration/UnihikerOS/unihiker_os_image/

    Command line burn tool file https://www.unihiker.com/wiki/SystemAndConfiguration/UnihikerOS/unihiker_os_burn/#21-command-line-tool

     

    Operation

    File upload to normal UNIHIKER

    Upload the burn tool file (you can use smb function ) to the normal UNIHIKER.

    Upload the image img file to the burn tool folder.

    Enter burn status

    Hold down the Home button of the UNIHIKER to be burned, then plug the USB cable into the USB-A port of the previous UNIHIKER, let go of the Home button after 10 seconds of plugging in, and the UNIHIKER to be burned will enter the image burn tool

    Command line burn

    Using the command line tool, operate the UNIHIKER, here using the terminal tool that comes with jupyter notebook as an example

     

    Open the local web page of the UNIHIKER, start jupyter notebook, and then open the webpage
    Start a terminal page

     

     

    Use the ls command to list the files in the current directory, and use the chmod command to give the burn tool run permission.  

     

    ls  

    chmod -R 777 burner_linux_arm64/  

     

     

    Then use the cd command to enter the burn tool folder, you can see the burn tool and image file exist

     

    cd burner_linux_arm64/
    ls

     

    Use the command to check if the UNIHIKER to be burned has been recognized, as below for the device being recognized. If there is no device, check if the UNIHIKER to be burned is plugged into the current UNIHIKER's USB-A port, and has entered burn mode by holding down the Home button before plugging in.

     

    ./rkdeveloptool ld

     

    Use the following command to start burning, first burn the bootloader, then burn the img and display the progress, please wait until the progress reaches 100%, then the UNIHIKER to be burned will automatically restart, which means the burn is complete. If the burn fails, you can retry multiple times.

     

    ./burner.sh

     

     

     

  • You Reply:

    I have made several different Python packages and put them on Github for easy use. Link: https://github.com/liliang9693/UNIHIKER-python-makefiles.

  • You Reply:

    In UNIHIKER, the cursor is automatically hidden by unclutter. The configuration file path is /etc/default/unclutter. You can set the START_UNCLUTTER option to "false" and then restart, which will prevent unclutter from automatically running after starts.  

          
    ```     
    nano "/etc/default/unclutter"     

         

    START_UNCLUTTER="false"     

         

    reboot     

         
    ```    

          


  • You Reply:

    https://www.unihiker.com/wiki/unihiker_python_lib1

  • You Reply:

    The primary goal for UNIHIKER is stability and ease of use, hence it may not chase the latest updates aggressively. However, updates will not cease. The current plan mainly involves updating the hardware operating library pinpong. Future releases will strive to provide stable and testing versions to cater to different user needs.

    As for SIoT, it is a local MQTT server that runs at /opt/unihiker/SIoT1.3/SIoT1.3_en/ using the standard MQTT protocol. The MQTT data transmission port is 1883, and the web management page is at port 8080. The login account is 'siot' with 'dfrobot' as the password. You can use the 'siot' library or 'paho' library in Python for operations.

    Given that UNIHIKER's documentation is undergoing an upgrade and there is no dedicated introduction page yet, you can refer to the code in one of UNIHIKER's project tutorials at https://edu.dfrobot.com/makelog-313318.html.

  • You Reply:

    In response to your question, I checked the specifications of FIT0493, FIT0185, and FIT0403. The Stall Current for all three products exceeds 3A, so I believe these three motors are not suitable for use with the DFR1136 drive board. You should choose a motor with a Stall Current of less than 3A.

    In addition, the DFR1136 drive board only has two motor drives, which is not enough to drive four Mecanum wheels. You need to add two additional single-channel motor drive boards (such as L298N or TB6612 boards) or choose the DFR0548 four-channel motor drive board. Refer to this project: https://community.dfrobot.com/makelog-313495.html.

  • You Reply:

    we will take the DFRobot's BLE-Link Dongle as an example to illustrate how to use UNIHIKER to communicate with BLE devices.

     

    https://www.dfrobot.com/product-1220.html

    The BLE-Link Dongle is a device that can convert BLE messages into USB serial port messages, making it ideal for BLE communication testing. First, we plug the BLE-Link Dongle into the computer's USB port, and then use the serial assistant software to follow the BLE-Link user manual to configure it as a slave mode, and obtain its MAC address and device name.

     

    First, we run the following command to connect to the BLE device with UNIHIKER:

    ```

    gatttool -b 20:91:48:CD:9F:BC -I  


    connect  

    ```

    Once "Connection successful" is returned and the blue LED light on the BLE Dongle lights up, it indicates that UNIHIKER has successfully connected with the BLE Dongle.

    Once the connection is successful, we can use the characteristics command to view all the features and their attributes of the device.

    As we can see, this BLE device has many services. By looking up the BLE-Link's documentation, we know that the service UUID of the BLE-Link Dongle is "0000dfb0-0000-1000-8000-00805f9b34fb", and the communication UUID is "0000dfb1-0000-1000-8000-00805f9b34fb". You can also use BLE software to query the service UUID and communication UUID of the module, or try them one by one.

     

    Next, we use the char-write-cmd command to send "hello" to the channel with the ID 0x0025. We can see that "hello" is received on the BLE link end. When we send "abc" from the BLE link end, we also receive the message in the terminal. This indicates that the bidirectional communication is successful.

     

    After the test is completed, we can use the  ```exit``` command to exit gatttool.

     

    ---------

    Next, we unplug and re-plug the BLE-Link Dongle to disconnect, and then use the python code for data sending and receiving. The sample code is as follows:

    ```

    import time

    from bluepy.btle import Peripheral, UUID, DefaultDelegate


     

    class MyDelegate(DefaultDelegate):

        def __init__(self):

            DefaultDelegate.__init__(self)


     

        def handleNotification(self, cHandle, data):

            print('Received data:', data)


     

    p = Peripheral("20:91:48:CD:9F:BC""public")


     

    try:

        p.setDelegate(MyDelegate())

        svc = p.getServiceByUUID(UUID("0000dfb0-0000-1000-8000-00805f9b34fb"))

        char = svc.getCharacteristics(UUID("0000dfb1-0000-1000-8000-00805f9b34fb"))[0]

        

        while True:


     

            char.write(bytes("hello\n"'utf-8'))

            time.sleep(0.2)


     

            if p.waitForNotifications(0.1):

                # handleNotification() was called

                continue


     

            print("Waiting...")


     

    finally:

        p.disconnect()


     

    ```

     

  • You Reply:

    By examining the source code of the pinpong library on pypi, you can see that there are five functions in pinpong for I2C data read and write:

    - writeto(i2c_addr, value)- writeto_mem(i2c_addr, reg, value)- readfrom(i2c_addr, read_byte)- readfrom_mem(i2c_addr, reg, read_byte)- readfrom_mem_restart_transmission(i2c_addr, reg, read_byte)

    This library has a version for Raspberry Pi. You can port the Raspberry Pi library to a version compatible with UNIHIKER. Generally, you only need to modify the initialization and I2C read/write functions. You can refer to the library I've ported:you:https://github.com/liliang9693/DFRobot_SGP40/tree/master/Python
     

  • You Reply:

    You can find the built-in example in /opt/unihiker/examples/7-Sticker Face Tracking/.
     

  • You Reply:

    You can try adding exception handling statements.
     

  • You Reply:

    I have tried using prettyping to access different websites under different wifi and wired network conditions. The results vary, so you could try switching your wifi or using a USB to Ethernet adapter to test and rule out network environment issues.

  • You Reply:

    I guess the file download is incomplete, you can try downloading it from Google Drive.

  • You Reply:

    I guess the file download is incomplete, you can try downloading it from Google Drive.

  • You Reply:

    The account configuration for SIoT is in this file, you can modify the "config.json" to make changes:
    "/opt/unihiker/SIoT1.3/SIoT1.3_en/config.json"

  • You Reply:

    This error usually means that there is a program running on the Unihiker that includes pinpong. You can try refreshing the firmware of the GD32 coprocessor, as per these instructions:

    https://www.unihiker.com/wiki/faq#Error:%20RuntimeError:%20Analog%20map%20retrieval%20time%20out.%20or%20the%20readings%20from%20onboard%20components%20all%200

  • You Reply:

     

    "busnum" : [(0,0),(1,1)],

    self.board.spi[bus_num][device_num] = eval(self.board.res["spi"]["class"]+"(board, device_num, cs)")

     

  • You Reply:
  • You Reply:

    Issue 1 is caused by a programming error, the correct code should be: ```from pinpong.board import Board, Pin, SPI```

    Issues 2 and 3 are due to errors in the code within the pinpong library. The files "/usr/local/lib/python3.7/dist-packages/pinpong/extension/unihi.py" and "/usr/local/lib/python3.7/dist-packages/pinpong/board.py" need to be modified. After the modifications, it should appear as shown in the following figure:

  • You Reply:

    It's not recommended to do this, as the 2.8-inch screen of the unihiker is unable to display a complete desktop.

  • You Reply:

     

    First,run```sudo apt-get update```,and install the desktop environment using the command ```sudo apt-get install xfce4 -y```. Then you can stop the UNIHIKER's UI by using ```systemctl --user stop PyboardUI```, or you can disable the UI's auto-start feature on boot by deleting ```systemctl --user start PyboardUI``` from the ```/root/.xsessionrc``` file. Afterward, reboot your system and you should see the desktop.