pothosware / go-soapy-sdr Goto Github PK
View Code? Open in Web Editor NEWGo bindings for SoapySDR API
License: Boost Software License 1.0
Go bindings for SoapySDR API
License: Boost Software License 1.0
Hello!
I am trying to constantly stream the buffer using a loop, and the buffer needs to be set before. So there is a limit on how long it can ever be right? Because the moment the buffer is smaller then infinite time, and it will just hang waiting for the buffer size, and prevent the buffer from overflowing.
Thanks!
SoapySDR master, go-soapy-sdr master
vrm@zivatar:~/go/src/github.com/pothosware/go-soapy-sdr/cmd$ go clean -cache
vrm@zivatar:~/go/src/github.com/pothosware/go-soapy-sdr/cmd$ go build
# github.com/pothosware/go-soapy-sdr/cmd
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-011735759/000005.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
sorry I'm new to golang
Hi
Is it currently possible to transmit using hackrf ?
I didnt find any examples
Thanks
When running main.go via go run .
in the terminal in VSCode on MacOS (Sonoma 14.2.1) Apple Silicon, it frequently, though not always, errors off with the error in the call to device.UnmakeList
.
This error happens with an RTL-SDR v3 or v4 attached. (tried with 3 different dongles)
SoapySDR libraries installed via Homebrew:
librtlsdr 2.0.1
libusb 1.0.27
soapysdr 0.8.1_1
soapyrtlsdr 0.3.3_1
cmd(64857,0x1d8335000) malloc: Double free of object 0x15860a460
cmd(64857,0x1d8335000) malloc: *** set a breakpoint in malloc_error_break to debug
SIGABRT: abort
PC=0x181b1e0dc m=0 sigcode=0
signal arrived during cgo execution
goroutine 1 gp=0x140000021c0 m=0 mp=0x1008027c0 [syscall]:
runtime.cgocall(0x10072c718, 0x1400002bd08)
/usr/local/go/src/runtime/cgocall.go:157 +0x44 fp=0x1400002bcd0 sp=0x1400002bc90 pc=0x10068cb94
github.com/pothosware/go-soapy-sdr/pkg/device._Cfunc_free(0x15860a460)
_cgo_gotypes.go:2016 +0x30 fp=0x1400002bd00 sp=0x1400002bcd0 pc=0x10071d4e0
github.com/pothosware/go-soapy-sdr/pkg/device.UnmakeList.deferwrap1.devicesClear.1(0x15860a460)
/Users/jim/go/go-soapy-sdr/pkg/device/bridge.go:333 +0x40 fp=0x1400002bd30 sp=0x1400002bd00 pc=0x100720470
github.com/pothosware/go-soapy-sdr/pkg/device.devicesClear(...)
/Users/jim/go/go-soapy-sdr/pkg/device/bridge.go:333
github.com/pothosware/go-soapy-sdr/pkg/device.UnmakeList.deferwrap1()
/Users/jim/go/go-soapy-sdr/pkg/device/device.go:171 +0x28 fp=0x1400002bd50 sp=0x1400002bd30 pc=0x1007203f8
github.com/pothosware/go-soapy-sdr/pkg/device.UnmakeList({0x140000b8040?, 0x140000b8008?, 0x1007332b1?})
/Users/jim/go/go-soapy-sdr/pkg/device/device.go:173 +0x134 fp=0x1400002bdb0 sp=0x1400002bd50 pc=0x1007202f4
main.main()
/Users/jim/go/go-soapy-sdr/cmd/main.go:70 +0x41c fp=0x1400002bf40 sp=0x1400002bdb0 pc=0x10072764c
runtime.main()
/usr/local/go/src/runtime/proc.go:271 +0x28c fp=0x1400002bfd0 sp=0x1400002bf40 pc=0x1006be42c
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x1400002bfd0 sp=0x1400002bfd0 pc=0x1006ed374
goroutine 18 gp=0x1400008c380 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x1400004e790 sp=0x1400004e770 pc=0x1006be858
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:408
runtime.forcegchelper()
/usr/local/go/src/runtime/proc.go:326 +0xb8 fp=0x1400004e7d0 sp=0x1400004e790 pc=0x1006be6e8
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x1400004e7d0 sp=0x1400004e7d0 pc=0x1006ed374
created by runtime.init.6 in goroutine 1
/usr/local/go/src/runtime/proc.go:314 +0x24
goroutine 19 gp=0x1400008c540 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x1400004ef60 sp=0x1400004ef40 pc=0x1006be858
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:408
runtime.bgsweep(0x1400009a000)
/usr/local/go/src/runtime/mgcsweep.go:278 +0xa0 fp=0x1400004efb0 sp=0x1400004ef60 pc=0x1006ab300
runtime.gcenable.gowrap1()
/usr/local/go/src/runtime/mgc.go:203 +0x28 fp=0x1400004efd0 sp=0x1400004efb0 pc=0x10069f798
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x1400004efd0 sp=0x1400004efd0 pc=0x1006ed374
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:203 +0x6c
goroutine 20 gp=0x1400008c700 m=nil [GC scavenge wait]:
runtime.gopark(0x1400009a000?, 0x100756020?, 0x1?, 0x0?, 0x1400008c700?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x1400004f760 sp=0x1400004f740 pc=0x1006be858
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:408
runtime.(*scavengerState).park(0x1008020e0)
/usr/local/go/src/runtime/mgcscavenge.go:425 +0x5c fp=0x1400004f790 sp=0x1400004f760 pc=0x1006a8cfc
runtime.bgscavenge(0x1400009a000)
/usr/local/go/src/runtime/mgcscavenge.go:653 +0x44 fp=0x1400004f7b0 sp=0x1400004f790 pc=0x1006a9254
runtime.gcenable.gowrap2()
/usr/local/go/src/runtime/mgc.go:204 +0x28 fp=0x1400004f7d0 sp=0x1400004f7b0 pc=0x10069f738
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x1400004f7d0 sp=0x1400004f7d0 pc=0x1006ed374
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:204 +0xac
goroutine 21 gp=0x1400008cc40 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x28?, 0x0?, 0x1006ceea8?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x14000052580 sp=0x14000052560 pc=0x1006be858
runtime.runfinq()
/usr/local/go/src/runtime/mfinal.go:194 +0x108 fp=0x140000527d0 sp=0x14000052580 pc=0x10069e868
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x140000527d0 sp=0x140000527d0 pc=0x1006ed374
created by runtime.createfing in goroutine 1
/usr/local/go/src/runtime/mfinal.go:164 +0x80
r0 0x0
r1 0x0
r2 0x0
r3 0x0
r4 0x73
r5 0x2e
r6 0x1
r7 0x100bb8028
r8 0x7ffb2b48b3b02b13
r9 0x7ffb2b496b837b13
r10 0xa
r11 0x0
r12 0x36
r13 0x40000000
r14 0x100
r15 0x0
r16 0x148
r17 0x1e13a7340
r18 0x0
r19 0x6
r20 0x1d8335000
r21 0x103
r22 0x1d83350e0
r23 0x16f776fe0
r24 0x0
r25 0x0
r26 0x16f7774fd
r27 0x1d8335000
r28 0x100802180
r29 0x16f776930
lr 0x181b55cc0
sp 0x16f776910
pc 0x181b1e0dc
fault 0x181b1e0dc
exit status 2
Interestingly, when run in the MacOS terminal, I get the following error instead. This error occurs on every execution.
cmd(64921,0x1d8335000) malloc: *** error for object 0x60000097c0f0: pointer being freed was not allocated
cmd(64921,0x1d8335000) malloc: *** set a breakpoint in malloc_error_break to debug
SIGABRT: abort
PC=0x181b1e0dc m=0 sigcode=0
signal arrived during cgo execution
goroutine 1 gp=0x14000002380 m=0 mp=0x1049ee7c0 [syscall]:
runtime.cgocall(0x104918718, 0x14000023d08)
/usr/local/go/src/runtime/cgocall.go:157 +0x44 fp=0x14000023cd0 sp=0x14000023c90 pc=0x104878b94
github.com/pothosware/go-soapy-sdr/pkg/device._Cfunc_free(0x60000097c0f0)
_cgo_gotypes.go:2016 +0x30 fp=0x14000023d00 sp=0x14000023cd0 pc=0x1049094e0
github.com/pothosware/go-soapy-sdr/pkg/device.UnmakeList.deferwrap1.devicesClear.1(0x60000097c0f0)
/Users/jim/go/go-soapy-sdr/pkg/device/bridge.go:333 +0x40 fp=0x14000023d30 sp=0x14000023d00 pc=0x10490c470
github.com/pothosware/go-soapy-sdr/pkg/device.devicesClear(...)
/Users/jim/go/go-soapy-sdr/pkg/device/bridge.go:333
github.com/pothosware/go-soapy-sdr/pkg/device.UnmakeList.deferwrap1()
/Users/jim/go/go-soapy-sdr/pkg/device/device.go:171 +0x28 fp=0x14000023d50 sp=0x14000023d30 pc=0x10490c3f8
github.com/pothosware/go-soapy-sdr/pkg/device.UnmakeList({0x1400004e008?, 0x1400011c008?, 0x10491f2b1?})
/Users/jim/go/go-soapy-sdr/pkg/device/device.go:173 +0x134 fp=0x14000023db0 sp=0x14000023d50 pc=0x10490c2f4
main.main()
/Users/jim/go/go-soapy-sdr/cmd/main.go:70 +0x41c fp=0x14000023f40 sp=0x14000023db0 pc=0x10491364c
runtime.main()
/usr/local/go/src/runtime/proc.go:271 +0x28c fp=0x14000023fd0 sp=0x14000023f40 pc=0x1048aa42c
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x14000023fd0 sp=0x14000023fd0 pc=0x1048d9374
goroutine 2 gp=0x14000002e00 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x1400004af90 sp=0x1400004af70 pc=0x1048aa858
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:408
runtime.forcegchelper()
/usr/local/go/src/runtime/proc.go:326 +0xb8 fp=0x1400004afd0 sp=0x1400004af90 pc=0x1048aa6e8
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x1400004afd0 sp=0x1400004afd0 pc=0x1048d9374
created by runtime.init.6 in goroutine 1
/usr/local/go/src/runtime/proc.go:314 +0x24
goroutine 18 gp=0x14000084380 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x14000046760 sp=0x14000046740 pc=0x1048aa858
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:408
runtime.bgsweep(0x14000090000)
/usr/local/go/src/runtime/mgcsweep.go:278 +0xa0 fp=0x140000467b0 sp=0x14000046760 pc=0x104897300
runtime.gcenable.gowrap1()
/usr/local/go/src/runtime/mgc.go:203 +0x28 fp=0x140000467d0 sp=0x140000467b0 pc=0x10488b798
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x140000467d0 sp=0x140000467d0 pc=0x1048d9374
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:203 +0x6c
goroutine 19 gp=0x14000084540 m=nil [GC scavenge wait]:
runtime.gopark(0x14000090000?, 0x104942020?, 0x1?, 0x0?, 0x14000084540?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x14000046f60 sp=0x14000046f40 pc=0x1048aa858
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:408
runtime.(*scavengerState).park(0x1049ee0e0)
/usr/local/go/src/runtime/mgcscavenge.go:425 +0x5c fp=0x14000046f90 sp=0x14000046f60 pc=0x104894cfc
runtime.bgscavenge(0x14000090000)
/usr/local/go/src/runtime/mgcscavenge.go:653 +0x44 fp=0x14000046fb0 sp=0x14000046f90 pc=0x104895254
runtime.gcenable.gowrap2()
/usr/local/go/src/runtime/mgc.go:204 +0x28 fp=0x14000046fd0 sp=0x14000046fb0 pc=0x10488b738
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x14000046fd0 sp=0x14000046fd0 pc=0x1048d9374
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:204 +0xac
goroutine 34 gp=0x14000106540 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0xc8?, 0xa5?, 0x104882a14?)
/usr/local/go/src/runtime/proc.go:402 +0xc8 fp=0x1400004a580 sp=0x1400004a560 pc=0x1048aa858
runtime.runfinq()
/usr/local/go/src/runtime/mfinal.go:194 +0x108 fp=0x1400004a7d0 sp=0x1400004a580 pc=0x10488a868
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1222 +0x4 fp=0x1400004a7d0 sp=0x1400004a7d0 pc=0x1048d9374
created by runtime.createfing in goroutine 1
/usr/local/go/src/runtime/mfinal.go:164 +0x80
r0 0x0
r1 0x0
r2 0x0
r3 0x0
r4 0x73
r5 0x2e
r6 0x1
r7 0x104965440
r8 0xfa2007a1f1ef68f2
r9 0xfa2007a029dc38f2
r10 0xa
r11 0x0
r12 0x36
r13 0x0
r14 0x100
r15 0x0
r16 0x148
r17 0x1e13a7340
r18 0x0
r19 0x6
r20 0x1d8335000
r21 0x103
r22 0x1d83350e0
r23 0x16b58b350
r24 0x0
r25 0x0
r26 0x16b58b84d
r27 0x1d8335000
r28 0x1049ee180
r29 0x16b58aca0
lr 0x181b55cc0
sp 0x16b58ac80
pc 0x181b1e0dc
fault 0x181b1e0dc
exit status 2
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.