Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS213 Web Oscilloscope application gives no data (Hard Fault) #106

Open
Martyx00 opened this issue Jan 19, 2023 · 6 comments
Open

DS213 Web Oscilloscope application gives no data (Hard Fault) #106

Martyx00 opened this issue Jan 19, 2023 · 6 comments

Comments

@Martyx00
Copy link

Hi,
I have successfully installed the latest build for the DS213 (https://github.com/gabonator/LA104/releases/tag/2020.12.23). However, I cant make the Web Oscilloscope to work. When I select the app upon the boot and connect the device to computer, I get the pop-up which opens the application, but than nothing happens, no data appear.
The device is registered under /dev/ttyACM1. I am using Ubuntu 22.10, are there any tricks that I have to do to make it work?

[28737.107080] usb 1-2: new full-speed USB device number 23 using xhci_hcd
[28737.287040] usb 1-2: New USB device found, idVendor=1209, idProduct=db42, bcdDevice= 2.20
[28737.287052] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[28737.287056] usb 1-2: Product: DS203 Oscilloscope
[28737.287059] usb 1-2: Manufacturer: Gabriel
[28737.287062] usb 1-2: SerialNumber: 037302574241303939FFD70
[28737.341270] cdc_acm 1-2:1.0: ttyACM1: USB ACM device
@Martyx00
Copy link
Author

Sending any character via serial causes Hard Fault and register dump on the screen.
PXL_20230119_110040407

@Martyx00 Martyx00 changed the title DS213 Web Oscilloscope application gives no data DS213 Web Oscilloscope application gives no data (Hard Fault) Jan 19, 2023
@gabonator
Copy link
Owner

Try this
webosc213.zip

@Martyx00
Copy link
Author

The issue is the same (except that the PC during the crash is now at 0x80644D0).

@gabonator
Copy link
Owner

I have just tried it and everything works well - at least on OSX. Make sure you have following page opened: https://rawgit.valky.eu/gabonator/LA104/master/system/apps_featured/69_webusbosc/web/v3/index.html

But I confirm that it crashes when I send a single character through serial link with
screen /dev/tty.usbmodem101 9600
as well as with
minicom -D /dev/tty.usbmodem101

This is a bit strange and I will investigate this issue following days

@Martyx00
Copy link
Author

Martyx00 commented Feb 1, 2023

Just made it work, I had to add permissions for USB control to my current user:

echo 'SUBSYSTEM=="usb", MODE="0660", GROUP="plugdev"' > /etc/udev/rules.d/00-usb-permissions.rules
udevadm control --reload-rules

Than just add the user into the plugdev group and it should work.

@gabonator
Copy link
Owner

Found the bug, fixed here: 5ecea19

Unfortunately it is not possible to verify the remote procedure call interface with minicom. Every packet sent over USB is processed as a single command. There was a bug when the RPC did not expect unterminated messages to be received and sending single character caused a null pointer dereferencing. There is an easy trick how to test the RPC interface from command line:

echo 'DBG::Print("Hello!");' > /dev/cu.usbmodem1101
echo 'LCD::Bar(CRect(20, 20, 300, 150), 0xaaaa);' > /dev/cu.usbmodem1101
echo 'LCD::Print(50, 80, 0xffff, 0xaaaa, "Hello world!");' > /dev/cu.usbmodem1101

(in OSX redirecting to /dev/tty.usbmodem1101 did not work)

Thank you very much for reporting this issue and for the permissions hack

This is fixed app which should not crash (in worst case it should only freeze with assertion message)
69webos1.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants