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

Unet Audio closed unexpectedly #73

Open
patel999jay opened this issue May 24, 2022 · 3 comments
Open

Unet Audio closed unexpectedly #73

patel999jay opened this issue May 24, 2022 · 3 comments
Assignees

Comments

@patel999jay
Copy link
Contributor

I am trying to transmit my baseband signal using unet audio but it closes everytime unexpectedly. I am pretty sure the size of the baseband signal is not exceeding the MaxLength.

Here are some logs if that would be useful.

jay@jay-MS-7885:~/Documents/unet-community-3.4.0/unet-3.4.0$ bin/unet -c audio
Modem web: http://localhost:8080/
> ls
Scripts.html [23 kB]
README.md [759 bytes]
bb_signal.txt [2 MB]
> ps
statemanager: org.arl.unet.state.StateManager - IDLE
unetsh: org.arl.fjage.shell.ShellAgent - RUNNING
remote: org.arl.unet.remote.RemoteControl - IDLE
rdp: org.arl.unet.net.RouteDiscoveryProtocol - IDLE
ranging: org.arl.unet.localization.Ranging - IDLE
uwlink: org.arl.unet.link.ReliableLink - IDLE
node: org.arl.unet.nodeinfo.NodeInfo - IDLE
websh: org.arl.fjage.shell.ShellAgent - IDLE
phy: org.arl.yoda.Physical - IDLE
bbmon: org.arl.unet.bb.BasebandSignalMonitor - IDLE
arp: org.arl.unet.addr.AddressResolution - IDLE
transport: org.arl.unet.transport.SWTransport - IDLE
atm: org.arl.unet.AbnormalTerminationManager - IDLE
router: org.arl.unet.net.Router - IDLE
mac: org.arl.unet.mac.CSMA - IDLE
> subscribe phy
> phy.fullduplex = true
true
> phy[3].threshold = 0.25
0.25
> phy[3].modulation = none
none
> phy[3].basebandRx = true
true
> bb
« Physical layer »

Provides software-defined physical layer communication services (including error detection & correction).

[org.arl.unet.DatagramParam]
  MTU ⤇ 31
  RTU ⤇ 31

[org.arl.unet.bb.BasebandParam]
  basebandRate ⤇ 12000.0
  carrierFrequency = 12000.0
  maxPreambleID ⤇ 4
  maxSignalLength ⤇ 2147483647
  signalPowerLevel = -42.0

[org.arl.unet.phy.PhysicalParam]
  busy ⤇ false
  maxPowerLevel ⤇ 0.0
  minPowerLevel ⤇ -138.0
  propagationSpeed = 1500.0
  refPowerLevel ⤇ 0.0
  rxEnable = true
  rxSensitivity ⤇ 0.0
  time = 70717813
  timestampedTxDelay = 1.0

[org.arl.unet.scheduler.SchedulerParam]
  rtc = Mon May 23 22:09:14 ADT 2022
  wakeOnAcoustic = false
  wakeOnEthernet = false
  wakeOnIO = false
  wakeOnRS232 = false

[org.arl.yoda.ModemParam]
  adcrate ⤇ 48000.0
  bbsblk ⤇ 6000
  bbscnt = 0
  bpfilter = true
  clockCalib = 1.0
  dacrate ⤇ 96000.0
  downconvRatio = 4.0
  fan = false
  fanctl = 45.0
  fullduplex = true
  gain = 0.0
  hpc = false
  inhibit = 120
  isc = true
  loopback = false
  model ⤇ Unet audio
  mute = true
  noise ⤇ -73.8
  npulses = 1
  pbsblk = 65536
  pbscnt = 0
  post = null
  poweramp = false
  preamp = true
  pulsedelay = 0
  serial ⤇ unetaudio
  standby = 15
  upconvRatio ⤇ 8.0
  vendor ⤇ UnetStack
  voltage ⤇ 0.0
  wakeupdelay = 400
  wakeuplen = 8000
> bbmon.enable = true
true
> signal = load('bb_signal.txt')
[0.4460094, 0.59262556, 0.739398 <<snip>>  -1.0, -0.83854735, -0.67299324]
> cw(15000, 0.2, 0)
[0.0, 0.025071876, 0.108073376,  <<snip>> 258, -0.108073376, -0.025071876]
> csweep = cw(12000, 0.2, 0)
[0.0, 0.021321878, 0.11697778, 0 <<snip>> 7669, -0.11697778, -0.021321878]
> pbtx csweep
AGREE
phy >> TxFrameStartNtf:INFORM[txTime:170152682 txDuration:200000]
phy >> TxFrameNtf:INFORM[txTime:170171979]
> csweep = cw(12000, 0.2)
[0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1 <<snip>> 0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0]
> bbtx csweep
AGREE
phy >> TxFrameStartNtf:INFORM[txTime:271906057 txDuration:200416]
phy >> TxFrameNtf:INFORM[txTime:271919807]
> signal
[0.4460094, 0.59262556, 0.739398 <<snip>>  -1.0, -0.83854735, -0.67299324]
> bbtx signal
> bin/unet: line 44: 2205439 Aborted                 (core dumped) "$JAVA" -cp "$CLASSPATH" -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djava.library.path="$UNET_LIB" -Dapple.awt.UIElement=true -Dunet.home="$UNET_HOME" -Dunet.cmds="$UNET_CMDS" $LOGGING_PROPERTIES org.arl.unet.UnetBoot "$@"
jay@jay-MS-7885:~/Documents/unet-community-3.4.0/unet-3.4.0$ 

Below is the phy-log-0.txt

1653354484153|INFO|physical.c:90|Yoda PHY native init
1653354484153|INFO|physical.c:98|Model: Unet audio
1653354484153|INFO|physical.c:102|Serial: unetaudio
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
1653354484207|INFO|hal-pa.c:152|DAC output device: default
1653354484207|INFO|hal-pa.c:48|ADC input device: default
1653354484207|WARNING|adc2rec.c:116|ADC2 not installed
1653354484207|INFO|downconv.c:389|Carrier frequency: 12000 Hz (4x decimation)
1653354484208|WARNING|utils.h:29|Could not set thread priority: policy = 0, priority = 0
1653354484208|WARNING|utils.h:29|Could not set thread priority: policy = 0, priority = 0
1653354484210|INFO|hal-pa.c:65|ADC # of channels: 1
1653354484210|INFO|hal-pa.c:66|ADC sampling rate: 48000 Sa/s
1653354484211|INFO|hal-pa.c:67|ADC bit depth: 32.0 bits
1653354484211|INFO|hal-pa.c:169|DAC # of channels: 1
1653354484211|INFO|hal-pa.c:170|DAC sampling rate: 96000 Sa/s
1653354484211|INFO|hal-pa.c:171|DAC bit depth: 32.0 bits
1653354484816|WARNING|physical.c:324|Unable to set scheme 2 parameter [modulation]
free(): invalid size

I am not sure which invalid size the logs were referring to ? I am attaching the bb_signal.txt for reference as well.
bb_signal.txt
log-0.txt

@notthetup
Copy link
Collaborator

Thanks @patel999jay.

free(): invalid size makes me think it's something in the physical layer implementation. Let me look at this in detail.

@notthetup
Copy link
Collaborator

@patel999jay Its seems from the logs you're running Linux. If so which version?

@patel999jay
Copy link
Contributor Author

@notthetup : you're correct I am running Ubuntu. Below are the details of the same.

jay@jay-MS-7885:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

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