Comments (5)
I'm not sure what's happening here. Your AIS packet is view as an alarm packet. This should never happen !!!
The data.valid=''" you add does not hurt, but it should not solve the issue.
The call must be originated from _TcpClient line 167 the question is how your data.cmd may have a value different from TrackerCmd.GetFrom.LOGIN or TrackerCmd.GetFrom.TRACKER as it is the two only value set into AisTcpFeed.
Nevertheless one thing is WRONG in lib/TcpClient at line:164. Case value should be "SPEEDON" and not "SPEED_ON". Because of the '' the value is undefined. Under Linux the error does not hurt but we may have a different comportment on Windows.
CONCLUSION: Could you remove the "_" and write ""SPEEDON", hopefully this is the issue. If it still fails place a breakpoint in _TcpClient:164 and check for "data" value. If you do not know how to operate "nodejs" source debugger, then place console.log before the call to UpdateAlarmDev.
Thank you for your support in debuging my code on Windows. I did not expect to many side effect when moving node.js from Linux to M$.
from geogate.
Just fixing SPEEDON still gives following error
c:\ggserverorig2\node_modules\ggserver>node bin/GeoGateServer.js --debug=9 --con
fig=OrigMySqlDb
Adapter: AisTcpFeed Registered file=c:\ggserverorig2\node_modules\ggserver\lib/.
./adapters/AisTcpFeed-adapter.js
Adapter: Gps103Tk102 Registered file=c:\ggserverorig2\node_modules\ggserver\lib/
../adapters/Gps103Tk102-adapter.js
Adapter: GtcGprmcDroid Registered file=c:\ggserverorig2\node_modules\ggserver\li
b/../adapters/GtcGprmcDroid-adapter.js
Adapter: HttpAjax Registered file=c:\ggserverorig2\node_modules\ggserver\lib/../
adapters/HttpAjax-adapter.js
Adapter: NmeaTcpFeed Registered file=c:\ggserverorig2\node_modules\ggserver\lib/
../adapters/NmeaTcpFeed-adapter.js
Adapter: TelnetConsole Registered file=c:\ggserverorig2\node_modules\ggserver\li
b/../adapters/TelnetConsole-adapter.js
Adapter: WebSockTraffic Registered file=c:\ggserverorig2\node_modules\ggserver\l
ib/../adapters/WebSockTraffic-adapter.js
Backend: Dummy Registered file: c:\ggserverorig2\node_modules\ggserver\lib/../ba
ckends/Dummy-backend.js
Backend: MongoDB Registered file: c:\ggserverorig2\node_modules\ggserver\lib/../
backends/MongoDB-backend.js
Backend: MySqlDb Registered file: c:\ggserverorig2\node_modules\ggserver\lib/../
backends/MySqlDb-backend.js
Config: DummyBackend Registered file: c:\ggserverorig2\node_modules\ggserver\lib
/../config/DummyBackend-config.js
Config: MongoDb Registered file: c:\ggserverorig2\node_modules\ggserver\lib/../c
onfig/MongoDb-config.js
Config: MySqlDb Registered file: c:\ggserverorig2\node_modules\ggserver\lib/../c
onfig/MySqlDb-config.js
Config: OrigMySqlDb Registered file: c:\ggserverorig2\node_modules\ggserver\lib/
../config/OrigMySqlDb-config.js
Gateway Start: DummyDemo
-- 4 [no trace] -- "MySQL creating connection [mysql:ggserver@localhost/ggserver
]"
-- 1 [DevAdapter] -- "adapter:telnet//4000"
-1- HttpAjax-adapter.js/DevAdapter:69 [adapter:httpdajax//4080 rootdir=c:\ggserv
erorig2\node_modules\www]
-- 1 [DevAdapter] -- "DevAdapter: adapter:[email protected]:8800"
-- 3 [TcpSvrListenOk] -- "TcpServer [TcpServer://TelnetConsole:4000] listening"
-- 3 [TcpSvrListenOk] -- "TcpServer [HttpServer://HttpAjax:4080] listening"
-- 4 [TcpClientConnect] -- "[TcpClient://AisTcpFeed:8800] connected"
-5- MySqlDb-backend.js/null:54 [MySQL Connect Done [mysql:ggserver@localhost/ggs
erver]]
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:0 mmsi:159847387 type:18 [not
logged]"
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:1 mmsi:123456789 type:18 [not
logged]"
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:2 mmsi:159847387 type:18 [not
logged]"
### TcpClient.prototype.ProcessData - data:
{ devid: 159847387,
cmd: 1,
name: undefined,
model: undefined,
call: undefined }
-6- MySqlDb-backend.js/BackendStorage.LoginDev:245 [Login MySQL device:sockclien
t//TcpAis/remote:50.23.126.218:8800 devid=159847387]
-9- MySqlDb-backend.js/null:253 [sqlQuery {"id":3,"devid":"159847387","devname":
"gpsdemodevice2","callsign":"gps2","model":"gpsmodel2","track":"T_159847387","al
arm":"A_159847387","obd":"O_159847387","date":"2015-02-04T14:03:58.000Z"}]
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:3 mmsi:123456789 type:18 [not
logged]"
### TcpClient.prototype.ProcessData - data:
{ devid: 159847387,
lat: 1.38972,
lon: 103.85779333333333,
sog: 51.986944444444454,
cog: 176.20000000000002,
alt: 0,
date: Thu Feb 05 2015 09:38:29 GMT-0600 (Central Standard Time),
cmd: undefined,
count: 6 }
-- 2 [TcpClient.ProcessData] -- "Notice: [sockclient//TcpAis/remote:50.23.126.21
8:8800] Unknown command=[undefined] Ignored"
### TcpClient.prototype.ProcessData - data:
{ devid: 159847387,
lat: 1.3896066666666667,
lon: 103.8578,
sog: 65.88444444444445,
cog: 177.8,
alt: 0,
date: Thu Feb 05 2015 09:38:32 GMT-0600 (Central Standard Time),
cmd: undefined,
count: 7 }
-- 2 [TcpClient.ProcessData] -- "Notice: [sockclient//TcpAis/remote:50.23.126.21
8:8800] Unknown command=[undefined] Ignored"
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:4 mmsi:123456789 type:18 [not
logged]"
### TcpClient.prototype.ProcessData - data:
{ devid: 159847387,
lat: 1.3893816666666667,
lon: 103.85781166666666,
sog: 55.075277777777785,
cog: 174.60000000000002,
alt: 0,
date: Thu Feb 05 2015 09:38:34 GMT-0600 (Central Standard Time),
cmd: undefined,
count: 9 }
-- 2 [TcpClient.ProcessData] -- "Notice: [sockclient//TcpAis/remote:50.23.126.21
8:8800] Unknown command=[undefined] Ignored"
### TcpClient.prototype.ProcessData - data:
{ devid: 159847387,
lat: 1.3891566666666666,
lon: 103.85782333333333,
sog: 70.00222222222223,
cog: 176.70000000000002,
alt: 0,
date: Thu Feb 05 2015 09:38:36 GMT-0600 (Central Standard Time),
cmd: undefined,
count: 10 }
-- 2 [TcpClient.ProcessData] -- "Notice: [sockclient//TcpAis/remote:50.23.126.21
8:8800] Unknown command=[undefined] Ignored"
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:5 mmsi:123456789 type:18 [not
logged]"
### TcpClient.prototype.ProcessData - data:
{ devid: 159847387,
lat: 1.38893,
lon: 103.85783666666667,
sog: 49.41333333333334,
cog: 175.4,
alt: 0,
date: Thu Feb 05 2015 09:38:38 GMT-0600 (Central Standard Time),
cmd: undefined,
count: 12 }
-- 2 [TcpClient.ProcessData] -- "Notice: [sockclient//TcpAis/remote:50.23.126.21
8:8800] Unknown command=[undefined] Ignored"
-- 3 [DevAdapter.ParseLine] -- "Ignoring AIS count:6 mmsi:123456789 type:18 [not
logged]"
^C
I noticed that you use TRACK : 2
in _TrackerCmd.js not TRACKER
thus I suspect typo in AisTcpFeed-adapter is the problem. Also I read trying to insert NaN as values will trigger MySQL errors [https://www.npmjs.com/package/mysql] thus some null/empty value initialization seems required.
Thought a quick screencast may illustrate this better:
http://screencast-o-matic.com/watch/conhDeegi9
from geogate.
As you can see in the debug you have "cmd: undefined" and this should be the error. As command is invalid _TcpClient select the wrong backend option, witch lead to impossible error.
Replacing TRACKER by TRACK should fix this.
from geogate.
Yup, it solves the issue. Will close it :)
from geogate.
Thank you for helping finding this error, that was a real breakdown in the AIS code.
from geogate.
Related Issues (19)
- MySqlDb backend does not store data HOT 32
- How do you send command through GPRS protocol HOT 2
- Ship length HOT 5
- Ais: MMSI as String HOT 6
- CreateDev is never get called HOT 2
- Certain multi line ais do not decode correctly. HOT 14
- How to use ? HOT 1
- Versions 0.1.15 & 0.1.16 on NPM throw a TypeError: Cannot read property 'trim' of undefined HOT 4
- unable to create device in mysql backend HOT 1
- ERR! 404 Not Found: ggsmsg HOT 1
- jison dependency causing problems HOT 9
- Installation readme
- Some AIS feeds have talker IDs other than AI HOT 1
- No support for multipart AIS message decoding HOT 2
- ggencoder with AIVDO to npm HOT 1
- GGsmsc TypeError: undefined is not a function HOT 2
- error SendTo Raw API Usage HOT 9
- How to interpret the decoded AIS data? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geogate.