On Mon, Feb 08, 2010 at 12:23:25PM -0500, Charles Irick wrote: > I'm running into issues with the sendmsg command in the vectorized > send path. Depending on the buffer size I get an error returned for > "Bad Address" > > >> ethernet:write_packetv: send: Bad address > > I'm working at the c++ level right now and my program is pretty simple: > > usrp2::usrp2::sptr u2 = usrp2::usrp2::make(interface,mac_addr); > > usrp2::tx_metadata md; > md.timestamp = -1; > md.start_of_burst = 1; > md.send_now = 1; > > uint32_t buf[1000]; > u2->tx_raw(0,buf,sizeof(buf),&md);
/*! * \brief transmit raw uint32_t data items to USRP2 * * The caller is responsible for ensuring that the items are * formatted appropriately for the USRP2 and its configuration. * This method is used primarily by the system itself. Users * should call tx_32fc or tx_16sc instead. * * \param channel specifies the channel to send them to * \param items are the data items to transmit * \param nitems is the number of items to transmit * \param metadata provides the timestamp and flags */ bool tx_raw(unsigned int channel, const uint32_t *items, size_t nitems, const tx_metadata *metadata); The 3rd arg is the number of 32-bit items. Try using sizeof(buf)/sizeof(buf[0]) Also, unless you're running on a big endian machine, you're going to need to handle the endianness issue or use the slightly higher level interfaces tx_32fc or tx16_sc. Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio