MordFIdel / SOCORAD32

ESP32 SOftware COntrolled RADio (SOCORAD32)
161 stars 21 forks source link

TX LED always on #11

Open KillerTurtleSoftware opened 1 year ago

KillerTurtleSoftware commented 1 year ago

TX LED is always on, unless you push PTT then it goes out.

MordFIdel commented 1 year ago

Hi, that is not supposed to be. I'll check that on my end here. Does the Rx LED comes when receiving.?

KillerTurtleSoftware commented 1 year ago

The Rx LED does come on. The TX LED only goes off , when the walkie-talkie transmits.

lsascha commented 1 year ago

same here. Also could only upload firmware while pressing PTT. not sure if all that is intentional.

MordFIdel commented 1 year ago

same here. Also could only upload firmware while pressing PTT. not sure if all that is intentional.

I think the TX light always on is an issue in the code. I will check that please.

...Only able to upload a code when you press PTT is not normal. I think that was a coincidence. apologies

KillerTurtleSoftware commented 1 year ago

same here. Also could only upload firmware while pressing PTT. not sure if all that is intentional.

I wonder if this was related to my not being able to upload on one device issue. Does the PC not detect the SOCRAD is connected until you press PTT? I let it sit overnight and then it started working right.

I am going to try some changes to the firmware tonight and see what works.

MordFIdel commented 1 year ago

Please also make sure you have the battery in when plugged to pc. The USB power from pc alone is not enough

On Wed, Aug 16, 2023, 21:27 Killer Turtle @.***> wrote:

same here. Also could only upload firmware while pressing PTT. not sure if all that is intentional.

I wonder if this was related to my not being able to upload on one device issue. Does the PC not detect the SOCRAD is connected until you press PTT? I let it sit overnight and then it started working right.

I am going to try some changes to the firmware tonight and see what works.

— Reply to this email directly, view it on GitHub https://github.com/MordFIdel/SOCORAD32/issues/11#issuecomment-1681226593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVDGLZFLNF346VBOLSHPAY3XVUUKZANCNFSM6AAAAAA3QQ4TEU . You are receiving this because you commented.Message ID: @.***>

KillerTurtleSoftware commented 1 year ago

Ok found the issue, the PTT line is normally HIGH (1) not LOW(0), due to RF module grounding pin to start PTT In gpio.c on line 344 it is gpio_set_level(LED_TX_PIN, !gpio_get_level(TX_STATE_PIN)); this should be gpio_set_level(LED_TX_PIN, gpio_get_level(TX_STATE_PIN)); I have tested it and it fixes the TX LED, so now it comes on when you TX.

EDIT: changed main.c to gpio.c

lsascha commented 1 year ago

Does the PC not detect the SOCRAD is connected until you press PTT? I let it sit overnight and then it started working right.

My main PC did not want to detect it at all. But that could be some yet to me unknown software problem on my PC side. On my notebook it detected them, but they always connected, disconnected more or less constantly until sometimes it stopped. But on trying to flash the firmware, it disconnected again in the middle of it which resulted in an error about access right issues to the port or something.

KillerTurtleSoftware commented 1 year ago

Does the PC not detect the SOCRAD is connected until you press PTT? I let it sit overnight and then it started working right.

My main PC did not want to detect it at all. But that could be some yet to me unknown software problem on my PC side. On my notebook it detected them, but they always connected, disconnected more or less constantly until sometimes it stopped. But on trying to flash the firmware, it disconnected again in the middle of it which resulted in an error about access right issues to the port or something.

2 things to try, 1 another usb cable, 2, try a usb 2.0 port not a usb 3 port.

MordFIdel commented 1 year ago

The programming issues are usually due to power(low battery) or communication(wrong USB cable) issues. Let me know how it goes please.

lsascha commented 1 year ago

since both my PC's don't have a USB 2.0 port anymore i am stuck with USB 3 or USB-C. And my selection of Micro USB cables are a bit limited as well. And i don't have a fitting battery.. 🙈

But it could also explain why they also reboot every time i press the PTT button.

I will see that i source some Micro USB cable and/or a battery to try them out correctly. Not sure what to do about USB 2.0 ports though...

KillerTurtleSoftware commented 1 year ago

I only have USB3.0 ports on my laptop as well. I've seen where some things just don't like the speed of a USB3.0 port. If it's an issue normally you can get a cheap USB2 hub and that works. Yep definitely need a battery, just wish there was a on/off switch.

lsascha commented 1 year ago

Received Batteries today. No issues of flashing or pressing PTT anymore. So a Battery is mandatory for it to function. Didn't know that. So all is fine.

joyel24 commented 1 year ago

I fixed this in this pull request #27

joyel24 commented 1 year ago

@MordFIdel You can merge the PR and close this issue after ;)