# Issues with app controll

**URL:** <https://forum.sunfounder.com/t/issues-with-app-controll/3626>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [August 5, 2025, 3:33pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626 "2025-08-05T15:33:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrPierce](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@DrPierce](https://forum.sunfounder.com/u/DrPierce)\
**Post date:** [August 5, 2025, 3:33pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/1 "2025-08-05T15:33:48Z")

</div>

Hi,

I´m facing some issues when usig the controll app.

I did the set up as described on the webpage [12. PiDog mit der APP spielen — SunFounder PiDog Kit 1.0 Dokumentation](https://docs.sunfounder.com/projects/pidog/de/latest/python/py_12_app_control.html)

When I start the app\_control.py the following error comes up:

~/pidog/examples $ sudo python3 12\_app\_control.py  
vilib 0.3.12 launching …  
picamera2 0.3.25  
Traceback (most recent call last):  
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 411, in pin  
pin = self.pins[info]  
~~~~~~~~~ ^^^^^^  
KeyError: PinInfo(number=29, name=‘GPIO5’, names=frozenset({‘BOARD29’, ‘BCM5’, ‘WPI21’, ‘J8:29’, 5, ‘5’, ‘GPIO5’}), pull=‘’, row=15, col=1, interfaces=frozenset({‘’, ‘uart’, ‘i2c’, ‘spi’, ‘dpi’, ‘gpio’}))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/home/theo/pidog/examples/12\_app\_control.py”, line 11, in   
my\_dog = Pidog()  
^^^^^^^  
File “/usr/local/lib/python3.11/dist-packages/pidog-1.3.9-py3.11.egg/pidog/pidog.py”, line 131, in \__init_\_  
utils.reset\_mcu()  
File “/usr/local/lib/python3.11/dist-packages/robot\_hat/utils.py”, line 147, in reset\_mcu  
mcu\_reset = Pin(“MCURST”)  
^^^^^^^^^^^^^  
File “/usr/local/lib/python3.11/dist-packages/robot\_hat/pin.py”, line 96, in \__init_\_  
self.setup(mode, pull, active\_state)  
File “/usr/local/lib/python3.11/dist-packages/robot\_hat/pin.py”, line 134, in setup  
self.gpio = OutputDevice(self.\_pin\_num)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 108, in \__call_\_  
self = super().\__call_\_(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/output\_devices.py”, line 74, in \__init_\_  
super().\__init_\_(pin, pin\_factory=pin\_factory)  
File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 75, in \__init_\_  
super().\__init_\_(\*args, \*\*kwargs)  
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 553, in \__init_\_  
pin = self.pin\_factory.pin(pin)  
^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 413, in pin  
pin = self.pin\_class(self, info)  
^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 126, in \__init_\_  
lgpio.gpio\_claim\_input(  
File “/usr/lib/python3/dist-packages/lgpio.py”, line 755, in gpio\_claim\_input  
return \_u2i(\_lgpio.\_gpio\_claim\_input(handle&0xffff, lFlags, gpio))  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in \_u2i  
raise error(error\_text(v))  
lgpio.error: ‘GPIO busy’

Any suggestions?

Best regards ad thanks for your support,

Sebastian

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [August 5, 2025, 3:45pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/2 "2025-08-05T15:45:29Z")

</div>

A similar debug log has been posted on this forum previously. The solution in that case was to reinstall the robot hat module. I have no idea if this would help you, but it may be worth a try?

---

<div class="post-metadata">

**Author:** ![DrPierce](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@DrPierce](https://forum.sunfounder.com/u/DrPierce)\
**Post date:** [August 5, 2025, 3:46pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/3 "2025-08-05T15:46:52Z")

</div>

> [@DrPierce](#):
>
> ~/pidog/examples $ sudo python3 12\_app\_control.py  
> vilib 0.3.12 launching …  
> picamera2 0.3.25  
> Traceback (most recent call last):  
> File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 411, in pin  
> pin = self.pins[info]
> 
> ```auto
> KeyError: PinInfo(number=29, name=‘GPIO5’, names=frozenset({‘BOARD29’, ‘BCM5’, ‘WPI21’, ‘J8:29’, 5, ‘5’, ‘GPIO5’}), pull=‘’, row=15, col=1, interfaces=frozenset({‘’, ‘uart’, ‘i2c’, ‘spi’, ‘dpi’, ‘gpio’}))
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
> File “/home/theo/pidog/examples/12_app_control.py”, line 11, in
> my_dog = Pidog()
> ^^^^^^^
> File “/usr/local/lib/python3.11/dist-packages/pidog-1.3.9-py3.11.egg/pidog/pidog.py”, line 131, in _*init*_
> utils.reset_mcu()
> File “/usr/local/lib/python3.11/dist-packages/robot_hat/utils.py”, line 147, in reset_mcu
> mcu_reset = Pin(“MCURST”)
> ^^^^^^^^^^^^^
> File “/usr/local/lib/python3.11/dist-packages/robot_hat/pin.py”, line 96, in _*init*_
> self.setup(mode, pull, active_state)
> File “/usr/local/lib/python3.11/dist-packages/robot_hat/pin.py”, line 134, in setup
> self.gpio = OutputDevice(self._pin_num)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 108, in _*call*_
> self = super()._*call*_(*args, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File “/usr/lib/python3/dist-packages/gpiozero/output_devices.py”, line 74, in _*init*_
> super()._*init*_(pin, pin_factory=pin_factory)
> File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 75, in _*init*_
> super()._*init*_(*args, **kwargs)
> File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 553, in _*init*_
> pin = self.pin_factory.pin(pin)
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 413, in pin
> pin = self.pin_class(self, info)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 126, in _*init*_
> lgpio.gpio_claim_input(
> File “/usr/lib/python3/dist-packages/lgpio.py”, line 755, in gpio_claim_input
> return _u2i(_lgpio._gpio_claim_input(handle&0xffff, lFlags, gpio))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in _u2i
> raise error(error_text(v))
> lgpio.error: ‘GPIO busy’
> 
> ```

thanks, will try it!

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [August 5, 2025, 4:27pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/4 "2025-08-05T16:27:29Z")

</div>

Oops.. it would have been helpful of me to include the reference link … here it is

> [@Almost made it with Pidog AI install but then I got this](https://forum.sunfounder.com/t/almost-made-it-with-pidog-ai-install-but-then-i-got-this/2381):
>
> Noob here. PiDog works fine via controller app so I decided to install the AI piece. Completed all steps flawlessly (I think) until this one. PLEASE HELP!!! cd ~/pidog/gpt\_examples/ sudo ~/my\_venv/bin/python3 gpt\_dog.py --keyboard That step failed. Below is the output I received: (my\_venv) broberts103@Pidog4B:~/pidog/gpt\_examples $ cd ~/pidog/gpt\_examples/ sudo ~/my\_venv/bin/python3 gpt\_dog.py --keyboard Traceback (most recent call last): File “/usr/lib/python3/dist-packages/gpiozero/pin…

---

<div class="post-metadata">

**Author:** ![DrPierce](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@DrPierce](https://forum.sunfounder.com/u/DrPierce)\
**Post date:** [August 5, 2025, 6:21pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/5 "2025-08-05T18:21:15Z")

</div>

Thanks, I tried that, but the issue had a different cause. The GPIO busy issue was caused by an autostart script that launched multiple instances and blocked the pin. However, I’m now facing a different problem: the app connection to the Pidog keeps dropping immediately, even though the web stream itself is working.  
‘192.xxx.xxx.xx’) disconneted client (1, ‘192.xxx.xxx.xx’) conneted 1: received 1005 (no status received [internal]); then sent 1005 (no status received [internal]) client (1, ‘192.xxx.xxx.xx’) disconneted

Any Idea what I´m doing wrong?

Best regards,  
Sebastian

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [August 5, 2025, 6:28pm UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/6 "2025-08-05T18:28:49Z")

</div>

So it’s working/streaming from the pidog to your host (PC?) But not from the host to the pidog. Without more debug info, I’d be guessing at best. Probably best to wait for Sunfounder’s reply at this stage.

Personally I’d probably be checking my firewall configuration at this point, or temporarily disabling it altogether, but without more knowledge about your setup, that’s maybe not even relevant

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [August 6, 2025, 2:28am UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/7 "2025-08-06T02:28:09Z")

</div>

This error indicates that the GPIO pin (specifically GPIO5/BCM5/BOARD29) is occupied or in conflict.

Are these GPIO pins connected to any other devices besides the hardware normally connected to our product? Have you made any software configurations?

Please ensure that your Pidog/Robot HAT is properly connected, with no short circuits or poor connections.  
Are you running multiple code scripts at the same time? This can lead to pin occupation conflicts. It is recommended to end the previous script before running the next one.  
Try checking for running programs using commands like ps -aux | grep python or top.  
After rebooting the system, run the script again to see if the same error occurs.  
If restarting does not resolve the issue, I recommend reinstalling the operating system, then reinstalling all library code, and running the examples to see if they work.

---

<div class="post-metadata">

**Author:** ![DrPierce](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@DrPierce](https://forum.sunfounder.com/u/DrPierce)\
**Post date:** [August 6, 2025, 10:27am UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/8 "2025-08-06T10:27:32Z")

</div>

Thanks a lot for the very quick responses.  
I’ve managed to solve the GPIO busy issue and also fixed the connection problem (it turned out my WLAN repeater was causing it).  
However, I’m now facing another problem – one that I actually had right at the start:

Whenever the Pidog starts moving, the Raspberry Pi immediately restarts. In the app you can see everything freeze, and after the Pi reboots I can reconnect and control it again. But as soon as the Pidog moves, it reboots once more and the app freezes again.

**What I’ve already checked / tried**

- Power supply: using the official supply, seems stable
- All cables and connectors are seated firmly
- GPIO busy issue has been resolved (no multiple processes running)
- WLAN connection is stable (no more drops after removing repeater)

I’ve recorded a short video that shows this behavior, but unfortunately I can’t upload it here.

Any ideas what I should check?

---

<div class="post-metadata">

**Author:** ![DrPierce](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@DrPierce](https://forum.sunfounder.com/u/DrPierce)\
**Post date:** [August 6, 2025, 10:28am UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/9 "2025-08-06T10:28:37Z")

</div>

I´m using a Raspberry Pi 4 Model B

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [August 7, 2025, 3:12am UTC](https://forum.sunfounder.com/t/issues-with-app-controll/3626/10 "2025-08-07T03:12:11Z")

</div>

Is your battery fully charged? The Pidog requires a significant amount of power to operate, as the 12 servos along with the sensor modules need substantial power. This can lead to the PI4 not receiving enough power, potentially causing it to shut down and restart.

We recommend fully charging the battery and then running the system again to see how it performs.
