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

    It's possible that you modified the system's hostname.   
    To check, run the command hostname in the terminal—the output should be unihiker. If not, please reset it to the default value (unihiker).  

  • You Reply:

    This error usually indicates that the pinpong library's board detection code (which identifies Unihiker via platform.node()) returned an incorrect result.      
    It's possible that you modified the system's hostname.   
    To check, run the command hostname in the terminal—the output should be unihiker. If not, please reset it to the default value (unihiker).  

  • You Reply:

    This error typically indicates that the pinpong library incorrectly identified the Unihiker. You can try running the command shown in the screenshot to check the output:

     

  • You Reply:

    Could you provide screenshots of the error messages? 

  • You Reply:

    When connecting the Unihiker to a PC via a USB cable, the PC should generate an RNDIS network card. If it doesn't, you can try switching USB ports, using a different system version (such as an older version of Ubuntu, Debian, Windows, or Mac).    
    Additionally, what is the specific version of the OS on your current PC? And what is the OS version of the Unihiker? 

  • You Reply:

    After testing, I found that using the pyenv tool to manage and switch Python versions is the most convenient. Details: https://github.com/liliang9693/unihiker-pyenv-python

  • You Reply:

    Yes, your hardware can connect to the Unihiker's I2C interface and be controlled using PinPong's I2C classes or smbus directly.

    If you prefer connecting your sensor to a Pi Pico instead of the Unihiker's onboard I/O, you'll need to write custom firmware for the Pico to read sensor data and transmit it via serial communication. This approach is conceptually similar to Firmata but not identical, as you'll define your own serial protocol for data exchange.

    A clarification about PinPong's architecture:

    The library supports multiple boards (Uno, Unihiker, ESP32, etc.), with the Arduino Uno implementation using a Firmata-like protocol under the hood.

    However, examples showing Uno connections typically involve the Uno being connected to a PC running Python/PinPong, not to the Unihiker. This is because the Unihiker has native I/O capabilities (via its GD32 chip and Linux system), making external MCUs like the Uno unnecessary in most cases.

  • You Reply:

    In PinPong v0.6.1, the firmware for the GD32 (on the UniHiker M10) is already pre-built, mapping its peripherals (onboard sensors, edge connectors) as Linux devices. This means you can directly use Python libraries like smbus for I2C communication or interact with Linux device-tree files (e.g., /sys/class/gpio) to control peripherals,configure I/O modes by editing /opt/.io_config.txt (Linux device-tree approach).. No custom firmware development is required for GD32 in this setup.

    Hope this helps!

  • 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.