dobra-noc / gm1356 Goto Github PK
View Code? Open in Web Editor NEWDigital Sound Level Meter Gm1356 USB driver for Linux
Digital Sound Level Meter Gm1356 USB driver for Linux
Hi, I am getting this when I run the gm1356. Any hints as to what I am doing wrong?
pi@raspberrypi:~ $ gm1356
Traceback (most recent call last):
6: from /usr/local/bin/gm1356:23:in <main>' 5: from /usr/local/bin/gm1356:23:in
load'
4: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/bin/gm1356:40:in <top (required)>' 3: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/bin/gm1356:40:in
new'
2: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:16:in initialize' 1: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:48:in
read_current_state'
/var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:63:in send_state_request': undefined method
write' for nil:NilClass (NoMethodError)
Thanks!
I am interested in downloading the recorded readings from the GM1356 - I can try sniffing the USB communications myself, but I have not found the original SoundLab software available anywhere...
Is there a download link for the mentioned working version anywhere (Sound Level Meter v. 1.0.0.20, build 2016-07-20)?
After successfully recording for a time, I sometimes get the following:
pi@raspberrypi:~ $ sudo gm1356
21:00:50 SPL: 50.2dBA
21:00:51 SPL: 30.5dBA
21:00:52 SPL: 30.8dBA
21:00:53 SPL: 30.9dBA
21:00:54 SPL: 30.9dBA
21:00:55 SPL: 30.3dBA
#<Thread:0x0217baf8@/var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:26 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
8: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:27:in `block (2 levels) in read'
7: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:48:in `read_current_state'
6: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:63:in `send_state_request'
5: from /var/lib/gems/2.5.0/gems/hidapi-0.1.9/lib/hidapi/device.rb:280:in `write'
4: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/dev_handle.rb:455:in `interrupt_transfer'
3: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/dev_handle.rb:534:in `submit_transfer'
2: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/transfer.rb:168:in `submit_and_wait'
1: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/transfer.rb:141:in `submit!'
/var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/constants.rb:62:in `raise_error': LIBUSB::ERROR_BUSY in libusb_submit_transfer (LIBUSB::ERROR_BUSY)
#<Thread:0xb5957710@/var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:26 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
5: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:27:in `block (2 levels) in read'
4: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:48:in `read_current_state'
3: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:63:in `send_state_request'
2: from /var/lib/gems/2.5.0/gems/hidapi-0.1.9/lib/hidapi/device.rb:280:in `write'
1: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/dev_handle.rb:455:in `interrupt_transfer'
/var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/dev_handle.rb:539:in `submit_transfer': error TRANSFER_TIMED_OUT (LIBUSB::ERROR_TIMEOUT)
Traceback (most recent call last):
8: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:27:in `block (2 levels) in read'
7: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:48:in `read_current_state'
6: from /var/lib/gems/2.5.0/gems/gm1356-0.0.4/lib/gm1356/device.rb:63:in `send_state_request'
5: from /var/lib/gems/2.5.0/gems/hidapi-0.1.9/lib/hidapi/device.rb:280:in `write'
4: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/dev_handle.rb:455:in `interrupt_transfer'
3: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/dev_handle.rb:534:in `submit_transfer'
2: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/transfer.rb:168:in `submit_and_wait'
1: from /var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/transfer.rb:141:in `submit!'
/var/lib/gems/2.5.0/gems/libusb-0.5.1/lib/libusb/constants.rb:62:in `raise_error': LIBUSB::ERROR_BUSY in libusb_submit_transfer (LIBUSB::ERROR_BUSY)
Any hints?
Great work on this driver!
I have a problem similar to that of @HaasNL2 in the other issue. A big industrial plant is being built next to my home, and I need to document the noise. I plan on mounting the decibel meter outside my house, wire it to a Raspberry Pi, periodically push the data to GitHub, and use GitHub Actions and Twitter API to automatically make a tweet every time the noise exceeds the law, and tag relevant politicians in the tweet. I plan to run it 24/7. If you immediately see a technical reason that this will not work out, it would be great if you let me know ;)
Do you know where I can buy a device which this driver is known to work on? The README.md specifies serial number HA:1303162, but I can't find a product listing when I google it...
When running gm1356
and top
, the command takes 100% of the CPU:
19556 root 20 0 85944 17992 2976 S 100,3 0,5 614:55.00 gm1356
8097 yapsr 20 0 2929324 519960 22984 S 0,3 13,4 0:33.31 java
1 root 20 0 128300 6932 4152 S 0,0 0,2 0:12.18 systemd
2 root 20 0 0 0 0 S 0,0 0,0 0:00.01 kthreadd
4 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:0H
6 root 20 0 0 0 0 S 0,0 0,0 0:00.22 ksoftirqd/0
7 root rt 0 0 0 0 S 0,0 0,0 0:00.43 migration/0
8 root 20 0 0 0 0 S 0,0 0,0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0,0 0,0 0:06.45 rcu_sched
How to reduce the load on the cpu?
Hi@ciembor, I saw your query on https://gist.github.com/ciembor/d6d1ae2b5b2c329c378b68112f75809d and believe you somehow managed to close that point. I'm facing the same issue in shaping a 27byte long request, was wondering if you could share your solution on this?
Hey,
I also have this meter, first I was just going to use Windows. But the lack of any autmated logging is a bit worrying.
Can you use this to log the data? Can I send it to a webserver?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.