.init() problem

Hello,

I’ve sucessfully test the helloairvantage and sampleserial scripts on my LS300 (firmware 4.3.6.011).

Now i want to combine the two.

Friday (25-07-2014) i made my first test and i was abble to send my first messages to AVMS.

Today the script fails to pass the initialization phases (devicetree.init() or airvantege.init())

Here is what i get on the execution from Developer Stuio ALEOS console :

/root/aleos/usr/readyagent/bin/lua: /root/aleos/usr/readyagent/lua/sched/init.lua:854: Don't call wait() while not running!
stack traceback:
	/root/aleos/usr/readyagent/lua/sched/init.lua:854: in function 'wait'
	/root/aleos/usr/readyagent/lua/sched/fd.lua:96: in function </root/aleos/usr/readyagent/lua/sched/fd.lua:88>
	(tail call): ?
	/root/aleos/usr/readyagent/lua/socket/platform.lua:159: in function 'connect'
	/root/aleos/usr/readyagent/lua/socket.lua:26: in function 'connect'
	/root/aleos/usr/readyagent/lua/racon/common.lua:82: in function 'init'
	/root/aleos/usr/readyagent/lua/racon/init.lua:42: in function 'init'
	main.lua:59: in function 'main'
	main.lua:117: in main chunk
	[C]: ?
stack traceback:
	[C]: in function 'error'
	/root/aleos/usr/readyagent/lua/sched/init.lua:854: in function 'wait'
	/root/aleos/usr/readyagent/lua/sched/fd.lua:96: in function </root/aleos/usr/readyagent/lua/sched/fd.lua:88>
	(tail call): ?
	/root/aleos/usr/readyagent/lua/socket/platform.lua:159: in function 'connect'
	/root/aleos/usr/readyagent/lua/socket.lua:26: in function 'connect'
	/root/aleos/usr/readyagent/lua/racon/common.lua:82: in function 'init'
	/root/aleos/usr/readyagent/lua/racon/init.lua:42: in function 'init'
	main.lua:59: in function 'main'
	main.lua:117: in main chunk
	[C]: ?

I try to reboot the gateway and to execute on a GX400 instead with the same issues.

When i launch the ‘old’ scripts they run without problems.

Can anyone help me to figure out what happens ?

Thank you in advance,
Guillaume.

Hi,

After many tests I found my wrongdoing.

It was just the start of the main function.

my old code:

main()

My new code:

sched.run(main)
sched.loop()

cordialy,
Guillaume.