This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.
Steve Markgraf steve at steve-m.deHi, On 26.03.2013 14:50, Chris Svendsen wrote: > #define COMM_SET_FREQ ((unsigned char) 0x01) > struct command{ > unsigned char cmd; > unsigned int param; > }; > unsigned char cmds; > int iFreq = 500000000; > cmds = COMM_SET_FREQ; > struct command cmd = {cmds, htonl(iFreq)}; > > answer = send(sConnect, (const char*)&cmd, sizeof(cmd), 0); What's the sizeof(cmd), is it really 5? Seems like you're missing the __attribute__((packed)) to make sure the members of the struct are byte-aligned. Regards, Steve