Signal Tap II Logic Analyzer
Walking with a GPS watch
Blender
Swift
From Luna to Mars
Threads in C++11
Maybe I need threads in my rig control program, so here is a simple test.
//====================== // SprigThreadTest.cpp //====================== #include <iostream> #include <thread> void f() { std::cout << "void f()" << std::endl; } void g() { std::cout << "void g()" << std::endl; } int main(int argc, char **argv) { std::thread t1(f); std::thread t2(g); t1.join(); t2.join(); }
Let’s see what happens.
% ./SprigThreadTest void g()void f() % ./SprigThreadTest void f() void g() % ./SprigThreadTest void f() void g() % ./SprigThreadTest void f() void g() % ./SprigThreadTest void g()void f() % ./SprigThreadTest void f() void g() % ./SprigThreadTest void f() void g()
Looks reasonable? Of course, cout is not thread safe, so we may have interleaved characters.
void f() { for(int i=0;i<10;i++) { std::cout << "abcdefghij" << std::endl; } } void g() { for(int i=0;i<10;i++) { std::cout << "0123456789" << std::endl; } }
% ./SprigThreadTest 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij % ./SprigThreadTest 0123456789abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789
IC-7410 USB I/F and Intel H97 Chipset
I do not know if it is really a problem, but it seems that the IC-7410’s USB I/F does not work in my new environment if I use the ports, either USB 2.0 or USB 3.0, on the motherboard.
% dmesg [ 20.737793] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx [ 31.693171] usb 1-4: new full-speed USB device number 4 using xhci_hcd [ 31.805430] usb 1-4: Device not responding to setup address. [ 32.026386] usb 1-4: New USB device found, idVendor=0451, idProduct=2046 [ 32.026388] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 32.026540] usb 1-4: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes [ 32.027075] hub 1-4:1.0: USB hub found [ 32.027331] hub 1-4:1.0: config failed, can't read hub descriptor (err -22)
The message differs on different ports, or maybe on different occasions.
[ 20.733797] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx [ 30.860159] usb 1-5: new full-speed USB device number 4 using xhci_hcd [ 30.972376] usb 1-5: Device not responding to setup address. [ 31.176527] usb 1-5: Device not responding to setup address. [ 31.380573] usb 1-5: device not accepting address 4, error -71 [ 31.492670] usb 1-5: new full-speed USB device number 5 using xhci_hcd [ 31.621108] usb 1-5: device descriptor read/all, error -71 [ 31.732861] usb 1-5: new full-speed USB device number 6 using xhci_hcd [ 31.749699] usb 1-5: New USB device found, idVendor=0451, idProduct=2046 [ 31.749701] usb 1-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 31.749845] usb 1-5: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes [ 31.750352] hub 1-5:1.0: USB hub found [ 31.750751] hub 1-5:1.0: config failed, can't read hub descriptor (err -22)
% ls -l /dev/ttyUSB* zsh: no matches found: /dev/ttyUSB* % arecord -l **** List of CAPTURE Hardware Devices **** card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
If I use a PCI USB I/F card, it works all right.
% lspci | grep -i usb 00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller 00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 04:02.0 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62) 04:02.1 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62) 04:02.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 65)
[ 20.941489] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx [ 31.248006] usb 6-1: new full-speed USB device number 2 using uhci_hcd [ 31.397184] usb 6-1: New USB device found, idVendor=0451, idProduct=2046 [ 31.397187] usb 6-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 31.399220] hub 6-1:1.0: USB hub found [ 31.401185] hub 6-1:1.0: 4 ports detected [ 31.681442] usb 6-1.1: new full-speed USB device number 3 using uhci_hcd [ 31.961668] usb 6-1.1: New USB device found, idVendor=08bb, idProduct=2901 [ 31.961679] usb 6-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 31.961681] usb 6-1.1: Product: USB Audio CODEC [ 31.961682] usb 6-1.1: Manufacturer: Burr-Brown from TI [ 31.967731] input: Burr-Brown from TI USB Audio CODEC as /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/0000:04:02.0/usb6/6-1/6-1.1/6-1.1:1.3/0003:08BB:2901.0004/input/input19 [ 32.020824] hid-generic 0003:08BB:2901.0004: input,hidraw3: USB HID v1.00 Device [Burr-Brown from TI USB Audio CODEC ] on usb-0000:04:02.0-1.1/input3 [ 32.093781] usb 6-1.2: new full-speed USB device number 4 using uhci_hcd [ 32.100961] usbcore: registered new interface driver snd-usb-audio [ 32.210894] usb 6-1.2: New USB device found, idVendor=10c4, idProduct=ea60 [ 32.210898] usb 6-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 32.210899] usb 6-1.2: Product: CP2102 USB to UART Bridge Controller [ 32.210900] usb 6-1.2: Manufacturer: Silicon Labs [ 32.210911] usb 6-1.2: SerialNumber: IC-7410 00000000 [ 33.254446] usbcore: registered new interface driver usbserial [ 33.254462] usbcore: registered new interface driver usbserial_generic [ 33.254534] usbserial: USB Serial support registered for generic [ 33.267204] usbcore: registered new interface driver cp210x [ 33.267218] usbserial: USB Serial support registered for cp210x [ 33.267244] cp210x 6-1.2:1.0: cp210x converter detected [ 33.267303] usb 6-1.2: cp210x converter now attached to ttyUSB0
% ls -l /dev/ttyUSB* crw-rw---- 1 root dialout 188, 0 May 3 20:37 /dev/ttyUSB0 % arecord -l **** List of CAPTURE Hardware Devices **** card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0
Here is sprigmm on my new PC.
Grig and IC-7410
Let’s see what grig and IC-7410 are talking each other.
% grig -d 4 -m 367 -r /dev/ttyUSB0 -s 19200 2> grig.log
Before looking into the log file, we need to know the data format. The line that starts with “fe fe 80 e0” is from grig to IC-7410, and with “fe fe e0 80” from IC-7410 to grig.
% grep "fe fe" grig.log | colrm 1 40 | colrm 40 | uniq fe fe 80 e0 03 fd <- read operating frequency fe fe e0 80 03 80 91 01 07 00 fd <- 0007019.180kHz fe fe 80 e0 04 fd <- read operating mode fe fe e0 80 04 01 02 fd <- USB, FIL2 fe fe 80 e0 1a 03 fd <- read the selected filter width fe fe e0 80 1a 03 34 fd <- 3000Hz fe fe 80 e0 14 0a fd <- read RF PWR position fe fe e0 80 14 0a 00 01 fdm fe fe 80 e0 15 02 fd <- read S-meter level fe fe e0 80 15 02 00 55 fd fe fe 80 e0 15 12 fd <- read SWR meter fe fe e0 80 15 12 00 00 fd fe fe 80 e0 15 13 fd <- read ALC meter fe fe e0 80 15 13 00 00 fd fe fe 80 e0 16 12 fd <- read AGC fe fe e0 80 16 12 02 fd <- AGC is MID fe fe 80 e0 11 fd <- read ATT fe fe e0 80 11 00 fd <- ATT is OFF fe fe 80 e0 16 02 fd <- read Preamp fe fe e0 80 16 02 00 fd <- Preamp is OFF fe fe 80 e0 14 01 fd <- read AF position fe fe e0 80 14 01 00 54 fd fe fe 80 e0 14 02 fd <- read RF position fe fe e0 80 14 02 02 55 fd fe fe 80 e0 14 03 fd <= read SQL position fe fe e0 80 14 03 00 00 fd fe fe 80 e0 14 06 fd <- read NR position fe fe e0 80 14 06 01 04 fd fe fe 80 e0 14 0d fd <- read NOTCH position fe fe e0 80 14 0d 01 19 fd fe fe 80 e0 14 07 fd <- read inner TWIN PBT position fe fe e0 80 14 07 01 28 fd fe fe 80 e0 14 08 fd <- read outer TWIN PBT position fe fe e0 80 14 08 01 28 fd fe fe 80 e0 14 09 fd <- read CW PITCH position fe fe e0 80 14 09 01 28 fd <- position is center fe fe 80 e0 14 0c fd <- read KEY SPEED position fe fe e0 80 14 0c 01 11 fd fe fe 80 e0 14 0f fd <- read BK-IN DELAY fe fe e0 80 14 0f 01 27 fd fe fe 80 e0 14 10 fd <- undefined command fe fe e0 80 fa fd <- NG response fe fe 80 e0 1a 03 fd <- read selected filter width fe fe e0 80 1a 03 34 fd fe fe 80 e0 14 16 fd <- read VOX gain fe fe e0 80 14 16 00 25 fd fe fe 80 e0 14 0e fd <- read COMP position fe fe e0 80 14 0e 00 11 fd fe fe 80 e0 14 0b fd <- read read MIC position fe fe e0 80 14 0b 00 00 fd fe fe 80 e0 16 50 fd <- read Dial Lock Function fe fe e0 80 16 50 00 fd <- the function is off fe fe 80 e0 16 12 fd <- read AGC fe fe e0 80 16 12 02 fd <- AGC is MID fe fe 80 e0 16 22 fd <-read Noise Blanker fe fe e0 80 16 22 00 fd <- off fe fe 80 e0 16 44 fd <- read Speech Compressor fe fe e0 80 16 44 00 fd <- off fe fe 80 e0 16 46 fd <- read VOX function fe fe e0 80 16 46 00 fd <- off fe fe 80 e0 16 42 fd <- read Repeater tone fe fe e0 80 16 42 00 fd <- off fe fe 80 e0 16 43 fd <- read Tone squelch fe fe e0 80 16 43 00 fd <- off fe fe 80 e0 16 47 fd <- read BK-IN function fe fe e0 80 16 47 00 fd <- off fe fe 80 e0 16 47 fd <- read BK-IN function fe fe e0 80 16 47 00 fd <- off fe fe 80 e0 16 41 fd <- read Auto Notch function fe fe e0 80 16 41 00 fd <- off fe fe 80 e0 16 40 fd <- read Noise Reduction fe fe e0 80 16 40 00 fd <- off fe fe 80 e0 16 45 fd <- read Monitor Function fe fe e0 80 16 45 00 fd <- off fe fe 80 e0 16 48 fd <- read Manual Notch function fe fe e0 80 16 48 00 fd <- off fe fe 80 e0 16 50 fd <-read Dial Lock function fe fe e0 80 16 50 00 fd <- off fe fe 80 e0 16 4c fd <-read VSC function fe fe e0 80 16 4c 00 fd <- off fe fe 80 e0 14 0e fd <- read comp positon fe fe e0 80 14 0e 00 11 fd fe fe 80 e0 14 01 fd <- read AF position fe fe e0 80 14 01 00 54 fd fe fe 80 e0 15 02 fd <- read S-meter Level fe fe e0 80 15 02 00 00 fd fe fe 80 e0 03 fd <- read operating frequency fe fe e0 80 03 80 97 01 07 00 fd fe fe 80 e0 14 06 fd <- read NR position fe fe e0 80 14 06 01 04 fd fe fe 80 e0 14 0d fd <- read Notch positon fe fe e0 80 14 0d 01 19 fd (stuff deleted)
% grep "fe fe 80 e0" grig.log | colrm 1 40 | colrm 40 | uniq | sort | uniq -c 2 fe fe 80 e0 03 fd 1 fe fe 80 e0 04 fd 1 fe fe 80 e0 11 fd 2 fe fe 80 e0 14 01 fd 1 fe fe 80 e0 14 02 fd 1 fe fe 80 e0 14 03 fd 2 fe fe 80 e0 14 06 fd 1 fe fe 80 e0 14 07 fd 1 fe fe 80 e0 14 08 fd 1 fe fe 80 e0 14 09 fd 1 fe fe 80 e0 14 0a fd 1 fe fe 80 e0 14 0b fd 1 fe fe 80 e0 14 0c fd 2 fe fe 80 e0 14 0d fd 2 fe fe 80 e0 14 0e fd 1 fe fe 80 e0 14 0f fd 1 fe fe 80 e0 14 10 fd <- undefined command 1 fe fe 80 e0 14 16 fd 2 fe fe 80 e0 15 02 fd 1 fe fe 80 e0 15 12 fd 1 fe fe 80 e0 15 13 fd 1 fe fe 80 e0 16 02 fd 3 fe fe 80 e0 16 12 fd 2 fe fe 80 e0 16 22 fd 2 fe fe 80 e0 16 40 fd 2 fe fe 80 e0 16 41 fd 2 fe fe 80 e0 16 42 fd 2 fe fe 80 e0 16 43 fd 2 fe fe 80 e0 16 44 fd 2 fe fe 80 e0 16 45 fd 2 fe fe 80 e0 16 46 fd 2 fe fe 80 e0 16 47 fd 2 fe fe 80 e0 16 48 fd 2 fe fe 80 e0 16 4c fd 3 fe fe 80 e0 16 50 fd 2 fe fe 80 e0 1a 03 fd
So as far as we see here, it looks almost OK.
GNU Radio (2)
GNU Radio revisited.
The signal flow is the same as before except for the decimation filter. I am not sure if I need any audio signal processing here for my ears.
A shallow dip in memory history is due to closing a web browser.