Setup with EMREAD/BTMON Problem

Post any 3rd party software here.
JakeTri
Posts: 5
Joined: Fri May 02, 2014 11:01 pm

Re: Setup with EMREAD/BTMON Problem

Post by JakeTri » Fri May 02, 2014 11:05 pm

I hit same issue and eventually I got btmon.py working by commenting out line 2299 from the script:

Code: Select all

dbgmsg('SOCKET: read %d bytes from socket' % nbytes)
mwall
Posts: 140
Joined: Wed Dec 07, 2011 6:25 pm

Re: Setup with EMREAD/BTMON Problem

Post by mwall » Sat May 03, 2014 6:20 am

JakeTri wrote:I hit same issue and eventually I got btmon.py working by commenting out line 2299 from the script:

Code: Select all

dbgmsg('SOCKET: read %d bytes from socket' % nbytes)
thank you Jake!

instead of commenting, try changing the %d to %s:

Code: Select all

dbgmsg('SOCKET: read %s bytes from socket' % nbytes)
btmon expects nbytes to be an integer value. when nbytes is something else, the %d formatting fails. using a %s for the format is more permissive and will handle any type.

commenting the line simply masks any problem, and i would prefer to fix them :) my guess is that somehow nbytes is None instead of an integer value.

m
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Setup with EMREAD/BTMON Problem

Post by ben » Mon May 05, 2014 10:50 am

It could be a keep-alive byte causing issues.

If real-time is stopped on the ECM-1240, it'll send a keep-alive byte (null character).

Ben
Ben
Brultech Research Inc.
E: ben(at)brultech.com
robermax
Posts: 27
Joined: Tue Jul 13, 2010 11:50 am

Re: Setup with EMREAD/BTMON Problem

Post by robermax » Mon May 05, 2014 11:26 am

Hi again
Here is a SS with Brultech Etherbee set to client. I changed the variable in btmon to %s.
robermax
Attachments
BTmon s change.jpg
BTmon s change.jpg (126.14 KiB) Viewed 3339 times
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Setup with EMREAD/BTMON Problem

Post by ben » Mon May 05, 2014 12:42 pm

robermax wrote:Hi again
Here is a SS with Brultech Etherbee set to client. I changed the variable in btmon to %s.
robermax
Definitely the keep-alive there. Go into the Interface Application software, Xbee Commands section, and click "Start ECM-1240 Real-Time".

Ben
Ben
Brultech Research Inc.
E: ben(at)brultech.com
robermax
Posts: 27
Joined: Tue Jul 13, 2010 11:50 am

Re: Setup with EMREAD/BTMON Problem

Post by robermax » Mon May 05, 2014 1:32 pm

Working!
Thanks Ben and mwall.
robermax
Posts: 27
Joined: Tue Jul 13, 2010 11:50 am

Re: Setup with EMREAD/BTMON Problem

Post by robermax » Fri May 09, 2014 8:05 pm

I think I'm getting closer. Want to upload to SEG.
Here is my config.sys:

[source]
device_type = ecm1240
ip_read = true
ip_port = 6000
ip_mode = server
[seg]
smartenergygroups_out = true
seg_upload_period = 20
seg_token = /////////////

Here is output:
No IP.jpg
No IP.jpg (63.2 KiB) Viewed 3324 times
Shouldn't "ip_read = true" specify the data source? Like --ip in command line?

Robermax
mwall
Posts: 140
Joined: Wed Dec 07, 2011 6:25 pm

Re: Setup with EMREAD/BTMON Problem

Post by mwall » Sat May 10, 2014 7:00 pm

robermax wrote:Shouldn't "ip_read = true" specify the data source? Like --ip in command line?
yes, it should.

try adding --ip to the command line but still specify the configuration file. see if the other options in the configuration file are loaded properly...

m
robermax
Posts: 27
Joined: Tue Jul 13, 2010 11:50 am

Re: Setup with EMREAD/BTMON Problem

Post by robermax » Sun May 11, 2014 8:10 am

Thanks
For some reason it is working now with no changes made. Now to get it to run on the NAS.
robermax
JWHardesty
Posts: 27
Joined: Mon Jun 07, 2010 1:12 pm

Re: Setup with EMREAD/BTMON Problem

Post by JWHardesty » Sun Jun 29, 2014 11:54 am

I have been following this thread because I am also having trouble getting btmon working. I am using btmon 3.0.7 and python 2.7.7.

I have 2 ecm 1240's that have been collecting data for a couple of years using the Engine G from the Etherbee on port 8083. I want to be able to send my data to SEG but first I need to get btmon to see some data.

I am forwarding packets from IA to 127.0.0.1 on port 5000 and IA indicates the port is connected.
When I try to run
btmon.py --ip --ip-mode=server --ip-port 5000 --debug --print
a dos window opens then quickly closes.
If I go to IA and disable the Forward Data, btmon will open and connect to the port and wait for data.
If I then go back to end enable IA Forward Data, it fails with the error - "Waiting 4 minutes for port to become available"

I also tried
btmon.py --ip --ip-mode=client --ip-host 127.0.0.1 --ip-port 5000 --debug --print
but get "Target machine actively refused it"
Jonathan
Post Reply