RPiks / pico-WSPR-tx

WSPR beacon for Raspberry Pi Pico, based on pico-hf-oscillator library. It doesn't require any hardware - Pico board itself only.
MIT License
107 stars 13 forks source link

how o build #9

Open edegraaff opened 9 months ago

edegraaff commented 9 months ago

Hi, it seems i have some issues :-) First, do we build on intel or on arm? I have some issues installing the pi sdk on ... you dont beleve, ubuntu on arm pi5 .. i am missing the package code .. seems it is neede for c ... I have tried over and over, and the standard build script for the ide fails on the package code, and it seems not availible on ubuntu, where the preq are ok , the nice part is when i want to program on arduino the ide 2,0 is not running on raspbian but it is on ubuntu what a fun...

Next step, installl raspbian for pi5 and build the pi pico ide, and from there restart the whole project...but...it is smart to tell the prereq since the new pi boards are different and or have issues with c in relation with arm and or intel at least i think thats the clue

regards eelco

sivaelid commented 9 months ago

Hi I have built this WSPR project very easily using Pico - Visual Studio Code . You need to down load that and Git Desktop. Open Git desktop on your PC and then go to the git Hub page for the project and select Gihub Desktop and let it down load. Once its down loaded it will show a git desk top page and on the right hand side give some option select open with Pico- Visual Code Studio. You will them have the project open in Pico - Visual Code studio. Configure what you want in Main.c it may ask for you to select a tool go for the unspecified one ( middle ) and select this. It shoudl start the configuration when complete. Select build at the very bottom of page and it should build correctly including the sub project needed. I then open the build folder and find at the bottom of the section the "!pico-wspr-tx.uf2" and then drag this to Pi Pico drive that is shown in Boot Mode ( hold Pi Pico White button and Plug the usb cable in, it will apear then. Good luck, there are many other ways to do the build I hope comments not to basic.. But someone else may read then and it helps them I hope this helps. Simon G8HAM

edegraaff commented 9 months ago

Thanks for these guidance, i am not the only one with the c++ issues
https://forums.raspberrypi.com/viewtopic.php?t=346527 I will check documents and see what will work, i would expect building on pi4 or 5 would work, but it seems this is not the situation. Arm and Intel are not the same neither are the sdk's this is also the issu with the arduino sdk btw.

You are mentioning the pc i suspect it will be an intel system?

edegraaff commented 8 months ago

Solution: i trief to build on PI5 and after a lot of browsing i switched over to Windows 11 on Intel and downloaded the Windows package. This makes it possible to compile C code. Since i am new to PI-Pico i also executed the examples like hello_world.uf2 blink_picow.uf2 and it works.. pff..

edegraaff commented 8 months ago

Well for those that want to know how i at least got the code compiling. Raspberry pi imager > os raspbian 64 bits > is prefered os Install and update and upgrade Then install pi pico ide by wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh and run script all done under user context bash ./pico_setup.sh From there after 20 min the whole ide is installed and also studio. Then download the code pico-WSPR-tx and edit the main.c with callsign and locator ad or change the freq CONFIG_WSPR_DIAL_FREQUENCY

Pay attention to the pins in defines.h pin 2 for pps of the gps module and pin 6 for rf out

Observation: i used the pico with Wifi and it seems this model does crash and is not able to get a working output. Standard code loaded into the pico does work so the hardware does function. Could someone confirm the pi pico and the pi pico w could react different in this project?? The output of the : StampPrintf("\n"); sleep_ms(5000); StampPrintf("R2BDY Pico-WSPR-tx start.") Are not printed in the serial monitor > should i add other lines (debug pins) to get the stampprint output ?

edegraaff commented 8 months ago

Update: image Will give it a try in front of the windows. Maybe the gps initialisation takes to long

sivaelid commented 8 months ago

Hi Just to let you know that the message that you have above shown above shows that the transmit took place just once. This is the noprmal activity if there is no active GPS.

You need to set #define CONFIG_GPS_SOLUTION_IS_MANDATORY - to " YES" to enable GPS I assume tthe GPS receiver is correctly conected to pins 16 and 17 ( GPIO12 and GPIO13) not to pins 1 & 2 as per diagram as this is in error. Dont set #define CONFIG_SCHEDULE_SKIP_SLOT_COUNT - to less than 2 as it doees not seem to work. At 2 the message is sent correctly at every 4 minutes. The GPS needs to be outputting "GPRMC" to work if you using an Multi-satellite GPS receiver then you need to change line 224 in GPStime.c to replace "GPRMC" to "GNRMC" to work with correct message output. Also dont uncomment out the section 116 to 127 to enable auto maidenhead locator sending as this does not work and send s an incorect measage.

I have to code working well otherwise and is great to test my antennas.

Simon G8HAM

edegraaff commented 8 months ago

Thanks Simon, regarding the gps receiver i have one that does gnss+gps+bd.
I also try to write down it bit more detailed for others.

Based on the code defines.h

define GPS_PPS_PIN 2 / GPS time mark PIN. / >stays

define RFOUT_PIN 6 / RF output PIN. / > stays

The gps was connected to those pins, and fed with vcc and ground was to ground, and this way the gps did receive a link.

To add/change If i take the diagram https://github.com/RPiks/pico-hf-oscillator/tree/9fbd9fa407423c89af9c4878340e71446c948f66?tab=readme-ov-file i think i understand what you mean, in this case the 20TXD > 2 should be pin16 >add and 21RXD >1 should be pin 17 >add And VCC and GRND are aded otherwise the gps does not work.

The GPS needs to be outputting "GPRMC" to work if you using an Multi-satellite GPS receiver then you need to change line 224 in GPStime.c to replace "GPRMC" to "GNRMC" to work with correct message output. This change is refering to the code in pico-hf-ocillator/gpstime/GPStime.c > in my situation it is Line 227 Reuild the code and first result is in the console i see the wait messages for the gps

edegraaff commented 8 months ago

This is where i am now. Console output, with GPS link , and it seems to me, the gps link is not detected. Any clue where i made an error? 00d00:13:57.095879 [1057] WSPR> Waiting for GPS receiver... 00d00:13:58.095979 [1058] WSPR> Waiting for GPS receiver... 00d00:13:59.096065 [1059] WSPR> Waiting for GPS receiver... 00d00:14:00.096164 [1060] WSPR> Waiting for GPS receiver... 00d00:14:01.096253 [1061] WSPR> Waiting for GPS receiver... 00d00:14:02.096345 [1062] WSPR> Waiting for GPS receiver... 00d00:14:03.096449 [1063] WSPR> Waiting for GPS receiver... 00d00:14:04.096537 [1064] WSPR> Waiting for GPS receiver... 00d00:14:04.196632 [1065] __ 00d00:14:04.196729 [1066] =TxChannelContext= 00d00:14:04.196785 [1067] ftc:844705383 00d00:14:04.196837 [1068] ixi:0 00d00:14:04.196884 [1069] dfq:14097055 00d00:14:04.196950 [1070] gpo:6 00d00:14:04.197012 [1071] =GPStimeContext= 00d00:14:04.197067 [1072] err:0 00d00:14:04.197130 [1073] ixw:0 00d00:14:04.197193 [1074] sol:0 00d00:14:04.197255 [1075] unl:0 00d00:14:04.197303 [1076] snl:0 00d00:14:04.197362 [1077] age:844 00d00:14:04.197423 [1078] utm:844 00d00:14:04.197483 [1079] rmc:0 00d00:14:04.197532 [1080] pps:843331769 00d00:14:04.197597 [1081] ppb:3391173 00d00:14:05.097659 [1082] WSPR> Waiting for GPS receiver... 00d00:14:06.097748 [1083] WSPR> Waiting for GPS receiver... 00d00:14:07.097846 [1084] WSPR> Waiting for GPS receiver...

Jochen-bit commented 7 months ago

To get back to the actual topic: HOW TO BUILD

As Simon mentioned: On Windows, there's a great installation package with a pre-configured IDE (Visual Studio Code): The description is here: https://www.raspberrypi.com/news/raspberry-pi-pico-windows-installer/

There you can also find the following download link for the installation package: https://github.com/raspberrypi/pico-setup-windows/releases/latest/download/pico-setup-windows-x64-standalone.exe

73, Jochen