{"id":31,"date":"2021-09-21T16:16:21","date_gmt":"2021-09-21T14:16:21","guid":{"rendered":"http:\/\/mathieuleguey.com\/?p=31"},"modified":"2021-09-29T15:57:03","modified_gmt":"2021-09-29T13:57:03","slug":"connect-waveshare-sim7600-4g-lte-card-on-a-raspberry-pi-2","status":"publish","type":"post","link":"https:\/\/mathieuleguey.com\/index.php\/2021\/09\/21\/connect-waveshare-sim7600-4g-lte-card-on-a-raspberry-pi-2\/","title":{"rendered":"Connect Waveshare SIM7600 4G LTE card on a Raspberry Pi 2"},"content":{"rendered":"\n<p>After long hours to find right to solution to connect my Waveshare SIM7600, here are my settings that works :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Keep yellow UART jumpers on B mode on SIM7600 card.<\/li><li>Keep yellow jumper between 3V3 and VCCIO pins on the yellow jumpers. <br><em>My card is an old card, on newer card you still have 3V3 with PWR pins and another jumper between D4 and flight<\/em><\/li><li>Connect SIM7600 USB port (not USB-to-UART) to one available USB port on Raspberry.<\/li><li>Connect 4G LTE Antenna to SIM7600 MAIN connector<\/li><\/ul>\n\n\n\n<p>Enable Rasperry Pi serial interface : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo raspi-config<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to Interfaces Options<\/li><li>Then to Serial<\/li><li>Hit No at question &#8220;Would you like a login shell to be accessible over serial?&#8221;<\/li><li>Hit Yes at question &#8220;Would you like the serial port to be enabled?&#8221; <\/li><li>Finish &amp; restart Raspberry Pi<\/li><\/ul>\n\n\n\n<p>Install minicom to be able to send command to SIM7600 card later :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get install minicom<\/code><\/pre>\n\n\n\n<p>Get file package from Waveshare with this code :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/www.waveshare.com\/w\/upload\/2\/29\/SIM7600X-4G-HAT-Demo.7z\nsudo apt-get install p7zip-full\n7z x SIM7600X-4G-HAT-Demo.7z   -r -o\/home\/pi\nsudo chmod a+x \/home\/pi\/SIM7600X-4G-HAT-Demo\/Raspberry\/c\/sim7600_4G_hat_init<\/code><\/pre>\n\n\n\n<p>In your \/etc\/rc.local, you can add this line before &#8220;exit 0&#8221; :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/pi\/SIM7600X-4G-HAT-Demo\/Raspberry\/c\/sim7600_4G_hat_init<\/code><\/pre>\n\n\n\n<p>But when you will issue a reboot, you can not use your 4G card anymore.<br>For this, you need to add in a new file \/etc\/rc6.d\/K00_sim7600_hat_stop :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"1\" > \/sys\/class\/gpio\/gpio4\/value\necho \"1\" > \/sys\/class\/gpio\/gpio6\/value<\/code><\/pre>\n\n\n\n<p>Now, it&#8217;s time to chat with your SIM7600 card :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>minicom -D \/dev\/ttyS0 # for Raspberry Pi 3\nminicom -D \/dev\/ttyAMA0 # for Raspberry Pi 2B \/ Zero<\/code><\/pre>\n\n\n\n<p>You may need to provide APN &amp; other settings to connect to Internet through your provider (next example is for Orange in France) :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AT+CGDCONT=1,\"IPV4V6\",\"orange\",\"\",0,0,0,0\nAT+CGACT=1,1\nAT+CUSBPIDSWITCH=9011,1,1<\/code><\/pre>\n\n\n\n<p>The last line switch modem in RNDIS mode, you will discover a new entry in ifconfig.<\/p>\n\n\n\n<p>Commonly used commands (for more go to <a href=\"https:\/\/www.waveshare.com\/w\/upload\/8\/8f\/SIM7500_SIM7600_Series_AT_Command_Manual_V1.12.pdf\">https:\/\/www.waveshare.com\/w\/upload\/8\/8f\/SIM7500_SIM7600_Series_AT_Command_Manual_V1.12.pdf<\/a>) :<\/p>\n\n\n\n<table class=\"wp-block-table is-style-stripes\"><tbody><tr><td>ATI<\/td><td>Get informations about hardware<\/td><\/tr><tr><td>AT&amp;F<\/td><td>Reset all parameters to defaults<\/td><\/tr><tr><td>AT+CFUN?<\/td><td>Returns 1 if full functionnality mode, 0 if minimal (check if gpio pins 4\/6 are correctly set in rc.local)<\/td><\/tr><tr><td>AT+CPIN?<\/td><td>READY if connected, SIM PIN if PIN is needed<\/td><\/tr><tr><td>AT+CPIN=12345678<\/td><td>Push PIN code if needed to unlock SIM card<\/td><\/tr><tr><td>AT+CSPN?<\/td><td>Get SIM provider name<\/td><\/tr><tr><td>AT+CSQ<\/td><td>Query signal quality, first number must not be 99<\/td><\/tr><tr><td>AT+CRESET<\/td><td>Reset module<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After long hours to find right to solution to connect my Waveshare SIM7600, here are my settings that works : Keep yellow UART jumpers on B mode on SIM7600 card. Keep yellow jumper between 3V3 and VCCIO pins on the yellow jumpers. My card is an old card, on newer card you still have 3V3 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":1,"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathieuleguey.com\/index.php\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}