Close
0%
0%

Debug-Berry

Internet controlled raspberry-pi based Serial monitoring, Debugging, OTA, Input/Output, and troubleshooting microcontrollers

Public Chat
Similar projects worth following
PROBLEM : We love microcontroller projects. But debugging them is not easy, especially when they are deployed away from your desk. Most common method is to plug the microcontroller on a PC using a USB serial converter, or built in debugging features on the device.

SOLUTION : You can connect your microcontroller device to USB on debug-berry, and debug-berry provides power to the the device. And gives you ability to remotely monitor serial port data, debug the device, on an easy to use a cloud based web interface, from anywhere.

1. Power control: Ability to power on/off the microcontroller.
2. Serial terminal : Software to give commands, and read microcontroller output over serial
3. Cloud software : To monitor remotely, and teleport keyboard inputs & display
4. Firmware update: Apply new firmware
5. Perform automated testing of the microcontroller
6. Create logs for later analysis
7. Monitor & log power consumption

https://github.com/kaushleshchandel/debugberry.g

Fist step is to select hardware. As Raspberry pi Zero is available to buy in stores, I chose Raspberry Pi Zero W as the base. 

I already had a 2.2 inch lcd display from Adafruit, so I am using it for the build. the display is available for purchase, however, you can use any other compatible displays for the build. I like the Adafruit PiTFT as it also has four buttons that I can use.

To control the power to a device, you can use a USB module, and solder it to Raspberry Pi zero, with the 5V power pin controlled by a relay.

  • Client Server communication

    Kaushlesh C. ( KD9VFU )09/05/2023 at 00:18 0 comments

    One key thing for Debug-berry is the ability to stream terminal inputs & outputs to web brower. Streaming data from a client to a web server and then to a browser can be achieved through several mechanisms. Here's a brief overview of some popular methods:

    TLDR: MQTT over WebSocket's will be best option.

    1. HTTP Long Polling:
      • The client sends a request to the server.
      • The server holds the request open until new data is available.
      • Once the data is available, the server responds to the request.
      • The client then immediately sends another request, and the process repeats.

    2. WebSocket's:

    • WebSockets provide a full-duplex communication channel over a single, long-lived connection.
    • Once a WebSocket connection is established, data can be sent in both directions (from client to server and vice versa) as "frames" without the overhead of re-establishing a connection.
    • It is ideal for real-time applications such as chat apps, online gaming, and live sports updates.

    3. HTTP/2 Server Push:

    • With HTTP/2, the server can send multiple responses for a single client request.
    • This can be used to "push" resources to the client proactively, without the client explicitly asking for them.
    • While not strictly for "streaming" in the traditional sense, it can be used to optimize the loading of web pages by preemptively sending resources the client will need.

    4. MQTT over WebSockets:

    • MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol for small sensors and mobile devices.
    • While it's not strictly a web technology, it can be used over WebSockets to provide real-time updates in web applications.

    Out of all these options, I want to pick something that is easy to implement, lightweight, and reliable.  Also, ability to log the data will be important.

  • Building the web application

    Kaushlesh C. ( KD9VFU )08/23/2023 at 21:05 0 comments

    I started building the web application for debug-berry. On the server side, it will use node.js for streaming serial port output to the web browser.

    The interface is kept simple to look like terminal screen.

    More to come...

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates