N0BOY / FT8CN

Run FT8 on Android
MIT License
387 stars 40 forks source link

(tr)uSDX audio over cat #42

Open clewisit opened 1 year ago

clewisit commented 1 year ago

Will it be possible to add support for the (tr)uSDX alpha firmware that supports audio via the cat interface? This device does not have a built-in usb sound card and I haven't had much success with vox. Most times the transmit audio goes out of the phone speaker instead of the headphone cable.

M7SVB commented 1 year ago

I'm fairly certain this would be impossible as trusdx USB interface does not have any connection to the radio's audio input/output.

clewisit commented 1 year ago

That's not quite true anymore. Guido has enabled audio streaming support in the alpha firmware.

https://dl2man.de/5-trusdx-details/

There is also a proof of concept script that someone posted in the (tr)uSDX forum. Unfortunately, I don't understand how the audio stream over cat connection works.

d3m3vilurr commented 1 year ago

Hello, can someome test this patchset?

ft8cn-trusdx-debug.apk.zip

patch list:

requires

problems

  1. USB cat signal is pretty unstable. sometimes work well. sometimes disconnected from rig.
  2. TX audio freq should be < 2000hz. if over it(>= 2000hz), rig transmit signals to multiple wrong points. lower hz also transmit different points, but in these case, these extra signals has very week powers. so it wouldn't be actual problem.

problem 1 could be related my patch. it migth need to wait time between serial communications problem 2 would be related (tr)uSDX firmware. idk solution yet.

clewisit commented 1 year ago

@d3m3vilurr, sorry, I just saw this today. I loaded up your debug app and connected my (tr)uSDX. I am able to receive and decode, so this is great! I haven't tried transmitting just yet, and there are a couple of issues with the test: 1) crashes frequently, not sure why. 2) adjusting settings (volume, bandwidth, etc.) also seems to cause freezing or crashing in the app. 3) is it possible to automatically set the bandwidth to 3K or 4K?

Everything else seems to work well. I will do some more testing this week. Thanks for your hard work on this.

d3m3vilurr commented 1 year ago

ft8cn-trusdx-debug.zip here is 0.90 mod version

1. crashes frequently, not sure why.

sorry IDK. I didn't get the app crash during change the freq / volume in the app (I just got a usb disconnecting. and I think it could related cable or device port)

2. adjusting settings (volume, bandwidth, etc.) also seems to cause freezing or crashing in the app.

current time, changing volume (signal output strength) of the app is nothing happen to (tr)uSDX. I didn't apply this multiplier to sending signal streams.

in the trusdx-audio guide, rig volume have to be 10. I set my rig's volume to 9~10 and mode/bandwidth USB 4K

3. is it possible to automatically set the bandwidth to 3K or 4K?

probably no. I cannot find a command about set the bandwidth in Kenwood CAT spec.. I think (tr)uSDX firmware also doesn't support it.

clewisit commented 1 year ago

Thanks, I will try out the new one later today and let you know my results.

clewisit commented 1 year ago

Ok, I got a chance to hook this up on my lunch break. I am able to confirm receive works, it decodes the entire 3Khz spectrum. Transmit also works. I didn't get any responses, but I confirmed I was heard on PSK Reporter.

However, the app still crashes frequently. First time I ran it for about 2 minutes on receive, and then it got through 3 transmit cycles before crashing. After restarting the app, it immediately crashed. restarting again and it ran for 1 receive cycle then crashed. It's fairly random. I just realized I had turned up the volume so I could see the waterfall better, and I wonder if going above 10 is causing some kind of overflow causing the crash. I will reduce volume on the (tr)uSDX and try again after work. If I get more crashes, I will grab the logcat.

d3m3vilurr commented 1 year ago

yep. please share the logcat if you can grap. i think, one of possibilities could be related new jni lib.

and thank you for your confirming transmit result.

clewisit commented 1 year ago

ooh, this was fun. I decided to run it on my drive home, and was transmitting for about 10 minutes calling CQ. Still never got a response, but psk reporter has me received all over the east coast US (I'm in California), and got decoded in Mexico, Puerto Rico, Brazil, Hawaii and Australia. Then it crashed again.

This time I can confirm it's volume related. The app only crashes on receive. When I had the radio on volume 12 it crashed almost immediately, but on 9 it runs about 10 minutes before crashing. As the volume is decreased, I seem to get less crashes, but also decode less signals. Sorry, I didn't get a logcat yet, but I will try to get that today.

On second thought, I'm going to try a different phone first. I just realized a couple of other apps also suffer from crashes that normally wouldn't have.

d3m3vilurr commented 1 year ago

@clewisit I also retested with my latest debug build during very limited time. (maybe 5min)

here is my app setting Screenshot_20230818-004259_FT8CN Debug

rig setting was

Screenshot_20230818-003523_FT8CN Debug

results: I made 2 QSO without any crashes. but only one is perfectly made. QSO with JF3UFJ was finished with 73. but JG5VFK couldn't.

wsjtx_2023-08-18_00-41-10

don't know the reason, my IC7300 + WSJTX is reported that this signal doesn't have the correct callsign. it might be related to the time offset or an app couldn't make a correct signal in this case.

TKS DE DS1UFX

clewisit commented 1 year ago

Alright, the crashing issue is limited to that one phone. I was able to use my other phone and ran ft8 on 10 meters for about 30 minutes without any crashes. And, made one contact...while driving to pick up my wife. It's a good thing this is basically automatic.

Also, the radio volume didn't seem to have any affect on signal this time. I initially had it at 0 and I could see a bunch of signals. and put it all the way up to 16 without any change on the waterfall. So, I think this is good to go.

d3m3vilurr commented 1 year ago

thank you for sharing the testing result. and congrats made QSO! 👍

N0BOY commented 1 year ago

Can you guys also test this version? FT8CN_0.91_Beta1_20230816.apk.zip

This build is not a direct merge from https://github.com/N0BOY/FT8CN/pull/67. Instead, @BG7YOZ rewrites the uSDX part in the 0.91 revision.

Note that, this beta version may require reinstallation. It's better to test on a spare device. And always keep a backup of your QSO log.

d3m3vilurr commented 1 year ago

@N0BOY it doesn't work.

imo, it would be similar to kenwood 480.

here is test result;

bg7yoz commented 1 year ago

@d3m3vilurr , 我查了一下(tr)uSDX文档[(https://dl2man.de/5-trusdx-details/)], 您提交的TruSDXRig.java并没有完成US指令的具体实现。

按照(tr)uSDX提供的CAT文档,我的理解:它是兼容TS-480的CAT指令,在此之外,又新增了自定义指令(UA1;UA1;UA2;US),这些指令是用于通过串口发送声音的,要求串口的波特率至少是38400/115200以上,接收的波特率是7825,发送的波特率是115200。

接收到音频的数据是以‘US’开头,以';'结尾,考虑到音频数据中会有';'造成音频中断,要把';'开头的数据视作音频作为恢复播放。

在@d3m3vilurr 提供的代码中,US部分没有做完,所以收到音频数据FT8CN没有反应。

对应FT8CN来说,如果针对(tr)uSDX通过串口发送处理音频,那么FT8CN还要有很多地方需要修改: 1.需要把串口接收到的音频数据,播放出来(FT8CN程序接口要修改或增加。对接收到的音频采样率和位深都要做转换)。 2.发射音频,不通过手机直接播放,而是把数据通过串口发送给电台(FT8CN程序接口要修改或增加,生成的音频数据(采样率、位深)也要对truSDX所要求的做出转换)。

所以,FT8CN_0.91_Beta1_20230816.apk.zip并不能解决通过串口传输音频的问题。

对于(tr)uSDX这种通过串口实现音频传输的想法很有趣,不知道具体实现效果怎么样? 我的担心: 串口的速率够不够?FT8CN默认音频采样率最低是12000Hz,16bitPCM,而115200的传输率实际上的可传输的采样率应该是14400Hz,似乎还可以,如果是38400Hz,采样率应当是是4800,且16BitPCM要转为8bitPCM,而接收的音频,要求是7825传输率,那么采样率应该是978Hz,音频数据的质量很低了,不知道对解码的影响有多大?

另外,当天线不平衡时,串口通讯会受到来自天线的射频干扰而断开,这可能是一个常见的问题。

以上是简单的理解,不知正确与否。

BG7YOZ

bg7yoz commented 1 year ago

对于用串口发送音频,鉴于串口的发送速率很低,pcm格式的音频不是一个好办法,如果能做一些压缩(比如opus)编码是不是会好些?

d3m3vilurr commented 1 year ago

@bg7yoz Hello, I used google translate for your word. so I might got wrong understanding.

  1. boud rate must be 115200. it was changed.

  2. RX audio must be 7825hz samplerate + PCM8 mono and TX audio must be 11520hz samplerate + PCM8 mono it means, we have to do upsampling / downsampling;

    these resamplings make the audio quality to be pretty low, but Guido who the man makes a trusdx firmware might think it's enough to communicate FT8. and it's actually enough to FT8 in my experience

  3. US message will be finished when you send another command (such as FA or TX) if you don't send any command, stream data never contain ; (frame data of serial line doesn't have ;) so you are right. my patch will not finish US command until receiving result of another command. https://github.com/N0BOY/FT8CN/pull/67/commits/98fc73ba#diff-0dcc60d25a9cc310fc7eea760fd06b7163ffbc5b7595a5d2938ddfaf12859a49R119 so we have to make a simple state machine for the current state to detect RX receiving

  4. basically I also check the trusdx-audio project for implementing this and I wrote detailed information to the first PR description #61

  5. i'm not sure. but trusdx wouldn't integrate a good audio compression solution. it needs more cpu power, and trusdx is actually arduino(atmega328p)

bg7yoz commented 1 year ago

hi,@d3m3vilurr

我按照您提交的代码做了编译,看看是否可以使用: FT8CN_0.91_Beta5_20230821.apk.zip

bg7yoz

d3m3vilurr commented 1 year ago

@bg7yoz it works well

clewisit commented 1 year ago

I can also confirm that. Using 0.91 beta 5, I am able to decode and send. Finally got New Zealand, with the (tr)uSDX powered only by my phone, and hooked up to the 10m antenna on my jeep.

IU2QMW commented 1 year ago

I can also confirm that. Using 0.91 beta 5, I am able to decode and send. Finally got New Zealand, with the (tr)uSDX powered only by my phone, and hooked up to the 10m antenna on my jeep.

Can you post the correct settings for the (tr)uSDX ? I tried with Xiaomi Redmi note 7, rx sometimes crash, Tex don't work. Thank you

d3m3vilurr commented 1 year ago

I can also confirm that. Using 0.91 beta 5, I am able to decode and send. Finally got New Zealand, with the (tr)uSDX powered only by my phone, and hooked up to the 10m antenna on my jeep.

Can you post the correct settings for the (tr)uSDX ? I tried with Xiaomi Redmi note 7, rx sometimes crash, Tex don't work. Thank you

my screenshot is correct setting. but you should use just your callsign without /QRP

rmoravcik commented 1 year ago

Tested beta5 over the weekend. The only problem that I observed was that time to time FT8CN started transmission over phone speakers.

IU2QMW commented 1 year ago

I can also confirm that. Using 0.91 beta 5, I am able to decode and send. Finally got New Zealand, with the (tr)uSDX powered only by my phone, and hooked up to the 10m antenna on my jeep.

Can you post the correct settings for the (tr)uSDX ? I tried with Xiaomi Redmi note 7, rx sometimes crash, Tex don't work. Thank you

my screenshot is correct setting. but you should use just your callsign without /QRP

I tried removing /QRP and it works fine. Thank you

bg7yoz commented 1 year ago

I can also confirm that. Using 0.91 beta 5, I am able to decode and send. Finally got New Zealand, with the (tr)uSDX powered only by my phone, and hooked up to the 10m antenna on my jeep.

Can you post the correct settings for the (tr)uSDX ? I tried with Xiaomi Redmi note 7, rx sometimes crash, Tex don't work. Thank you

my screenshot is correct setting. but you should use just your callsign without /QRP

hello, @d3m3vilurr

为什么使用/QRP就会crash? 在哪些地方可以改进,防止出现crash?

thanks

bg7yoz

d3m3vilurr commented 1 year ago

sorry, idk, crash issue too.... it needs crash dump or logcat dumps. nobody dumped yet.

i just share the correct setting information. but I'm not re-tested with /QRP yet. so I told to him to operate without /QRP. (but I thought you already tested QRP issue, and imo, full fixing needs to resolve #72 for it)

bg7yoz commented 1 year ago

hi, @d3m3vilurr

请测试0.91 Beta 9.

FT8CN_0.91_Beta9_20230909.apk.zip

1.修正了#72问题。 2.重新封装了Resample库,减小apk的体积,提升重采样的速度。 3.其它已知的问题。 4.新增的功能。

对于Resample,虽然我做了严格的测试,但是我没有(tr)uSDX,无法知道实际运行的结果,我想知道新的Resample库是否可以在(tr)uSDX上正常运行。

非常感谢!

BG7YOZ 2023-09-09

d3m3vilurr commented 1 year ago

hi BG7YOZ

thank you for updating the package. I'll test at home with beta9 + /QRP tag then shere the result in here.

TU DE DS1UFX

d3m3vilurr commented 1 year ago
  1. spectrum data seems too high gain. I'm not sure this is normal or not. a problem is receiving db is reduced than ic7300 datas of wsjt-x.(but it might related rig setting) upload images before / after (without antenna)

    Screenshot_20230909-180642_FT8CN Debug Screenshot_20230909-165118_FT8CN

    here is with antenna

    Screenshot_20230909-174546_FT8CN

  2. when I set the /QRP tag. wsjt-x(v2.6.1) cannot decode the message. (first step; JA4BXL DS1UFX/QRP PM37 => <...> DS1UFX/QRP). so, IMO i cannot met wsjt-x operators

  3. QSO is correctly made without any tags. so I can confirm this version is also work well.

  4. I found another problem. when I rig set the CW mode, rig cannot change USB mode when I connect to ft8cn then rig will restart few sec later. when I set the LSB or USB manually, problem was gone.

bg7yoz commented 1 year ago

hello, @d3m3vilurr

1.FT8CN解码的能力不如WSJT-X。频谱增益的问题是不是与电台有关?

2.没有问题。看您的描述,WSJT-X是对使用/QRP的消息正确解码了,JA4BXL DS1UFX/QRP PM37,其中JA4BXL是使用的HASH,WSJT-X解析此消息,是需要上下文关联才能解析出呼号。也就是说,WSJT-X开机以来,没有收到与JA4BXL呼号有关的消息,所以WSJT-X无法通过HASH推断出呼号。您可以长时间观察,如果在标准消息(i3=1 或i3=2)中出现过JA4BXL后,就可以看到解析完整的消息了。对使用HASH的呼号,使用<>标注。

找到HASH与呼号映射关系的消息: <JA4BXL> DSUFX/QRP PM37(注意:在JTDX中也有可能会省略<>)

没有找到HASH与呼号映射关系的消息: <...> DSUFX/QRP PM37

3.略。

4.这个是IC-7300中遇到的问题?

关于0.91 Beta 9,现在迫切需要了解:(tr)uSDX使用 audio over cat 能否正常工作,因为我重新写了Resample的库,替换掉jackz314的aar库。

thanks!

bg7yoz

bg7yoz commented 1 year ago

ooh, this was fun. I decided to run it on my drive home, and was transmitting for about 10 minutes calling CQ. Still never got a response, but psk reporter has me received all over the east coast US (I'm in California), and got decoded in Mexico, Puerto Rico, Brazil, Hawaii and Australia. Then it crashed again.

This time I can confirm it's volume related. The app only crashes on receive. When I had the radio on volume 12 it crashed almost immediately, but on 9 it runs about 10 minutes before crashing. As the volume is decreased, I seem to get less crashes, but also decode less signals. Sorry, I didn't get a logcat yet, but I will try to get that today.

On second thought, I'm going to try a different phone first. I just realized a couple of other apps also suffer from crashes that normally wouldn't have.

关于crashes的问题,一般是出现在数据处理出错,在java层通过logcat比较容易查出来,我观察了jackz31的resample的库,他是使用了jni,如果是在.so中出现错误,错误很难查出来,这也是我重写resample库的原因。

不同的手机,安卓的版本不同,对.so中的内存引用检查的严格程度也不同,有的安卓版本数组越界不会crash,而有的安卓版本出现数组越界就会crash,一般来说,安卓版本越高,对内存管理越严格。

这可能是就是有的手机会crash,而有的手机不会crash的主要原因(安卓版本不同)。大概率是.so库运行时出现的问题。

bg7yoz

bg7yoz commented 1 year ago

hello, @d3m3vilurr

1.FT8CN解码的能力不如WSJT-X。频谱增益的问题是不是与电台有关?

2.没有问题。看您的描述,WSJT-X是对使用/QRP的消息正确解码了,JA4BXL DS1UFX/QRP PM37,其中JA4BXL是使用的HASH,WSJT-X解析此消息,是需要上下文关联才能解析出呼号。也就是说,WSJT-X开机以来,没有收到与JA4BXL呼号有关的消息,所以WSJT-X无法通过HASH推断出呼号。您可以长时间观察,如果在标准消息(i3=1 或i3=2)中出现过JA4BXL后,就可以看到解析完整的消息了。对使用HASH的呼号,使用<>标注。

找到HASH与呼号映射关系的消息: <JA4BXL> DSUFX/QRP PM37(注意:在JTDX中也有可能会省略<>)

没有找到HASH与呼号映射关系的消息: <...> DSUFX/QRP PM37

3.略。

4.这个是IC-7300中遇到的问题?

关于0.91 Beta 9,现在迫切需要了解:(tr)uSDX使用 audio over cat 能否正常工作,因为我重新写了Resample的库,替换掉jackz314的aar库。

thanks!

bg7yoz

补充一下说明,非标准呼号CQ另一个呼号时(非标准消息 i3=4),是没有网格的。 <JA4BXL> DSUFX/QRP PM37的实际信息是: <JA4BXL> DSUFX/QRP

d3m3vilurr commented 1 year ago

hello, @d3m3vilurr 1.FT8CN解码的能力不如WSJT-X。频谱增益的问题是不是与电台有关?

IDK, I just said

  1. default spectrum shows high noises (or high RX gain). (please compare first image (resample version) & second image (0.91b9 version)). this case is no RX case (not connected antenna)
  2. dB value is little defferent between two devices. but it would be normal. the db value can be vary in normal case.

2.没有问题。看您的描述,WSJT-X是对使用/QRP的消息正确解码了,JA4BXL DS1UFX/QRP PM37,其中JA4BXL是使用的HASH,WSJT-X解析此消息,是需要上下文关联才能解析出呼号。也就是说,WSJT-X开机以来,没有收到与JA4BXL呼号有关的消息,所以WSJT-X无法通过HASH推断出呼号。您可以长时间观察,如果在标准消息(i3=1 或i3=2)中出现过JA4BXL后,就可以看到解析完整的消息了。对使用HASH的呼号,使用<>标注。 找到HASH与呼号映射关系的消息: <JA4BXL> DSUFX/QRP PM37(注意:在JTDX中也有可能会省略<>) 没有找到HASH与呼号映射关系的消息: <...> DSUFX/QRP PM37

removing grid is quite normal. maybe you would be right. i just monitored on ic7300 + pc without antenna. (in this time, trusdx is only connected to antenna)

i just curious JA4BXL operator can receive my signal correctly, that because i cannot make qso at this time.

3.略。

4.这个是IC-7300中遇到的问题?

I didn't have experiance with ft8cn + ic7300. but IMO, it could be related mode changing timing

https://github.com/N0BOY/FT8CN/blob/Dev/ft8cn/app/src/main/java/com/bg7yoz/ft8cn/rigs/TrUSDXRig.java#L308-L309 IMO, it should be

                    getConnector().sendData(KenwoodTK90RigConstant.setTS590VFOMode());
                    this.setUsbModeToRig();
                    getConnector().sendData(KenwoodTK90RigConstant.setTrUSDXStreaming(true));

关于0.91 Beta 9,现在迫切需要了解:(tr)uSDX使用 audio over cat 能否正常工作,因为我重新写了Resample的库,替换掉jackz314的aar库。

yeah. it works well. /QRP tag could be test yourself. it just need to reduce tx power to 5w. so i can believe you that this is no issue :)

only remain just 2 problems

  1. spectrum; it's just needed to confirm by you that it's normal or not.
  2. reboot a rig(it means, a rig was crashed) with CW mode after connecting the ft8cn

thanks! bg7yoz

补充一下说明,非标准呼号CQ另一个呼号时(非标准消息 i3=4),是没有网格的。 <JA4BXL> DSUFX/QRP PM37的实际信息是: <JA4BXL> DSUFX/QRP

TU DE DS1UFX

bg7yoz commented 1 year ago

hello, @d3m3vilurr

0.91b9可以在(tr)uSDX audio over cat正常工作,对我来说是个好消息,意味着这部分的工作完成了。

还需要进一步沟通的问题:

1.关于频谱高增益。还需要确认: a.第一个图片和第二个图片,是使用ic-7300电台,还是(tr)uSDX电台? b. 你说的“resample version”是指0.91b5?

需要说明的: i.只有在使用(tr)uSDX audio over cat模式下,才使用了重采样的计算,在其它型号的电台和控制模式下,没有用到重采样计算。 ii.如果是ic-7300,我遇到过类似的情况:我的ic-705,使用usb接口控制后,噪声会提高很多。具体来说,就是指插入usb线,ft8cn提示选择串口设备,如果选择串口设备,电台接收到的噪声会高很多(类似于图片2),如果插入usb线,出现选择串口设备时,不选择串口设备,则噪声不会提高(类似于图片1)。这种情况,与重采样计算没有关系,可能是usb线或某个硬件产生了干扰,造成增加了机内噪声,因为ic-705屏幕上的瀑布图也是有同样的变化,所以与重采样没关系。有个ham也曾反馈过,他的XIEGU X6100也有同样情况,使用usb线噪声高了很多,之后他换了一根usb线就解决了。至于是什么原因导致使用usb接口会增加噪声,我没有解决的经验。

2.关于电台重新启动的问题。应该是(tr)uSDX的固件问题。我按照你的提示,在0.91b10中增加模式设置(指令是MD2;

FT8CN_0.91_Beta10_20230910.apk.zip

截屏2023-09-10 07 38 39

73!

bg7yoz

d3m3vilurr commented 1 year ago

hello, @d3m3vilurr

HI BG7YOZ

0.91b9可以在(tr)uSDX audio over cat正常工作,对我来说是个好消息,意味着这部分的工作完成了。

还需要进一步沟通的问题:

1.关于频谱高增益。还需要确认: a.第一个图片和第二个图片,是使用ic-7300电台,还是(tr)uSDX电台? b. 你说的“resample version”是指0.91b5?

both are (tr)uSDX. it was my build but probably same as 0.91b5 BTW i'll retest with 0.91b5 to confirm.(I remember that was same as old one... anyway)

2.关于电台重新启动的问题。应该是(tr)uSDX的固件问题。我按照你的提示,在0.91b10中增加模式设置(指令是MD2;

yep. this is what i said :) I retest it to check the fixing rig crash.

73!

bg7yoz

73 TU DS1UFX

d3m3vilurr commented 1 year ago

hello, @d3m3vilurr

HI BG7YOZ

0.91b9可以在(tr)uSDX audio over cat正常工作,对我来说是个好消息,意味着这部分的工作完成了。 还需要进一步沟通的问题: 1.关于频谱高增益。还需要确认: a.第一个图片和第二个图片,是使用ic-7300电台,还是(tr)uSDX电台? b. 你说的“resample version”是指0.91b5?

both are (tr)uSDX. it was my build but probably same as 0.91b5 BTW i'll retest with 0.91b5 to confirm.(I remember that was same as old one... anyway)

here is beta5 + (tr)uSDX Screenshot_20230911-102345_FT8CN

here is beta10 + (tr)uSDX Screenshot_20230911-102258_FT8CN

both are same RX condition. (just connected USB cable & dummy load)

2.关于电台重新启动的问题。应该是(tr)uSDX的固件问题。我按照你的提示,在0.91b10中增加模式设置(指令是MD2;

yep. this is what i said :) I retest it to check the fixing rig crash.

an app can change to USB mode when connect the rig. but it still occur rig crash. we might need some extra waiting time to receive rig answer or it would be just trusdx firmware problem. IDK actual reason, I'll retest own myself after release the latest codeset. IMO, tt wouldn't be critical issue if we share the temporary solution to users.

current temporary solution is;

73! bg7yoz

73 TU DS1UFX

bg7yoz commented 1 year ago

hello, @d3m3vilurr

HI BG7YOZ

0.91b9可以在(tr)uSDX audio over cat正常工作,对我来说是个好消息,意味着这部分的工作完成了。 还需要进一步沟通的问题: 1.关于频谱高增益。还需要确认: a.第一个图片和第二个图片,是使用ic-7300电台,还是(tr)uSDX电台? b. 你说的“resample version”是指0.91b5?

both are (tr)uSDX. it was my build but probably same as 0.91b5 BTW i'll retest with 0.91b5 to confirm.(I remember that was same as old one... anyway)

here is beta5 + (tr)uSDX Screenshot_20230911-102345_FT8CN

here is beta10 + (tr)uSDX Screenshot_20230911-102258_FT8CN

both are same RX condition. (just connected USB cable & dummy load)

2.关于电台重新启动的问题。应该是(tr)uSDX的固件问题。我按照你的提示,在0.91b10中增加模式设置(指令是MD2;

yep. this is what i said :) I retest it to check the fixing rig crash.

an app can change to USB mode when connect the rig. but it still occur rig crash. we might need some extra waiting time to receive rig answer or it would be just trusdx firmware problem. IDK actual reason, I'll retest own myself after release the latest codeset. IMO, tt wouldn't be critical issue if we share the temporary solution to users.

current temporary solution is;

  • set rig mode to USB mode + 4k bandwidth first
  • then connect to ft8cn

73! bg7yoz

73 TU DS1UFX

看来封装的重采样效果不是很理想 :-( ,暂时就这样了。

这是我封装sample的代码: resample_JNI.zip

resample代码的来源:https://github.com/intervigilium/libresample

0.91马上就会发布,您可以在新的版本修改了。

73!

bg7yoz

d3m3vilurr commented 1 year ago

看来封装的重采样效果不是很理想 :-( ,暂时就这样了。

这是我封装sample的代码: resample_JNI.zip

resample代码的来源:https://github.com/intervigilium/libresample

0.91马上就会发布,您可以在新的版本修改了。

73!

bg7yoz

can i know function chain of TX/RX. trusdx only use mono PCM8 for CAT audio signal. so transform PCM16<->PCM8 could make a problem. but IDK detail reason yet..

bg7yoz commented 1 year ago

看来封装的重采样效果不是很理想 :-( ,暂时就这样了。 这是我封装sample的代码: resample_JNI.zip resample代码的来源:https://github.com/intervigilium/libresample 0.91马上就会发布,您可以在新的版本修改了。 73! bg7yoz

can i know function chain of TX/RX. trusdx only use mono PCM8 for CAT audio signal. so transform PCM16<->PCM8 could make a problem. but IDK detail reason yet..

这一两天就会上传代码,代码已经提交给N0BOY.

73

bg7yoz

N0BOY commented 1 year ago

@d3m3vilurr Updated v0.91 src in both branches. Feel free to submit PR. Thanks!

clewisit commented 1 year ago

关于crashes的问题,一般是出现在数据处理出错,在java层通过logcat比较容易查出来,我观察了jackz31的resample的库,他是使用了jni,如果是在.so中出现错误,错误很难查出来,这也是我重写resample库的原因。

不同的手机,安卓的版本不同,对.so中的内存引用检查的严格程度也不同,有的安卓版本数组越界不会crash,而有的安卓版本出现数组越界就会crash,一般来说,安卓版本越高,对内存管理越严格。

这可能是就是有的手机会crash,而有的手机不会crash的主要原因(安卓版本不同)。大概率是.so库运行时出现的问题。

bg7yoz

Thank you for the insight. I tested beta 10 on the phone that previously suffered from random crashes with beta 5, and I can confirm it no longer crashes. I left it running for about 1 hour at max volume.

I also see the increased background noise in the waterfall. For some reason this phone is sensitive to volume changes on the (tr)uSDX, so when I turn the volume all the way down it shows a good picture of the rhythm of this noise.

Screenshot_20230912-063501_FT8CN

You can see the horizonal and vertical bands clearly in the waterfall. Let me know if you need any further testing.

d3m3vilurr commented 1 year ago

@d3m3vilurr Updated v0.91 src in both branches. Feel free to submit PR. Thanks!

yes. I see it yesterday. I cannot test until friday. I'll recheck the remain issue.

I also see the increased background noise in the waterfall. For some reason this phone is sensitive to volume changes on the (tr)uSDX, so when I turn the volume all the way down it shows a good picture of the rhythm of this noise.

You can see the horizonal and vertical bands clearly in the waterfall. Let me know if you need any further testing.

oh... an app might forget turning off the phone voice receiving after the connection. thanks. i'll also test & check it.

bg7yoz commented 1 year ago

关于crashes的问题,一般是出现在数据处理出错,在java层通过logcat比较容易查出来,我观察了jackz31的resample的库,他是使用了jni,如果是在.so中出现错误,错误很难查出来,这也是我重写resample库的原因。 不同的手机,安卓的版本不同,对.so中的内存引用检查的严格程度也不同,有的安卓版本数组越界不会crash,而有的安卓版本出现数组越界就会crash,一般来说,安卓版本越高,对内存管理越严格。 这可能是就是有的手机会crash,而有的手机不会crash的主要原因(安卓版本不同)。大概率是.so库运行时出现的问题。 bg7yoz

Thank you for the insight. I tested beta 10 on the phone that previously suffered from random crashes with beta 5, and I can confirm it no longer crashes. I left it running for about 1 hour at max volume.

I also see the increased background noise in the waterfall. For some reason this phone is sensitive to volume changes on the (tr)uSDX, so when I turn the volume all the way down it shows a good picture of the rhythm of this noise.

Screenshot_20230912-063501_FT8CN

You can see the horizonal and vertical bands clearly in the waterfall. Let me know if you need any further testing.

hi,@clewisit

感谢您的反馈,对于(tr)uSDX的测试和相关的修改,需要 @d3m3vilurr 帮忙了,我对(tr)uSDX不了解。

关于瀑布噪音的问题,可能我是封装的resample的算法不是很好,我对resample没有深入了解,它只是解决了稳定性和效率问题。

73

bg7yoz

d3m3vilurr commented 1 year ago
  1. if rig uses cw mode, a rig is always crashed after connect to ft8cn. i'm not sure actual reason, but it could be (tr)uSDX firmware issue.
  2. rx stream data + waterfall is not related phone volume. but related rigs volume. users have to reduce the rig volume to community's suggest level; 9 or 10.
  3. @bg7yoz can you wrap libsamplerate? noise of the waterfall can be highly related resample logic. stanford's resample is too old. i'm also not expert for the resampling logic. but imo, this lib's old bug which already resolved in the libsamplerate or unsupport things such as channel make a problem.
bg7yoz commented 1 year ago

3. libsamplerate

1~2.如果需要修改FT8CN以配合(tr)uSDX使用,可以提出,我尽力解决,或您提交新的分支。

3.我会尝试理解libsamplerate并封装它,我也在重采样方面也不是专家 :-p ,如果封装成功了,我会提交给你测试。

73

bg7yoz

bg7yoz commented 1 year ago

hello, @d3m3vilurr

我按照你的要求,重新封装了libsamplerate,请测试能否正常工作。

FT8CN_0.91p1_New_Resample.apk.zip

73!

bg7yoz

rmoravcik commented 1 year ago

hello, @d3m3vilurr

我按照你的要求,重新封装了libsamplerate,请测试能否正常工作。

FT8CN_0.91p1_New_Resample.apk.zip

73!

bg7yoz

Hello bg7yoz,

I was testing this new build over the weekend and I didn't observed any crash. Waterfall doesn't seems to be overloaded with antenna attached and volume set to 10.

I only observing disconnection from rig. There is an popup saying something like: "Connection with rig is broken. ... 2 > 1". Sorry I don't have an screenshot of it.

EDIT: Here is an screenshot of disconnection error Screenshot_20231001-125548

Thank you, Roman

k6tw commented 1 year ago

OK, I just found this conversation and I am having similar problems using trusdx with FT8CN. My original conversation is here https://github.com/N0BOY/FT8CN/issues/80

So, I've had no luck with .91, patch 1 release, beta 10, beta 9, and beta 5- here are my results:

When setting trusdx as the radio- I get the connection error as soon as I select the serial port (I am able to decode only before selecting the serial port). When setting Kenwood TS480 as the radio- I can establish a connection and decode. I am able to PTT momentarily, but no output power (even though the OLED on the trusdx shows "T") and the rig would just "click" for one second, then the TX audio was through the phone only. Unfortunately, once this happened, I also lost RX audio in the rig, even though it was working before.

I've spent hours trying to get my trusdx to transmit FT8. Any other suggestions?

Tim K6TW

d3m3vilurr commented 1 year ago

@k6tw if you select TS480, you might need USB audio sound card

can you recheck your firmware version? this feature requires latest experimental firmware not stable firmware.

k6tw commented 1 year ago

My firmware is 2.00u

Thank you,

Tim

Sent from my smartphone


From: Sunguk Lee @.> Sent: Wednesday, October 4, 2023 7:46:13 PM To: N0BOY/FT8CN @.> Cc: Tim Goodrich @.>; Mention @.> Subject: Re: [N0BOY/FT8CN] (tr)uSDX audio over cat (Issue #42)

@k6twhttps://github.com/k6tw if you select TS480, you might need USB audio sound card

can you recheck your firmware version? this feature requires latest experimental firmwarehttps://dl2man.de/wp-content/uploads/2022/01/wp.php/beta.html not stable firmware.

— Reply to this email directly, view it on GitHubhttps://github.com/N0BOY/FT8CN/issues/42#issuecomment-1747954166, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCZ72YT3ZKVC4VHI3VNOXPDX5YNPLAVCNFSM6AAAAAAYCSPKWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBXHE2TIMJWGY. You are receiving this because you were mentioned.Message ID: @.***>