xDot has only one /dev/ttyACM?
Tagged: xDOT AT no-echo
- This topic has 7 replies, 3 voices, and was last updated 8 years, 3 months ago by
Kenneth Martin.
-
AuthorPosts
-
January 12, 2017 at 11:45 am #16288
Kenneth Martin
ParticipantPreviously (two days ago), the xDot functioned fine using:
>sudo miniterm.py /dev/ttyACM0 115200 and AT commands through the serial port.
Then it stopped working correctly; no idea why.
1) When I plug it into the USB, I only see one /dev, mostly /dev/ttyACM0, but sometimes /dev/ttyACM1, previously I saw both /dev/ttyACM0 and /dev/ttyACM1.
2) A files browser does open showing details.txt and xdot.htm. The details.txt file is:
# DAPLink Firmware – see https://mbed.com/daplink
Unique ID: 0350000031844e4500479007a49a0051ef61000097969900
HIC ID: 97969900
Auto Reset: 0
Automation allowed: 0
Overflow detection: 0
Daplink Mode: Interface
Interface Version: 0243
Bootloader Version: 0241
Git SHA: b403a07e3696cee1e116d44cbdd64446e056ce38
Local Mods: 0
USB Interfaces: MSD, CDC, HID
Bootloader CRC: 0x8fe8b5ec
Interface CRC: 0x0b9538de
Remount count: 0When I start >sudo miniterm.py /dev/ttyACM0 115200 nothing is echoed back when I type; I do see the bottom blue LED turn off each time I hit a key. I have also tried >sudo minicom -b 115200 /dev/ttyACM1 (sometimes it comes up as /dev/ttyACM0, sometimes /dev/ttyACM1) with the same results; that is no echo. I have also tried RESET and Enter to try and get into the boot loader: nothing happens. I have also tried RESET and +++ many times, and nothing happens.
3) I compiled the AT binary at:
https://developer.mbed.org/compiler/#nav:/mDot_AT_firmware/libxDot-mbed5; with MultiTech xDot as the target
downloaded mDot_AT_firmware_XDOT_L151CC.bin, unmounted the xDot, plugged it while holding reset down, it booted into maintenance mode as expected. When I dragged the binary onto the Files explorer window, the bottom blue LED flashed very quickly, about 5 times, then went solid for about 5 seconds, and then a new file appeared in the explorer window called FAIL.TXT; it’s contents where “The transfer timed out.”
4) My xDot model is: MTXDOT -UFL 8/0: SNLINKWould anyone have some suggestions? I can’t think of what else to try except ordering a new xDot. If this is thought to be the best next step, this info is also appreciated. Thanks.
-Ken MartinJanuary 12, 2017 at 12:17 pm #16290Jason Reiss
KeymasterDo you have an /dev/ttyXRUSB0 file?
Or you can look at the diff between “ls /dev” before and after plugging the xdot dev board.
January 12, 2017 at 12:56 pm #16293Kenneth Martin
ParticipantUnplugged:
> ls /dev/ttyA* /dev/ttyX*
ls: cannot access ‘/dev/ttyA*’: No such file or directory
ls: cannot access ‘/dev/ttyX*’: No such file or directory
After plugging and Files explorer window popping up:
> ls /dev/ttyA* /dev/ttyX*
/dev/ttyACM0 /dev/ttyXRUSB0
> mount | g /dev/sdc
/dev/sdc on /media/martin/XDOT type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
After unmounting:
> mount | g /dev/sdc
> ls /dev/ttyA* /dev/ttyX*
/dev/ttyACM0 /dev/ttyXRUSB0
>
After unplugging:
> ls /dev/ttyA* /dev/ttyX*
ls: cannot access ‘/dev/ttyA*’: No such file or directory
ls: cannot access ‘/dev/ttyX*’: No such file or directory
>January 12, 2017 at 1:02 pm #16294Mike Fiore
BlockedKenneth,
I suspect /dev/ttyACM0 will be your debug port and /dev/ttyXRUSB0 will be your AT command port.
Cheers,
MikeJanuary 12, 2017 at 1:29 pm #16296Kenneth Martin
ParticipantThat was it Mike; you just save me mucho time.
> sudo miniterm.py /dev/ttyXRUSB0 115200
— Miniterm on /dev/ttyXRUSB0 115200,8,N,1 —
— Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
at+join
Command not found!ERROR
atz
OK
at+ack=1OK
at+join
Successfully joined networkOK
at+send=hello world
OK
On host:
root@mtcdt:/var/log# nc –udp –listen –local-port 1784
lora/00-80-00-00-04-00-03-d6/packet_recv {“chan”:2,”codr”:”4/5″,”data”:”gAEAAAYAAAAB98OZjqk82qaZuVTrIHIK”,”datr”:”SF10BW125″,”freq”:912.29999999999995,”lsnr”:10,”modu”:”LORA”,”rfch”:0,”rssi”:-31,”size”:24,”stat”:1,”time”:”2017-01-12T19:15:23.909064Z”,”tmst”:2341181468}lora/00-80-00-00-04-00-03-d6/up {“chan”:2,”cls”:0,”codr”:”4/5″,”data”:”aGVsbG8gd29ybGQ=”,”datr”:”SF10BW125″,”freq”:”912.3″,”lsnr”:”10″,”mhdr”:”8001000006000000″,”modu”:”LORA”,”opts”:””,”port”:1,”rfch”:0,”rssi”:-31,”seqn”:0,”size”:16,”timestamp”:”2017-01-12T19:15:23.909064Z”,”tmst”:2341181468}
lora/00-80-00-00-04-00-03-d6/packet_sent {“codr”:”4/5″,”data”:”YAEAAAYgAQCM2em1″,”datr”:”SF10BW500″,”freq”:926.89999999999998,”ipol”:true,”modu”:”LORA”,”ncrc”:false,”powe”:14,”rfch”:0,”size”:12,”tmst”:2342181468}/dev/ttyXRUSB0 is new to me. Any reference links on how serial USB works? Also, since I have your attention: would you have a link on how to interpret “data”:”aGVsbG8gd29ybGQ=” as “hello world”? Is it just a matter of converting from ascii to hex and then reversing bytes? Finally, any thoughts on why the re-flashing timed out when I dropped
mDot_AT_firmware_XDOT_L151CC.bin onto the maintenance window? Finally,finally, if MultiTech had a site of categorized gotchas and fixes, I would be a willing contributor. Thanks again for getting me back up and running; appreciated.
-KenJanuary 12, 2017 at 1:41 pm #16298Mike Fiore
BlockedKen,
Usually the device gets named based on what driver picks it up. On Linux you have vizzini, exar, and others. Running the lsmod command will show you what drivers are loaded, but if the driver is compiled into your kernel, you won’t see it in the list.
The data is coming base64 encoded, so it will need to be decoded. I found an online tool that will do this for you (https://www.base64decode.org/) but you can also do it in software, perhaps in your node-red app (http://stackoverflow.com/questions/6182315/how-to-do-base64-encoding-in-node-js).
When the xDot is in maintenance mode, the firmware you drag and drop gets programmed into the interface chip on the DK, not the xDot processor. The xDot firmware you tried to program was rejected because it wasn’t built for the interface chip.
Glad you’re back up and running!
Cheers,
MikeJanuary 12, 2017 at 1:50 pm #16300Kenneth Martin
ParticipantThanks Mike, great answers. Ken
January 12, 2017 at 2:33 pm #16303Kenneth Martin
ParticipantP.S. It appears python also has encoders and decoders:
https://docs.python.org/2/library/base64.html
using:
>>> import base64
>>> encoded = base64.b64encode(‘data to be encoded’)
>>> encoded
‘ZGF0YSB0byBiZSBlbmNvZGVk’
>>> data = base64.b64decode(encoded)
>>> data
‘data to be encoded’ -
AuthorPosts
- You must be logged in to reply to this topic.