lukeswitz / AtomGPS_wigler

Uses an ATOM M5 GPS Kit for Wigle wardriving
26 stars 6 forks source link

config file channels doesn't read all 13 values, crashes with 14 #25

Closed pejacoby closed 5 months ago

pejacoby commented 5 months ago

I created a config.txt file to try to scan all 14 channels. This causes a crash and boot loop.

speedBased=false scanDelay=150 adaptiveScan=true channels=1,2,3,4,5,6,7,8,9,10,11,12,13,14

log output: 21:27:18.822 -> StartM5Atom initializing...OK 21:27:19.875 -> SD Card initialized. 21:27:19.941 -> 21:27:19.941 -> Stack smashing protect failure! 21:27:19.941 -> 21:27:19.941 -> 21:27:19.941 -> Backtrace: 0x40083e39:0x3ffb20f0 0x4008d931:0x3ffb2110 0x400831f2:0x3ffb2130 0x400d2d5e:0x3ffb2150 0x400d2dee:0x3ffb21c0 0x400d365e:0x3ffb2230 0x400da616:0x3ffb2290 21:27:19.941 ->

If I back down to 12 or 13 channel entries, things boot up but only report 11 channels to scan:

speedBased=false scanDelay=150 adaptiveScan=true channels=1,2,3,4,5,6,7,8,9,10,11,12,13

log output: 21:30:34.709 -> StartM5Atom initializing...OK 21:30:35.763 -> SD Card initialized. 21:30:35.763 -> Configuration values: 21:30:35.763 -> speedBased: false 21:30:35.763 -> scanDelay: 150 21:30:35.763 -> adaptiveScan: true 21:30:35.763 -> channels: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 21:30:35.961 -> WiFi initialized. 21:30:36.947 -> GPS Serial initialized. 21:30:36.947 -> Waiting for GPS fix...

Does the default array need to be 14 entries on line 45 to accommodate us folks that would scan all 14 channels via the config.txt file?

Raw config.txt has \n linebreaks produced by TextEdit on MacOS:

pejacoby@Pauls-Mini-M1 /Volumes % od -c ATOMGPS3/config.txt
0000000    s   p   e   e   d   B   a   s   e   d   =   f   a   l   s   e
0000020   \n   s   c   a   n   D   e   l   a   y   =   1   5   0  \n   a
0000040    d   a   p   t   i   v   e   S   c   a   n   =   t   r   u   e
0000060   \n   c   h   a   n   n   e   l   s   =   1   ,   2   ,   3   ,
0000100    4   ,   5   ,   6   ,   7   ,   8   ,   9   ,   1   0   ,   1
0000120    1   ,   1   2   ,   1   3   ,   1   4  \n                    
lukeswitz commented 5 months ago

cant reproduce, looks like your using rich text not plain text file. will check later

Edit: you are correct I didn't add that line to the INO after testing and left it 11 not 14 to accommodate that- walk of shame. The bin files are correct though I just forgot to push that

lukeswitz commented 5 months ago

Caused by the buffer not set high enough for the comma separation. Reopening to patch version