Serial data aquasition on the Raspberry Pi

98 views
Skip to first unread message

cellectronic

unread,
May 6, 2021, 4:48:30 AMMay 6
to Earthworm Community Forum
Hello members,
For those of you that use EW on the Pi along with a serial digitizer .

How are you connecting the serial digitizer onto the PI ?
I see a couple of options ,
1, purchase a serial port Pi hat.
2, utilise the TX RX GPIO pins on the 40 way header.

Any info greatly appreciated


El Berto

unread,
May 6, 2021, 10:57:52 AMMay 6
to Earthworm Community Forum
Digitizers with serial port usually work in RS-232 not in serial, so you can't directly connect to Raspberry due to voltage levels.
Easiest way is usb to RS-232 converter:
https://www.distrelec.biz/en/usb-to-serial-rs232-converter-aten-uc232a/p/12519009

Both serial port Pi hat and GPIO pins on header work only at TTL with 3.3 Volt.

Steve Shuff

unread,
May 6, 2021, 11:02:05 AMMay 6
to earthwo...@googlegroups.com
Hi, yes sorry should have pointed that out in my post. You would definitely need a  max3232 level shifter.  Usb to serial converter would be much neater anyway , so will check that out. Thanks. 

--
--
You received this message because you are subscribed to the Google
Groups "Earthworm Community Forum" group.
 
To post to this group, send an email to earthwo...@googlegroups.com
 
To unsubscribe from this group, send an email to
earthworm_for...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/earthworm_forum?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Earthworm Community Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/earthworm_forum/8Tj3KkUfeIc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to earthworm_for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/earthworm_forum/a3b22b6a-5aa3-4ec0-b939-582d19e46af4n%40googlegroups.com.

Steve Shuff

unread,
May 6, 2021, 11:04:42 AMMay 6
to earthwo...@googlegroups.com
Also, USB to serial would require the correct driver, which sometimes is not always easy to find for the Pi . 

Baker, Lawrence M

unread,
May 6, 2021, 12:38:50 PMMay 6
to 'Meremonte, Mark E' via Earthworm Community Forum, Baker, Lawrence M
I recommend trying to find a way to also support RTS/CTS, i.e., hardware handshaking.  Some devices require it, like the Kinemetrics K2.

Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov



On May 6 2021, at 8:04:27 AM, Steve Shuff <steves...@gmail.com> wrote:

 

 This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.  



You received this message because you are subscribed to the Google Groups "Earthworm Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to earthworm_for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/earthworm_forum/CADNpUBFjHy0-oJF_VuAPyXSb6LRSbyJh26Gznn23KFBwpKeXTQ%40mail.gmail.com.



Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov



Steve Shuff

unread,
May 10, 2021, 2:27:02 PMMay 10
to earthwo...@googlegroups.com
Update,
The TTL to RS232 has now arrived in the post, this will convert the ttl levels from the Pi serial port on the 40 way header . The PS2400 digitizer will then communicate with the Pi . 
 As stated previously I have not done much in the way of installing software on the Pi but I can follow instructions as I did to install EW.
  
Would it be possible for El Berto to to write a short instruction on how to install the test software you have so kindly developed. Many thanks. 

Jonathan

unread,
May 10, 2021, 3:14:16 PMMay 10
to earthwo...@googlegroups.com
Steve,

Keep in mind, to use the serial port on the 40 pin header, you need to disable the console, as the console outputs to that TTY. There also are no hardware flow control pins either. 

You can also try a USB <> RS232 adapter that is FTDI based. I have had good like with those.

Jonathan

Steve Shuff

unread,
May 10, 2021, 3:36:53 PMMay 10
to earthwo...@googlegroups.com
Jonathan, 
Many thanks,  
I would prefer to use a usb to serial if I can find a driver for mine, or buy one with a driver that suits the purpose . I have a spare Pi to install EW onto , which will be sometime this week. Hopefully CRS engineering will post an idiot guide for me to follow regarding installing his test software. 

Jonathan

unread,
May 10, 2021, 8:04:22 PMMay 10
to earthwo...@googlegroups.com
Hi Steve,

Most Linux for the Pi already includes drivers for most USB <> RS232
adapters, especially if they are FTDI based. Plug it in and see if you get
a new TTY.

Jonathan

On Mon, 10 May 2021, Steve Shuff wrote:

> Date: Mon, 10 May 2021 20:36:40 +0100
> From: Steve Shuff <steves...@gmail.com>
> Reply-To: earthwo...@googlegroups.com
> To: earthwo...@googlegroups.com
> Subject: Re: [EXTERNAL] Re: [Earthworm Forum] Re: Serial data aquasition on
> the Raspberry Pi
>>> * This email has been received from outside of DOI - Use caution before
>>> clicking on links, opening attachments, or responding. *
>>>
>>>
>>>
>>> Also, USB to serial would require the correct driver, which sometimes is
>>> not always easy to find for the Pi .
>>>
>>> On Thu, 6 May 2021, 16:01 Steve Shuff, <steves...@gmail.com> wrote:
>>>
>>>> Hi, yes sorry should have pointed that out in my post. You would
>>>> definitely need a max3232 level shifter. Usb to serial converter would be
>>>> much neater anyway , so will check that out. Thanks.
>>>>
>>>> On Thu, 6 May 2021, 15:57 El Berto, <ra.crs....@gmail.com> wrote:
>>>>
>>>>> Digitizers with serial port usually work in RS-232 not in serial, so
>>>>> you can't directly connect to Raspberry due to voltage levels.
>>>>> Easiest way is usb to RS-232 converter:
>>>>>
>>>>> https://www.distrelec.biz/en/usb-to-serial-rs232-converter-aten-uc232a/p/12519009
>>>>> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.distrelec.biz%2Fen%2Fusb-to-serial-rs232-converter-aten-uc232a%2Fp%2F12519009&data=04%7C01%7Cbaker%40usgs.gov%7C3303c04b12cd4ea1ee6f08d910a065c9%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637559103358236994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E27S02jkExEbiEMNxOLx2RoO9KGxNFA1Yn5RY1R8nrw%3D&reserved=0>
>>>>>
>>>>> Both serial port Pi hat and GPIO pins on header work only at TTL with
>>>>> 3.3 Volt.
>>>>>
>>>>> Il giorno gioved? 6 maggio 2021 alle 10:48:30 UTC+2 cellectronic ha
>>>>> scritto:
>>>>>
>>>>>> Hello members,
>>>>>> For those of you that use EW on the Pi along with a serial digitizer .
>>>>>>
>>>>>> How are you connecting the serial digitizer onto the PI ?
>>>>>> I see a couple of options ,
>>>>>> 1, purchase a serial port Pi hat.
>>>>>> 2, utilise the TX RX GPIO pins on the 40 way header.
>>>>>>
>>>>>> Any info greatly appreciated
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Earthworm Community Forum" group.
>>>>>
>>>>> To post to this group, send an email to
>>>>> earthwo...@googlegroups.com
>>>>>
>>>>> To unsubscribe from this group, send an email to
>>>>> earthworm_for...@googlegroups.com
>>>>>
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/earthworm_forum?hl=en
>>>>> <https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fearthworm_forum%3Fhl%3Den&data=04%7C01%7Cbaker%40usgs.gov%7C3303c04b12cd4ea1ee6f08d910a065c9%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637559103358236994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XotlhR8Tm2pzCJkfpM9s15IOEVUQnat1rHeOeQ%2Fs5VA%3D&reserved=0>
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "Earthworm Community Forum" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/earthworm_forum/8Tj3KkUfeIc/unsubscribe
>>>>> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Ftopic%2Fearthworm_forum%2F8Tj3KkUfeIc%2Funsubscribe&data=04%7C01%7Cbaker%40usgs.gov%7C3303c04b12cd4ea1ee6f08d910a065c9%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637559103358246950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ugT%2BgUb18RW6tzrNX5baIhBpVSsd0X7wi4kAGEYZGs0%3D&reserved=0>
>>>>> .
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> earthworm_for...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/earthworm_forum/a3b22b6a-5aa3-4ec0-b939-582d19e46af4n%40googlegroups.com
>>>>> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fearthworm_forum%2Fa3b22b6a-5aa3-4ec0-b939-582d19e46af4n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Cbaker%40usgs.gov%7C3303c04b12cd4ea1ee6f08d910a065c9%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637559103358246950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zMLMVxfjKxGz6vEUzjc0gIydYkQfQtzUIOxCV21fVAA%3D&reserved=0>
>>>>> .
>>>>>
>>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Earthworm Community Forum" group.
>>>
>>> To post to this group, send an email to earthwo...@googlegroups.com
>>>
>>> To unsubscribe from this group, send an email to
>>> earthworm_for...@googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/group/earthworm_forum?hl=en
>>> <https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fearthworm_forum%3Fhl%3Den&data=04%7C01%7Cbaker%40usgs.gov%7C3303c04b12cd4ea1ee6f08d910a065c9%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637559103358246950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OrNTZ8MwhNxL1ADao%2B3cpW%2BR1PwOHouoXdPcr9uhqkQ%3D&reserved=0>
>>>
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Earthworm Community Forum" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to earthworm_for...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/earthworm_forum/CADNpUBFjHy0-oJF_VuAPyXSb6LRSbyJh26Gznn23KFBwpKeXTQ%40mail.gmail.com
>>> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fearthworm_forum%2FCADNpUBFjHy0-oJF_VuAPyXSb6LRSbyJh26Gznn23KFBwpKeXTQ%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Cbaker%40usgs.gov%7C3303c04b12cd4ea1ee6f08d910a065c9%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637559103358256884%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=e4mi8EbLHKopcRqvCtQAFHFuIWKr1pYh8T2LsVF4v3I%3D&reserved=0>
>>> .
>>>
>>>
>>>
>>>
>>> Larry Baker
>>> US Geological Survey
>>> 650-329-5608
>>> ba...@usgs.gov
>>>
>>>
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Earthworm Community Forum" group.
>>>
>>> To post to this group, send an email to earthwo...@googlegroups.com
>>>
>>> To unsubscribe from this group, send an email to
>>> earthworm_for...@googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/group/earthworm_forum?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Earthworm Community Forum" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to earthworm_for...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/earthworm_forum/B1B03AB8-6941-4282-9E61-2D929AC0B592%40usgs.gov
>>> <https://groups.google.com/d/msgid/earthworm_forum/B1B03AB8-6941-4282-9E61-2D929AC0B592%40usgs.gov?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Earthworm Community Forum" group.
>>
>> To post to this group, send an email to earthwo...@googlegroups.com
>>
>> To unsubscribe from this group, send an email to
>> earthworm_for...@googlegroups.com
>>
>> For more options, visit this group at
>> http://groups.google.com/group/earthworm_forum?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Earthworm Community Forum" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to earthworm_for...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/earthworm_forum/CADNpUBFqkPzr4XPmp9TUgEvbPhQ7k-Zj_dFocezfnd1abheC0w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/earthworm_forum/CADNpUBFqkPzr4XPmp9TUgEvbPhQ7k-Zj_dFocezfnd1abheC0w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Earthworm Community Forum" group.
>>
>> To post to this group, send an email to earthwo...@googlegroups.com
>>
>> To unsubscribe from this group, send an email to
>> earthworm_for...@googlegroups.com
>>
>> For more options, visit this group at
>> http://groups.google.com/group/earthworm_forum?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Earthworm Community Forum" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to earthworm_for...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/earthworm_forum/0CBF5166-D2EA-4B8C-B205-E32A7ED7F0F1%40gmail.com
>> <https://groups.google.com/d/msgid/earthworm_forum/0CBF5166-D2EA-4B8C-B205-E32A7ED7F0F1%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
>
> To post to this group, send an email to earthwo...@googlegroups.com
>
> To unsubscribe from this group, send an email to
> earthworm_for...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/earthworm_forum?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Earthworm Community Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to earthworm_for...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/earthworm_forum/CADNpUBEWMdZjCEQGtYjB0%3Du%3DHJAEmz06TxeHfgGEo%2BTZiN6jDQ%40mail.gmail.com.
>

hausguriadas

unread,
May 10, 2021, 8:15:23 PMMay 10
to earthwo...@googlegroups.com
Hello,

Our organisation is a Windows-based EW user. I am only a user. In concurrence with Jonathan, we use the FTDI USB - Serial driver and it works well.

Ima Itikarai



Sent from my SAMSUNG Galaxy Note5

-------- Original message --------
From: Steve Shuff <steves...@gmail.com>
Date: 11/5/21 5:36 am (GMT+10:00)
Subject: Re: [EXTERNAL] Re: [Earthworm Forum] Re: Serial data aquasition on the Raspberry Pi

Steve Shuff

unread,
May 11, 2021, 2:43:03 AMMay 11
to earthwo...@googlegroups.com
Things have moved on then , I remember when I tried Linux years ago getting the drivers were a real pain. I will give it a go later, thanks for the info. 

El Berto

unread,
May 11, 2021, 5:06:29 PMMay 11
to Earthworm Community Forum
Nowdays it's quite hard find usb-serial adapter not supported by Raspberry....

Steve Shuff

unread,
May 12, 2021, 2:48:18 AMMay 12
to earthwo...@googlegroups.com
Ok, have a working usb/serial adapter now.
Regarding the  test aquasition software you wrote,  have you an installation guide available ie where do the various files go etc, thanks. 


To unsubscribe from this group and all its topics, send an email to earthworm_for...@googlegroups.com.

El Berto

unread,
May 12, 2021, 10:03:28 AMMay 12
to Earthworm Community Forum
Do you already have Earthworm installed? I have 7.8.
I'll give you different code (I found a damaged PR6, serial protocol is quite similar to 2400, just I can't get it fully working due I'm still trying to solve timing issues).

Steve Shuff

unread,
May 12, 2021, 11:16:29 AMMay 12
to earthwo...@googlegroups.com
Hi, I have EW 7.7 installed and running on a Pi...I am in process of installing EW on another  Pi for test purposes. 

Baker, Lawrence M

unread,
May 12, 2021, 12:37:29 PMMay 12
to 'Meremonte, Mark E' via Earthworm Community Forum, Baker, Lawrence M
You should really update anything running on an ARM processor to a newer version of Earthworm.  There are build procedures for ARM processors, and many bug fixes since the versions you are using.

Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov


Steve Shuff

unread,
May 12, 2021, 2:00:52 PMMay 12
to earthwo...@googlegroups.com
Larry,
many thanks for your input and it is much appreciated, I will try to install the latest version of EW on the test Pi, then all being well update and run the main  system with the latest version.  Best regards. 

rpujols05

unread,
May 13, 2021, 10:56:52 AMMay 13
to earthwo...@googlegroups.com
Hola,

My opinion is easy to configure. You just need to be patient.

Please document your results.

Thank you





Sent from my Galaxy

cellectronic

unread,
May 19, 2021, 5:11:16 AMMay 19
to Earthworm Community Forum
Hi All,
I now have EW 7.10 running on a Raspberry Pi 3B with the latest Raspberry OS installed.
Some strange occurance is happening with the  Heli_ewII  as it refuses to generate the HTML file, 
My workaround was to copy and paste the text from my (Heli_ewII.d)  V7.3 version into the new installation and run it at that for now.

I rather suspect I have a typo somewhere which is eluding me , this I will confirm in the very near future.

Mr El Berto , How are you progressing with the PS2400 module ?

Regards.

El Berto

unread,
May 23, 2021, 3:18:31 PMMay 23
to Earthworm Community Forum
I'm blocked on timing from PS2400, I'm waiting for factory response about misleadings on serial protocol.

Steve Shuff

unread,
May 23, 2021, 3:30:10 PMMay 23
to earthwo...@googlegroups.com
Hi, 
Have you spoke to Tony Russel at Earth Data ?
He is a excellent guy for information.  I can mail him if required, I have dealt with him for over 15 years.

Regards. 


To unsubscribe from this group and all its topics, send an email to earthworm_for...@googlegroups.com.

El Berto

unread,
May 26, 2021, 2:21:14 PMMay 26
to Earthworm Community Forum
Solved: yesterday I was writing code to send you logs about timing issue, I discovered a bug in my data structures, now I can correctly read timing from incoming packets.
I just have to write serial port management and embed EW part...

Steve Shuff

unread,
May 26, 2021, 5:36:20 PMMay 26
to earthwo...@googlegroups.com
Thats great news,  I look forward to getting it up and running,  I have installed the latest version of EW on the Pi and its running fine.   Kind regards. 

El Berto

unread,
Jun 1, 2021, 7:57:06 PMJun 1
to Earthworm Community Forum
Take a look here:

It's just a test for serial interface, let me know if it works so I'll upgrade to EW.

Steve Shuff

unread,
Jun 2, 2021, 1:19:12 PMJun 2
to earthwo...@googlegroups.com
Ok, Just looking at this and all seems ok until I get the the compiling when I get this 

pi@raspberrypi:~/ew/earthworm_7.10/src/data_sources/edata2ew $ make -f makefile.unix
cc  -Wno-implicit-int   -Wno-unused-variable   -Wno-format-contains-nul -g   -c -o edata2ew.o edata2ew.c
edata2ew.c:65:10: fatal error: earthworm.h: No such file or directory
 #include <earthworm.h>
          ^~~~~~~~~~~~~

Where is the earthworm.h supposed to reside  ?
Or where is the compiler looking for it ??

Thanks .

Virus-free. www.avg.com



--
Steve Shuff.

Virus-free. www.avg.com

Steve Shuff

unread,
Jun 2, 2021, 2:18:06 PMJun 2
to earthwo...@googlegroups.com
20210602_185453.jpg
For the purposes of additional information I have attached a screenshot. 
You can see my EW is run from the run/params directory .. it works but am not sure as its the best way to do it. 


Virus-free. www.avg.com

On Wed, Jun 2, 2021 at 7:00 PM Steve Shuff <steves...@gmail.com> wrote:
For the purposes of additional information I have attached a screenshot. 
You can see my EW is run from the run/params directory .. it works but am not sure as its the best way to do it. 


--
Steve Shuff.

El Berto

unread,
Jun 3, 2021, 3:49:29 AMJun 3
to Earthworm Community Forum
Something wrong with environment, earthworm.h (and other many) are placed in home/pi/ew/earthworm_x.y/include.

pi@raspberrypi:~ $ echo $GLOBALFLAGS
-g -pthread -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-pragmas -Wformat -Wdeclaration-after-statement -D_LINUX -Dlinux -D_INTEL -D_USE_SCHED -D_USE_PTHREADS -D_USE_TERMIOS -D_FILE_OFFSET_BITS=64 -I/home/pi/ew/earthworm_7.10/include


take care to "-I/home/pi/ew/earthworm_7.10/include"
Probably some issue with your bashrc.

Pay attention to your ew_linux.bash in ew/run/params/ and in ew/earthworm_7.10/environment/:

export GLOBALFLAGS="-fno-stack-protector -Dlinux -D__i386 -D_LINUX -D_INTEL -D_USE_SCHED  -D_USE_PTHREADS -D_USE_TERMIOS -I${EW_HOME}/${EW_VERSION}/include"

Both ew_linux.bash files have to be the same.

Check in your ~/.bashrc, at the end of file:

source /home/pi/ew/earthworm_7.10/environment/ew_linux.bash

Then

source ew/run/params/ew_linux.bash
source ~/.bashrc

Now check again command echo $EW_GLOBALFLAGS.

Steve Shuff

unread,
Jun 3, 2021, 4:00:05 AMJun 3
to earthwo...@googlegroups.com
Looks like some useful information there, thanks for sharing. 
I will check it over tonight. 

Steve Shuff

unread,
Jun 3, 2021, 5:15:42 PMJun 3
to earthwo...@googlegroups.com
Ok,
 I have looked at the ew_linux.bash in both locations and they look the same .
The bashrc is eluding me !  where should that reside ?
Attached are 2 files ew_linux.bash and ew_linux_arm.bash
If you could be so kind as to check them over in case they configured wrong.

Best regards


Virus-free. www.avg.com
--
Steve Shuff.
ew_linux_arm.bash
ew_linux (2).bash

El Berto

unread,
Jun 4, 2021, 3:50:53 AMJun 4
to Earthworm Community Forum
Here bashrc:

pi@raspberrypi:~ $ cat ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
[...]
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

# added for Earthworm
source /home/pi/ew/earthworm_7.10/environment/ew_linux.bash


I loaded your ew_linux.bash on my Pi and it correctly works, so I think you can focus on your bashrc.

Steve Shuff

unread,
Jun 7, 2021, 4:47:49 AMJun 7
to earthwo...@googlegroups.com
UPDATE

Having found some time over the weekend to pursue the project , I can confirm my Bashrc file was not as it should be  .
That sorted, the Edata2EW compiled with no errors and it is running on the PI and using Sniff-wave I can see the packets of information.
Tonight , all being well I will configure the Heli module to display the traces .
Thanks for your efforts so far.

Best regards



--
Steve Shuff.

Steve Shuff

unread,
Jun 7, 2021, 1:42:46 PMJun 7
to earthwo...@googlegroups.com
Update 2

Ok I have now configured the heli module but because the PS2400 clock is incorrect I get this error -------

20210607_UTC_17:18:33 WARNING: Tracebuf fails validity check, discarding: <SEAB.HHN.NC.-->
packet start=0.00 end=0.99 nsamp=75 samprate= 75.00 Tank-endtime=0.99. datatype=[i4]
packet's start (1970/01/01 00:00:00.00) is before end of tank's last good packet received time (1970/01/01 00:00:00.99)


I believe there is a module which can fix this  (any info on that would be appreciated).
The log for edata2ew looks like this 

-------------------------------------------------------
edata2ew_tty: startup at UTC_20210607_17:18:30
This program is using the MT-Safe version of logit.
-------------------------------------------------------
edata2ew ver.1.1a

edata2ew: Read command file <edata2ew_tty.d>
serial port /dev/ttyUSB0 (@115200 bit/s) *check sampling frequency and number of channels settings!!!*

Station: NC.SEAB

ch#1 = NC.SEAB.HHE.--

ch#2 = NC.SEAB.HHN.--

ch#3 = NC.SEAB.HHZ.--

edata2ew: Attached to public memory region WAVE_RING: 1000

found device: ED 2400-235

        ver.: V3.00

         S/N: #ÿÿÿÿ

    channels: 3

    sampling rate: 75 SPS (3 bytes/sample)


-------------------------------------------------------

As I understand it the GPS module suffers from the WRNO issue, At some point I will try to feed the PS2400 with a newer gps module to see if the issue can be fixed.
Meanwhile I will look into the time correction  module..

Regards.

Virus-free. www.avg.com
--
Steve Shuff.

El Berto

unread,
Jun 8, 2021, 4:17:48 AMJun 8
to Earthworm Community Forum
I don't remember if WNRO offset is enabled.....
Are you working with DebugLevel 4 in your configuration file?

Steve Shuff

unread,
Jun 8, 2021, 4:29:55 AMJun 8
to earthwo...@googlegroups.com
Hi 
Yes I was using debug on, but now its disabled. 
Regarding the WRNO offset, I did not observe a setting for such. 

El Berto

unread,
Jun 8, 2021, 5:26:01 AMJun 8
to Earthworm Community Forum
Download this:
I added WNRO option in configuration file (to enable/disable), then debug print of PLL value (to understand when GPS locks).
Enable debug level to 4, you should get something similar:



found MOD packet (192 bytes) ...
found DATA packet...
found SUM packet...
let's check checksum...
checksum pass!
            components: 3
            100 SPS, 3 bytes/sample
block timestamp (from MOD.ltime): 3150877173 seconds
PLL value: 28773
2069Nov 5 1139 33.00 UTC
900 samples on current block (@300 SPS)...
sending trace SEAB.HHE.NC.-- (100) [3150877173.000 --> 3150877173.990]
    ...success!
sending trace SEAB.HHN.NC.-- (100) [3150877173.000 --> 3150877173.990]
    ...success!
sending trace SEAB.HHZ.NC.-- (100) [3150877173.000 --> 3150877173.990]
    ...success!
found MOD packet (192 bytes) ...
found DATA packet...
found SUM packet...
let's check checksum...
checksum pass!
block timestamp (from MOD.ltime): 3150877174 seconds
PLL value: 28773
2069Nov 5 1139 34.00 UTC
900 samples on current block (@300 SPS)...
sending trace SEAB.HHE.NC.-- (100) [3150877174.000 --> 3150877174.990]
    ...success!
sending trace SEAB.HHN.NC.-- (100) [3150877174.000 --> 3150877174.990]
    ...success!
sending trace SEAB.HHZ.NC.-- (100) [3150877174.000 --> 3150877174.990]
    ...success!
found MOD packet (192 bytes) ...
found DATA packet...
found SUM packet...
let's check checksum...

Steve Shuff

unread,
Jun 8, 2021, 5:30:46 AMJun 8
to earthwo...@googlegroups.com
Ok, will try it out tonight. 
Thanks. 

El Berto

unread,
Jun 8, 2021, 6:37:37 AMJun 8
to Earthworm Community Forum
WNRO offset was enabled by default in source code in previous version (now enabled/disabled by configuration file) but there should be mismatchings due to different GPS firmware....

Steve Shuff

unread,
Jun 8, 2021, 6:42:59 AMJun 8
to earthwo...@googlegroups.com
Its also possible my GPS on the digitizer didn't have a lock. 
I have trees in the way so I'll have to move gps. . 

El Berto

unread,
Jun 8, 2021, 7:59:43 AMJun 8
to Earthworm Community Forum
That's why in debuglevel 4 it's shown PLL value.

Steve Shuff

unread,
Jun 8, 2021, 8:47:14 AMJun 8
to earthwo...@googlegroups.com
Ahh, 
I see now, thanks for the info.
Will check it later. 

Steve Shuff

unread,
Jun 9, 2021, 3:31:42 AMJun 9
to earthwo...@googlegroups.com
Hello

The edata2ew module is now the latest version and 
having established that the GPS is now reporting a locked status , the debug reads .

packet's start (1970/01/01 00:00:00.00) is before end of tank's last good packet received timtfound MOD packet (192 bytes) ...
found DATA packet...
found SUM packet...
let's check checksum...
checksum pass!
block timestamp (from MOD.ltime): 0 seconds
PLL value: 1
1970Jan 1    0  0.00 UTC
675 samples on current block (@225 SPS)...
sending trace SEAB.HHE.NC.-- (75) [0.000 --> 0.987]
...success!
sending trace SEAB.HHN.NC.-- (75) [0.000 --> 0.987]
...success!
sending trace SEAB.HHZ.NC.-- (75) [0.000 --> 0.987]
...success!
20210608_UTC_21:15:20 WARNING: Tracebuf fails validity check, discarding: <SEAB.HHE.NC.-->

packet start=0.00 end=0.99 nsamp=75 samprate= 75.00 Tank-endtime=0.99. datatype=[i4]
packet's start (1970/01/01 00:00:00.00) is before end of tank's last good packet received time (1970/01/01 00:00:00.99)
20210608_UTC_21:15:20 WARNING: Tracebuf fails validity check, discarding: <SEAB.HHN.NC.-->

packet start=0.00 end=0.99 nsamp=75 samprate= 75.00 Tank-endtime=0.99. datatype=[i4]
packet's start (1970/01/01 00:00:00.00) is before end of tank's last good packet received time (1970/01/01 00:00:00.99)
20210608_UTC_21:15:20 WARNING: Tracebuf fails validity check, discarding: <SEAB.HHZ.NC.-->
packet start=0.00 end=0.99 nsamp=75 samprate= 75.00 Tank-endtime=0.99. datatype=[i4]e (1970/01/01 00:00:00.99)

Note the validity check is still failing , if there is a software fix for this then great , alternatively I could experiment with a different GPS module.
The GPS unit currently attached to the PS2400 is the Garmin GPS-35 (looks like a PC mouse).

Kind regards 
--
Steve Shuff.

El Berto

unread,
Jun 9, 2021, 3:43:39 AMJun 9
to Earthworm Community Forum
Ok, let's do this:
1) remove edata2ew from startstop_unix.d in this way
#
# Process    "edata2ew edata2ew_tty.d"
# Class/Priority    OTHER 0
#


2) start Earthworm using startstop

3) in a different console go to /ew/run/params
4) start edata apart using command:
edata2ew edata2ew_tty.d

5) give me about 10 seconds of log of edata2ew

How long does digitizer has been switched on before starting Earthworm?
It's very strange get ltime= 0 and PLL value 1...... usually ltime increases by one every packet sent (so every second).

Steve Shuff

unread,
Jun 9, 2021, 3:58:45 AMJun 9
to earthwo...@googlegroups.com
Ok, I will get on it later today. 

Thanks. 

Steve Shuff

unread,
Jun 10, 2021, 12:13:06 PMJun 10
to earthwo...@googlegroups.com
OK, 
installed the new version and attached the debug screen and also the log file .
The PS2400 has been on for approx an hour and I can confirm the GPS is locked.
Hope this helps


Virus-free. www.avg.com



--
Steve Shuff.
El Berto.txt
El Bert0 2.txt

Steve Shuff

unread,
Jun 10, 2021, 12:21:04 PMJun 10
to earthwo...@googlegroups.com
Also noted was this line ,, Not sure if its relevant..

d configuration file...
.d file <edata2ew.d> for desc file <edata2ew.desc> doesn't existEdata2EW configuration:
sw. ver.: 1.2a




Virus-free. www.avg.com
--
Steve Shuff.

El Berto

unread,
Jun 10, 2021, 12:42:19 PMJun 10
to Earthworm Community Forum
Mmh.. no.
Still something wrong reading time.
I'll increase debug level and I'll make available new version.

El Berto

unread,
Jun 10, 2021, 1:20:33 PMJun 10
to Earthworm Community Forum
Download:
http://crsengineering.altervista.org/ew/earthdata/edata2ew/edata2ew_v_1_2b.tar.gz

Update debug level to 6 in .d configuration file.
Uncomment #define standalone if commented (line 97 of edata2ew.c).
make -f makefile.unix

Run module, it should show:


pi@raspberrypi:~/ew/earthworm_7.10/src/data_sources/edata2ew $ edata2ew edata2ew_tty.d
[edata2ew] Read configuration file...
Edata2EW configuration:
    sw. ver.: 1.2b
    serial port: /dev/ttyUSB0
    bitrate: 115200 [bit/s]
    station code: SEAB
    station network: NC

found MOD packet (192 bytes) ...
found DATA packet...
found SUM packet...
let's check checksum...
checksum pass!
            components: 3
            100 SPS, 4 bytes/sample
MOD block #2025
          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
0000 4D 4F 44 00 B8 00 00 00 45 44 20 32 34 30 30 2D  MOD.....ED.2400-
0010 32 37 30 20 56 30 32 2E 32 36 20 31 31 31 34 20  270.V02.26.1114.
0020 22 22 00 55 55 00 FF FF E9 07 00 00 03 00 2C 01  "".UU.........,.
0030 04 00 4C 50 06 00 05 00 05 00 47 30 3C 67 3D 22  ..LP......G0<g="
0040 3F 19 3B 22 3D F8 40 22 EB E0 01 00 7E 02 02 00  ?.;"=.@"....~...
0050 15 60 01 00 46 08 D6 03 65 03 46 08 F6 FF 04 00  .`..F...e.F.....
0060 49 00 53 00 44 43 4E 49 D8 3B 00 00 00 00 00 00  I.S.DCNI.;......
0070 00 00 00 00 E9 07 00 00 0D 0A 3E 52 41 4C 36 32  ..........>RAL62
0080 33 30 33 2D 30 30 30 34 35 2B 30 30 30 30 32 3B  303-00045+00002;
0090 2A 34 31 3C 0D 0A 3E 52 50 56 36 32 33 30 33 2B  *41<..>RPV62303+
00A0 34 36 30 33 36 38 39 2B 30 31 33 32 35 31 38 31  4603689+01325181
00B0 30 30 30 30 30 30 30 32 3B 2A 37 36 3C 0D 0A 3E  00000002;*76<..>
block timestamp (from MOD.ltime): 1004030286 seconds
PLL value: 5
2001Oct25 1718  6.00 UTC
1200 samples on current block (@300 SPS)...
sending trace SEAB.HHE.NC.-- (100) [1004030286.000 --> 1004030286.990]
sending trace SEAB.HHN.NC.-- (100) [1004030286.000 --> 1004030286.990]
sending trace SEAB.HHZ.NC.-- (100) [1004030286.000 --> 1004030286.990]

found MOD packet (192 bytes) ...
found DATA packet...
found SUM packet...
let's check checksum...
checksum pass!
MOD block #2026
          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
0000 4D 4F 44 00 B8 00 00 00 45 44 20 32 34 30 30 2D  MOD.....ED.2400-
0010 32 37 30 20 56 30 32 2E 32 36 20 31 31 31 34 20  270.V02.26.1114.
0020 22 22 00 55 55 00 FF FF EA 07 00 00 03 00 2C 01  "".UU.........,.
0030 04 00 4C 50 06 00 05 00 FA FF 47 30 3C 67 3D 22  ..LP......G0<g="
0040 3F 19 3B 22 3D F8 40 22 EB E0 01 00 7E 02 02 00  ?.;"=.@"....~...
0050 15 60 01 00 48 08 CA 03 66 03 48 08 F6 FF 04 00  .`..H...f.H.....
0060 49 00 4E 00 44 43 4F 49 D8 3B 00 00 00 00 00 00  I.N.DCOI.;......
0070 00 00 00 00 EA 07 00 00 0D 0A 3E 52 41 4C 36 32  ..........>RAL62
0080 33 30 34 2D 30 30 30 34 35 2B 30 30 30 30 32 3B  304-00045+00002;
0090 2A 34 36 3C 0D 0A 3E 52 50 56 36 32 33 30 34 2B  *46<..>RPV62304+
00A0 34 36 30 33 36 38 39 2B 30 31 33 32 35 31 38 31  4603689+01325181
00B0 30 30 30 30 30 30 30 32 3B 2A 37 31 3C 0D 0A 3E  00000002;*71<..>
block timestamp (from MOD.ltime): 1004030287 seconds
PLL value: -6
2001Oct25 1718  7.00 UTC
1200 samples on current block (@300 SPS)...
sending trace SEAB.HHE.NC.-- (100) [1004030287.000 --> 1004030287.990]
sending trace SEAB.HHN.NC.-- (100) [1004030287.000 --> 1004030287.990]
sending trace SEAB.HHZ.NC.-- (100) [1004030287.000 --> 1004030287.990]


First of all take care MOD block # will increase value.
Then post output log, I'll check for mistakes....




El Berto

unread,
Jun 10, 2021, 1:22:33 PMJun 10
to Earthworm Community Forum
I'm working on firmware 2.26 while your is 3.00.....

Steve Shuff

unread,
Jun 10, 2021, 2:53:27 PMJun 10
to earthwo...@googlegroups.com
ok, 
here is the log.
it would not compile with line 96 commented out it had to have the # at the start 

Virus-free. www.avg.com



--
Steve Shuff.
Debug6.txt

Steve Shuff

unread,
Jun 10, 2021, 2:58:05 PMJun 10
to earthwo...@googlegroups.com
Sorry I meant this line ,,
Uncomment #define standalone if commented (line 97 of edata2ew.c).

I had to have it commented in order to compile 


Virus-free. www.avg.com
--
Steve Shuff.

El Berto

unread,
Jun 10, 2021, 4:31:13 PMJun 10
to Earthworm Community Forum
Little misunderstand, in C line commented is:

//#define standalone

while uncommented is:

#define standalone

Could you give me more debug blocks?
It looks like timestamp is not present in epoch format in ltime field but in GPS field directly in UTC, I suppose due to different firmware version or GPS protocol.
Taking a look to your GPS field (unfortunately visible only at first block, so I'm not sure) it seems data has been taken at 18:49:46 UTC, 25 Oct 2001 (10 June 2021 at 18:49:46 taking care of rollover), but flag A on RMC NMEA tell's me fix should be ok.
If so I could update software for NMEA detection...

Steve Shuff

unread,
Jun 11, 2021, 3:47:07 AMJun 11
to earthwo...@googlegroups.com
Hello,

Yes I will send more debug info later today

Also, The PS2400 can be configured using software called "Modmon",
 this software shows the GPS data coming in and I could send you a screenshot for that data if it helps.

Kind regards.